Skip to content

Commit

Permalink
more feature
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmyBoivie authored and JimmyBoivie committed Dec 5, 2015
1 parent 6777d5b commit 7631a79
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main/Face.pde
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ public class Face {
HalfEdge outerComponent;
ArrayList<HalfEdge> innerComponents;

public Face() { }
public Face(HalfEdge outer) {
outerComponent = outer;
innerComponents = new ArrayList<HalfEdge>();
}

public void setOuterComponent(HalfEdge he) {
outerComponent = he;
Expand All @@ -30,6 +33,7 @@ public class Face {
addInnerComponent(he);
}


public ArrayList<HalfEdge> getInnerComponents() {
return innerComponents;
}
Expand Down
10 changes: 10 additions & 0 deletions main/HalfEdge.pde
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,16 @@ public class HalfEdge {
return c;
}

public int countOutside() {
HalfEdge temp = this.getnext();
int count = 1;
while (temp != this) {
count++;
temp = temp.getnext();
}
return count;
}

public int count() {
if (counted == false) {
counted = true;
Expand Down

0 comments on commit 7631a79

Please sign in to comment.