Skip to content

Commit

Permalink
printface
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmyBoivie authored and JimmyBoivie committed Dec 3, 2015
1 parent d4a77b2 commit c791f43
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions main/HalfEdge.pde
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public class HalfEdge {
twin.setprevious(try2[0]);
next = try2[1];
}
System.out.println(this);
// Set Nexts

// Set Prevs
Expand Down Expand Up @@ -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;
Expand All @@ -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();
}
}
}
2 changes: 1 addition & 1 deletion main/Vertex.pde
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c791f43

Please sign in to comment.