Fixed all processing related errors
This commit is contained in:
@@ -7,14 +7,13 @@
|
|||||||
</content>
|
</content>
|
||||||
<orderEntry type="inheritedJdk" />
|
<orderEntry type="inheritedJdk" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
<orderEntry type="module-library">
|
<orderEntry type="module-library" exported="">
|
||||||
<library>
|
<library>
|
||||||
<CLASSES>
|
<CLASSES>
|
||||||
<root url="file:///opt/processing/processing-4.2/core/library" />
|
<root url="jar:///opt/processing/processing-4.2/core/library/core.jar!/" />
|
||||||
</CLASSES>
|
</CLASSES>
|
||||||
<JAVADOC />
|
<JAVADOC />
|
||||||
<SOURCES />
|
<SOURCES />
|
||||||
<jarDirectory url="file:///opt/processing/processing-4.2/core/library" recursive="false" />
|
|
||||||
</library>
|
</library>
|
||||||
</orderEntry>
|
</orderEntry>
|
||||||
</component>
|
</component>
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
import processing.core.*;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import static java.lang.Math.PI;
|
import static java.lang.Math.PI;
|
||||||
import static processing.core.PApplet.degrees;
|
import static processing.core.PApplet.degrees;
|
||||||
import static processing.core.PApplet.radians;
|
import static processing.core.PApplet.radians;
|
||||||
|
import processing.core.PVector;
|
||||||
|
import processing.core.PApplet;
|
||||||
|
|
||||||
public class Car{
|
public class Car extends PApplet{
|
||||||
PVector pose = new PVector(0,0); // the car's x, y position
|
PVector pose = new PVector(0,0); // the car's x, y position
|
||||||
float angle = 0; // the current angle that the car is at.
|
float angle = 0; // the current angle that the car is at.
|
||||||
int carLength = 50;
|
int carLength = 50;
|
||||||
|
|||||||
@@ -2,7 +2,9 @@ import processing.core.*;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class SLAM{
|
import static processing.core.PApplet.pow;
|
||||||
|
|
||||||
|
public class SLAM extends PApplet{
|
||||||
ArrayList<PVector> points = new ArrayList<PVector>();
|
ArrayList<PVector> points = new ArrayList<PVector>();
|
||||||
|
|
||||||
SLAM(){
|
SLAM(){
|
||||||
@@ -39,7 +41,7 @@ class Line{
|
|||||||
for(PVector point : points){
|
for(PVector point : points){
|
||||||
mean.add(point);
|
mean.add(point);
|
||||||
}
|
}
|
||||||
mean.div(points.size())
|
mean.div(points.size());
|
||||||
|
|
||||||
// this section calculates the direction vector of the line of best fit
|
// this section calculates the direction vector of the line of best fit
|
||||||
PVector direction = new PVector();
|
PVector direction = new PVector();
|
||||||
@@ -50,7 +52,7 @@ class Line{
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.position = mean;
|
this.position = mean;
|
||||||
this.direction = direciton;
|
this.direction = direction;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PVector getSlopeIntForm(){
|
public PVector getSlopeIntForm(){
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import java.util.Objects;
|
|||||||
|
|
||||||
import static processing.core.PApplet.*;
|
import static processing.core.PApplet.*;
|
||||||
|
|
||||||
public class View{
|
public class View extends PApplet{
|
||||||
PVector pose;
|
PVector pose;
|
||||||
float angle = 0;
|
float angle = 0;
|
||||||
float FOV;
|
float FOV;
|
||||||
@@ -77,7 +77,7 @@ public class View{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class Ray{
|
class Ray extends PApplet{
|
||||||
PVector pose;
|
PVector pose;
|
||||||
int rayLength;
|
int rayLength;
|
||||||
int defaultRayLength;
|
int defaultRayLength;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import processing.core.*;
|
|||||||
|
|
||||||
import static processing.core.PApplet.*;
|
import static processing.core.PApplet.*;
|
||||||
|
|
||||||
public class Wall{
|
public class Wall extends PApplet{
|
||||||
PVector pos;
|
PVector pos;
|
||||||
float angle;
|
float angle;
|
||||||
int wallLength;
|
int wallLength;
|
||||||
|
|||||||
Reference in New Issue
Block a user