diff --git a/main/HalfEdge.pde b/main/HalfEdge.pde index a077589..81c2e0e 100644 --- a/main/HalfEdge.pde +++ b/main/HalfEdge.pde @@ -43,6 +43,7 @@ public class HalfEdge { twin.setprevious(try2[0]); next = try2[1]; } + System.out.println(this); // Set Nexts // Set Prevs @@ -117,6 +118,9 @@ public class HalfEdge { return counted; } + public String toString() { + return "Origin: " + vertex.toString() + "\nDestination: " + twin.getOrigin().toString(); + } public HalfEdge gettwin() { return twin; @@ -136,4 +140,13 @@ public class HalfEdge { public void setIncidentFace(Face f) { incidentFace = f; } + + public void facePrint() { + HalfEdge e = next; + System.out.println(this); + while (e != this) { + System.out.println(e); + e = e.getnext(); + } + } } \ No newline at end of file diff --git a/main/Vertex.pde b/main/Vertex.pde index a215301..92a3974 100644 --- a/main/Vertex.pde +++ b/main/Vertex.pde @@ -43,7 +43,7 @@ public class Vertex { HalfEdge[] prevNext = new HalfEdge[2]; if (leaving.size() == 1) { prevNext[1] = leaving.get(0); - prevNext[0] = prevNext[0].gettwin(); + prevNext[0] = prevNext[1].gettwin(); return prevNext; } Vertex v1 = this;