Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
uhh:
  • Loading branch information
JimmyBoivie authored and JimmyBoivie committed Dec 8, 2015
1 parent c8a8171 commit b269dd5
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 25 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
14 changes: 7 additions & 7 deletions main/Face.pde
Expand Up @@ -17,7 +17,7 @@ public class Face {
p = new Point(i, j);
if (inSpecificFace(p, pl)) {
point(i,j);
System.out.println(p);
//System.out.println(p);
}
}
}
Expand All @@ -26,7 +26,7 @@ public class Face {

public boolean inSpecificFace(Point a, PointList pl) {
if ((outerComponent == null) || (CompGeo.inside(outerComponent, a, pl.getFar()))) {
System.out.println(a);
//System.out.println(a);
int num = innerComponents.size();
for (int i = 0; i < num; i++) {
if (inAnInner(innerComponents.get(i), a, pl)) {
Expand All @@ -45,16 +45,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();
}

}
12 changes: 6 additions & 6 deletions main/HalfEdge.pde
Expand Up @@ -252,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 @@ -371,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
4 changes: 2 additions & 2 deletions main/PointList.pde
Expand Up @@ -52,8 +52,8 @@ public class PointList {
}

public HalfEdge getHalfEdge(Point p, Point q) {
System.out.println(p);
System.out.println(q);
//System.out.println(p);
//System.out.println(q);
int num = points.size();
int id = -1;
for (int i = 0; i < num; i++) {
Expand Down
10 changes: 5 additions & 5 deletions main/main.pde
Expand Up @@ -68,13 +68,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 Expand Up @@ -149,7 +149,7 @@ public void colorFace(float x, float y) {
if((p.getY() - 10 < y) && (p.getY() + 10 > y)) {
HalfEdge h = list.getHalfEdge(colorEdgePoint, p);
if(h != null) {
System.out.println("h is not null");
//System.out.println("h is not null");
Face f = new Face(h, list);
f.printFace();
if(colorFaceColor == 0) {
Expand Down

0 comments on commit b269dd5

Please sign in to comment.