Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
can now draw a point
  • Loading branch information
cor11004 committed Dec 6, 2015
1 parent 4bed071 commit 1dc478a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
4 changes: 2 additions & 2 deletions main/DrawHalfEdge.pde
Expand Up @@ -12,7 +12,7 @@ public class DrawHalfEdge {
for(Point p: vlist) {
drawConnectedGraph(p);
}
zoom(vlist);
//zoom(vlist);
}

public void drawConnectedGraph(Point p) {
Expand Down Expand Up @@ -79,4 +79,4 @@ public class DrawHalfEdge {
}
}

//find lowest and highest x and y, divide by difference.
//find lowest and highest x and y, divide by difference.
20 changes: 8 additions & 12 deletions 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);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 1dc478a

Please sign in to comment.