Skip to content
Permalink
0bbc673836
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
69 lines (55 sloc) 1.24 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 boolean equals(float a, float b) {
return ((a == x) && (b == y));
}
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();
}
}
}