Creating scan graph.

This commit is contained in:
Quinn
2023-11-21 21:30:21 -05:00
parent bda601d326
commit 7dc679371a
3 changed files with 42 additions and 5 deletions

View File

@@ -0,0 +1,40 @@
package ScanGraph;
import Graph.PointGraph;
import Graph.Vertex;
import Vector.Vector;
import processing.core.PApplet;
import java.util.ArrayList;
public class PointScan extends Vertex{
private Vector position;
private ArrayList<Vector> scan;
PointScan(Vector scanPosition, ArrayList<Vector> scan){
super();
this.position = scanPosition;
this.scan = scan;
}
/**
* @param x the new x position of the vertex
* @param y the new y posiiton of the vertex
*/
public void setPos(float x, float y){
this.position = new Vector(x, y);
}
/**
* @return a two eleement float array containing the x and y coordinates of the vertex respectively.
*/
public Vector getPos(){
return position;
}
public ArrayList<Vector> getScan(){
return this.scan;
}
}