From 96694761a3934b96ee2378c9aaab9667ede57b2b Mon Sep 17 00:00:00 2001 From: Connor Riley Date: Tue, 15 Dec 2015 14:31:19 -0500 Subject: [PATCH] methods don't work yet --- main/HalfEdge.pde | 2 +- main/main.pde | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/main/HalfEdge.pde b/main/HalfEdge.pde index d2be093..68800cc 100644 --- a/main/HalfEdge.pde +++ b/main/HalfEdge.pde @@ -284,7 +284,7 @@ public class HalfEdge { HalfEdge h2 = new HalfEdge(p2, p3); HalfEdge h3 = new HalfEdge(p3, p4); HalfEdge h4 = new HalfEdge(p4, p1); - return CompGeo.inside(h, new Point(x, y), farAway); + return CompGeo.inside(h1, new Point(x, y), farAway); } public ArrayList getAllLeaving() { diff --git a/main/main.pde b/main/main.pde index fa55c8d..0a6478f 100644 --- a/main/main.pde +++ b/main/main.pde @@ -188,7 +188,7 @@ void mouseReleased() { public void colorFace(float x, float y) { - // get halfEdge + HalfEdge h = list.getHalfEdgeBySinglePoint(x,y,20); if(h != null) { Face f = new Face(h, list); f.printFace(); @@ -340,9 +340,14 @@ public void removePointMode(float x, float y) { public void removeEdgeMode(float x, float y) { - //get edge - h.Remove(); + System.out.println("entered remove edge"); + HalfEdge h = list.getHalfEdgeBySinglePoint(x,y,20); + if(h != null) { + System.out.println("h is not null"); + h.Remove(); + } } + /*public void removeEdgeMode(float x, float y) { if(removeEdge) { for(Point p: list.getPoints()) {