Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix merge conflicts
  • Loading branch information
JimmyBoivie authored and JimmyBoivie committed Dec 7, 2015
2 parents 14fdd38 + 462e5c0 commit 09745b1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion main/HalfEdge.pde
Expand Up @@ -271,7 +271,7 @@ public class HalfEdge {
private boolean intersectsEventually(Point p, Point q) {
if (this.getOrigin().equals(p)) { return false; }
if (this.getOrigin().equals(q)) { return false; }
if (CompGeo.intersect(p, q, this.getOrigin(), this.gettwin().getOrigin()) {
if (CompGeo.intersect(p, q, this.getOrigin(), this.gettwin().getOrigin()) == 1) {
return true;
}
if (counted == false) {
Expand Down
10 changes: 8 additions & 2 deletions main/main.pde
Expand Up @@ -9,6 +9,8 @@ public void setup() {
background(255);
fill(0,0);
translate(width/2, height/2);


Point p1 = new Point(300, 300);
list.addPoint(p1);
Point p2 = new Point(400, 350);
Expand Down Expand Up @@ -58,7 +60,7 @@ public void setup() {
HalfEdge h13 = new HalfEdge(p7, p15);
HalfEdge h14 = new HalfEdge(p8, p15);
HalfEdge h15 = new HalfEdge(p9, p15);
HalfEdge h16 = new HalfEdge(p16, p17);
HalfEdge h16 = new HalfEdge(p16, p17);

//h1.printFace();
//float f = CompGeo.signedArea(h1.gettwin());
Expand Down Expand Up @@ -98,8 +100,12 @@ void mouseReleased() {
for(Point p: list.getPoints()) {
if((p.getX() - 10 < x) && (p.getX() + + 10 > x)) {
if((p.getY() - 10 < y) && (p.getY() + 10 > y)) {
HalfEdge h = new HalfEdge(p, pointclicked);
linedrawn = true;
if(p.getY() - 10 < pointclicked.getY() && p.getY() + 10 > pointclicked.getY()
&& p.getX() - 10 < pointclicked.getX() && p.getX() + 10 > pointclicked.getX()) { }
else {
HalfEdge h = new HalfEdge(p, pointclicked);
}
}
}
}
Expand Down

0 comments on commit 09745b1

Please sign in to comment.