public class MeshViewer extends JPanel implements GLEventListener, MouseListener, MouseMotionListener, KeyListener, MouseWheelListener {
+ Main main;
+
+
private float tz = 0;
private float anglex = 0;
private float angley = 0;
gl.glEnable(GL.GL_LIGHTING);
gl.glShadeModel(GL.GL_SMOOTH);
- for(Mesh mesh : meshes)
+ for(Mesh mesh : meshes) {
mesh.render(gl, Matrix.ONE);
+ if (main != null && main.whichNeighbor>0 && main.transforms!=null && !mesh.option_wireframe) {
+ mesh.option_wireframe = true;
+ mesh.render(gl, main.transforms[main.whichNeighbor-1]);
+ mesh.option_wireframe = false;
+ }
+ }
// highlight the point closest to the mouse; we do this here to avoid flicker
if (closest != null) {