Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
65 lines (52 sloc) 1.16 KB
public class Point {
private float x,y;
private HalfEdge ref;
public Point(float a, float b) {
x = a;
y = b;
ref = null;
}
public float getX() {
return x;
}
public void setX(float f) {
x = f;
}
public float getY() {
return y;
}
public void setY(float f) {
y = f;
}
public HalfEdge getRef() {
return ref;
}
public void setRef(HalfEdge h) {
ref = h;
}
public ArrayList<HalfEdge> getLeaving() {
if (ref == null) { return null; }
return ref.getAllLeaving();
}
public ArrayList<Point> getAdjacentPoints() {
if (ref == null) { return null; }
return ref.getAdjacentPoints();
}
public ArrayList<HalfEdge> getEntering() {
if (ref == null) { return null; }
return ref.getEntering();
}
public String toString() {
return "(x,y) = " + x + "," + y;
}
public int count() {
if (ref == null) { return 0; }
return ref.countReset();
}
public void deleteEdges() {
while(ref != null) {
////System.out.println("REMOVING EDGE " + ref.getOrigin() + " " + ref.gettwin().getOrigin());
ref.Remove();
}
}
}
You can’t perform that action at this time.