From 1dc478acd50001a058bae427654b02db81ee9ac2 Mon Sep 17 00:00:00 2001 From: Connor Riley Date: Sun, 6 Dec 2015 15:43:14 -0500 Subject: [PATCH] can now draw a point --- main/DrawHalfEdge.pde | 4 ++-- main/main.pde | 20 ++++++++------------ 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/main/DrawHalfEdge.pde b/main/DrawHalfEdge.pde index 0054680..739a80f 100644 --- a/main/DrawHalfEdge.pde +++ b/main/DrawHalfEdge.pde @@ -12,7 +12,7 @@ public class DrawHalfEdge { for(Point p: vlist) { drawConnectedGraph(p); } - zoom(vlist); + //zoom(vlist); } public void drawConnectedGraph(Point p) { @@ -79,4 +79,4 @@ public class DrawHalfEdge { } } -//find lowest and highest x and y, divide by difference. \ No newline at end of file +//find lowest and highest x and y, divide by difference. diff --git a/main/main.pde b/main/main.pde index cb9d88b..8ca9220 100644 --- a/main/main.pde +++ b/main/main.pde @@ -1,7 +1,7 @@ boolean pointclickedbool = false; Point pointclicked; PointList list = new PointList(); -DrawHalfEdge drawgraph = new DrawHalfEdge(); +DrawHalfEdge drawgraph = new DrawHalfEdge(); public void setup() { size(800, 500); @@ -82,22 +82,18 @@ public void setup() { //h1.facePrint(); //HalfEdge h5 = new HalfEdge(v1,v2); //h1.facePrint(); - drawgraph.drawGraph(list.getPoints()); + //drawgraph.drawGraph(list.getPoints()); //(new Face(h4, list)).printFace(); //(new Face(h12, list)).printFace(); - print("finsihed set up"); } void draw() { - ellipse(50,50,50,50); - if(mousePressed) { - float x = mouseX; - float y = mouseY; - Point p = new Point(x,y); - list.addPoint(p); - drawgraph.drawGraph(list.getPoints()); - System.out.println("entered mousePressed"); - } + drawgraph.drawGraph(list.getPoints()); } +void mouseReleased() { + Point p = new Point(mouseX,mouseY); + list.addPoint(p); +} + /*public void draw() { if(mousePressed) { float x = mouseX;