Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Removing System.out
  • Loading branch information
JimmyBoivie authored and JimmyBoivie committed Dec 8, 2015
1 parent 35c5125 commit 1c3f30b
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 20 deletions.
8 changes: 4 additions & 4 deletions main/DrawHalfEdge.pde
@@ -1,7 +1,7 @@
public class DrawHalfEdge {

public void drawline(Point v1, Point v2) {
//System.out.println(v1 + " " + v2);
////System.out.println(v1 + " " + v2);
line(v1.getX(), v1.getY(), v2.getX(), v2.getY());
}
public void drawpoint(Point v) {
Expand All @@ -18,17 +18,17 @@ public class DrawHalfEdge {
public void drawConnectedGraph(Point p) {
ArrayList<HalfEdge> edges = p.getLeaving();
drawpoint(p);
//System.out.println(p);
////System.out.println(p);
if(edges != null) {
for(HalfEdge edge: edges) {
//System.out.println(edge);
////System.out.println(edge);
drawConnection(edge);
}
}
}

public void drawConnection(HalfEdge edge) {
//System.out.println("drawing connection");
////System.out.println("drawing connection");
Point v2 = edge.getOrigin();
Point v1 = edge.gettwin().getOrigin();
drawline(v1, v2);
Expand Down
10 changes: 5 additions & 5 deletions main/Face.pde
Expand Up @@ -10,16 +10,16 @@ public class Face {
}

public void printFace() {
System.out.println("Outer Face:");
//System.out.println("Outer Face:");
if (outerComponent != null) { outerComponent.printRNext(); }
System.out.println();
System.out.println("Inner Components:");
//System.out.println();
//System.out.println("Inner Components:");
int num = innerComponents.size();
for (int i = 0; i < num; i++) {
System.out.println("COMPONENT[" + i + "]");
//System.out.println("COMPONENT[" + i + "]");
innerComponents.get(i).printRNext();
}
System.out.println();
//System.out.println();
}

}
16 changes: 10 additions & 6 deletions main/HalfEdge.pde
Expand Up @@ -18,6 +18,7 @@ public class HalfEdge {
p.setRef(null);
q.setRef(null);
state = 0;
console.log("CLASS0");
} else if (p.count() == 1) {
p.setRef(null);
q.setRef(twin.getAnotherLeaving());
Expand All @@ -26,6 +27,7 @@ public class HalfEdge {
// NOTHING SPECIAL MUST BE DONE
// Make Sure face is not represented by dissapearing edge
state = 1;
console.log("CLASS1A");
} else if (q.count() == 1) {
p.setRef(this.getAnotherLeaving());
q.setRef(null);
Expand All @@ -34,6 +36,7 @@ public class HalfEdge {
// NOTHING SPECIAL MUST BE DONE
// Make sure face is not represented by dissapearing edge
state = 1;
console.log("CLASS1B");
} else {
int expected = p.count() - 2;
p.setRef(this.getAnotherLeaving());
Expand All @@ -42,6 +45,7 @@ public class HalfEdge {
twin.getprevious().setnext(this.getnext());
this.getprevious().setnext(twin.getnext());
twin.getnext().setprevious(this.getprevious());
console.log("CLASS23");
if (p.count() == expected) {
// was not broken faces merge!
//
Expand Down Expand Up @@ -248,13 +252,13 @@ public class HalfEdge {
}
public void printFace() {
HalfEdge temp = next;
System.out.println("PrintFaceBegin");
System.out.println(origin + " " + twin.getOrigin());
////System.out.println("PrintFaceBegin");
////System.out.println(origin + " " + twin.getOrigin());
while (temp != this) {
System.out.println(temp.getOrigin() + " " + temp.gettwin().getOrigin());
////System.out.println(temp.getOrigin() + " " + temp.gettwin().getOrigin());
temp = temp.getnext();
}
System.out.println();
////System.out.println();
}

private boolean isReachable(HalfEdge h) {
Expand Down Expand Up @@ -367,10 +371,10 @@ public class HalfEdge {
}

public void printRNext() {
System.out.println(" " + origin);
////System.out.println(" " + origin);
HalfEdge temp = next;
while (temp != this) {
System.out.println(" " + temp.getOrigin());
//System.out.println(" " + temp.getOrigin());
temp = temp.getnext();
}
}
Expand Down
2 changes: 1 addition & 1 deletion main/Point.pde
Expand Up @@ -56,7 +56,7 @@ public class Point {

public void deleteEdges() {
while(ref != null) {
System.out.println("REMOVING EDGE " + ref.getOrigin() + " " + ref.gettwin().getOrigin());
//System.out.println("REMOVING EDGE " + ref.getOrigin() + " " + ref.gettwin().getOrigin());
ref.Remove();
}

Expand Down
8 changes: 4 additions & 4 deletions main/main.pde
Expand Up @@ -67,13 +67,13 @@ public void setup() {
//h1.printFace();
//float f = CompGeo.signedArea(h1.gettwin());
//float f2 = CompGeo.signedArea(h1);
//System.out.println("Signed Area: " + f);
//System.out.println("Signed Area: " + f2);
////System.out.println("Signed Area: " + f);
////System.out.println("Signed Area: " + f2);
//h1.gettwin().printFace();
//h1.printFace();
//if (CompGeo.inside(h1.gettwin(), p6, p7)) {
// System.out.println("INSIDE");
//} else { System.out.println("OUTSIDE"); }
// //System.out.println("INSIDE");
//} else { //System.out.println("OUTSIDE"); }
//HalfEdge h5 = new HalfEdge(p5, p2);
//h5.gettwin().printFace();
//h5.printFace();
Expand Down

0 comments on commit 1c3f30b

Please sign in to comment.