public Mesh.Vert[] points;
+ public boolean breaks = false;
boolean alt = false;
boolean shift = false;
boolean control = false;
case KeyEvent.VK_CONTROL: control = true; break;
case KeyEvent.VK_ALT: alt = true; break;
case KeyEvent.VK_SHIFT: shift = true; break;
+ case KeyEvent.VK_SPACE: breaks = true; break;
}
}
public void keyReleased(KeyEvent e) {
t.glVertices(gl);
gl.glEnd();
} else {
+ /*
gl.glDisable(GL.GL_LIGHTING);
gl.glBegin(GL.GL_LINES);
gl.glColor3f(1, 1, 1);
t.e3().p2.p.glVertex(gl);
gl.glEnd();
gl.glEnable(GL.GL_LIGHTING);
+ */
}
Point centroid = t.centroid();
if (mesh==goal)
for(Mesh.Vert p : new Mesh.Vert[] { t.v1(), t.v2(), t.v3() }) {
- //p.p.glVertex(gl);
- //p.plus(p.norm().times(p.score()*10)).glVertex(gl);
- //p.partner().p.glVertex(gl);
+ gl.glDisable(GL.GL_LIGHTING);
+ gl.glBegin(GL.GL_LINES);
+ gl.glColor3f(1, 1, 1);
+ p.p.glVertex(gl);
+ //p.p.plus(p.norm().times(p.score())).glVertex(gl);
+ if (p.nearest_in_other_mesh != null) p.nearest_in_other_mesh.p.glVertex(gl);
//tile.nearest(p).centroid().glVertex(gl);
+ gl.glEnd();
+ gl.glEnable(GL.GL_LIGHTING);
}
gl.glEnd();
glcanvas = new GLCanvas();
glcanvas.addGLEventListener(this);
f.add(glcanvas, BorderLayout.CENTER);
- f.pack();
- f.show();
- f.setSize(900, 900);
- f.doLayout();
glcanvas.addMouseListener(this);
glcanvas.addMouseMotionListener(this);
glcanvas.addMouseWheelListener(this);