From e2066fba48430268b35981db4178e64533c2c03f Mon Sep 17 00:00:00 2001 From: Connor Riley Date: Mon, 7 Dec 2015 16:48:56 -0500 Subject: [PATCH 1/2] you can remove a point now --- main/main.pde | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/main/main.pde b/main/main.pde index 0be5e5d..e2f0e10 100644 --- a/main/main.pde +++ b/main/main.pde @@ -89,7 +89,8 @@ public void setup() { (new Face(h12, list)).printFace(); } void draw() { - drawgraph.drawGraph(list.getPoints()); + background(255,255,255,0); + drawgraph.drawGraph(list.getPoints()); } void keyPressed() { switch (key) { @@ -156,11 +157,13 @@ public void insertMode(float x, float y) { } public void removePointMode(float x, float y) { - boolean removePoint= false; + System.out.println("entered remove point"); + boolean removePoint = false; Point removeThis = null; for(Point p: list.getPoints()) { - if((p.getX() - 10 < x) && (p.getX() + + 10 > x)) { + if((p.getX() - 10 < x) && (p.getX() + 10 > x)) { if((p.getY() - 10 < y) && (p.getY() + 10 > y)) { + System.out.println("point found"); removeThis = p; removePoint = true; } From 0bbc6738360cba9c7902b683978c28582546c7d2 Mon Sep 17 00:00:00 2001 From: Connor Riley Date: Mon, 7 Dec 2015 16:56:03 -0500 Subject: [PATCH 2/2] added cases --- main/Point.pde | 1 + main/main.pde | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/main/Point.pde b/main/Point.pde index 73432ff..57ca54c 100644 --- a/main/Point.pde +++ b/main/Point.pde @@ -60,6 +60,7 @@ public class Point { public void deleteEdges() { while(ref != null) { + System.out.println("REMOVING EDGE " + ref.getOrigin() + " " + ref.gettwin().getOrigin()); ref.Remove(); } diff --git a/main/main.pde b/main/main.pde index e2f0e10..072cd59 100644 --- a/main/main.pde +++ b/main/main.pde @@ -100,14 +100,17 @@ void keyPressed() { case 'r': mode = 1; break; + case 'h': + mode = 2; + break; case 'p': - mode = 2; + mode = 3; break; case 'b': - mode = 3; + mode = 4; break; case 'g': - mode = 4; + mode = 5; break; }