Skip to content
Permalink
feabe22c34
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
JimmyBoivie uhh:
Latest commit b269dd5 Dec 8, 2015 History
1 contributor

Users who have contributed to this file

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();
}
}
}