Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
guesses for new methods
  • Loading branch information
cor11004 committed Dec 15, 2015
1 parent a2aba27 commit c73f043
Showing 1 changed file with 49 additions and 2 deletions.
51 changes: 49 additions & 2 deletions main/main.pde
Expand Up @@ -185,7 +185,49 @@ void mouseReleased() {
break;
}
}


public void colorFace(float x, float y) {
// get halfEdge
if(h != null) {
Face f = new Face(h, list);
f.printFace();
switch (colorFaceColor) {
case 0:
f.daColoring(255,255,255,list, width, height);
break;
case 1:
f.daColoring(0,0,0,list, width, height);
break;
case 2:
f.daColoring(244, 67, 54,list, width, height);
break;
case 3:
f.daColoring(76, 175, 80,list, width, height);
break;
case 4:
f.daColoring(33, 150, 243,list,width,height);
break;
case 5:
f.daColoring(156, 39, 176,list,width,height);
break;
case 6:
f.daColoring(255, 235, 59,list,width,height);
break;
case 7:
f.daColoring(103, 58, 183,list,width,height);
break;
case 8:
f.daColoring(233, 30, 99,list,width,height);
break;
case 9:
f.daColoring(63, 81, 181,list,width,height);
break;
}
}
noFill();
}
/*public void colorFace(float x, float y) {
if(colorEdge) {
for(Point p: list.getPoints()) {
if((p.getX() - 10 < x) && (p.getX() + 10 > x)) {
Expand Down Expand Up @@ -243,7 +285,7 @@ public void colorFace(float x, float y) {
}
}
noFill();
}
} */

public void insertMode(float x, float y) {
if(pointclickedbool) {
Expand Down Expand Up @@ -296,7 +338,12 @@ public void removePointMode(float x, float y) {
}
}


public void removeEdgeMode(float x, float y) {
//get edge
h.Remove();
}
/*public void removeEdgeMode(float x, float y) {
if(removeEdge) {
for(Point p: list.getPoints()) {
if((p.getX() - 10 < x) && (p.getX() + 10 > x)) {
Expand All @@ -320,4 +367,4 @@ public void removeEdgeMode(float x, float y) {
}
}
}
}
}*/

0 comments on commit c73f043

Please sign in to comment.