checkpoint
authoradam <adam@megacz.com>
Sun, 6 Jul 2008 21:52:52 +0000 (14:52 -0700)
committeradam <adam@megacz.com>
Sun, 6 Jul 2008 21:52:52 +0000 (14:52 -0700)
darcs-hash:20080706215252-5007d-157641318af9fd34c428287b331e1e76e36c1dcc.gz

src/edu/berkeley/qfat/MeshViewer.java

index a0e9c61..57d1543 100644 (file)
@@ -13,6 +13,9 @@ import edu.berkeley.qfat.geom.Point;
 
 public class MeshViewer extends JPanel implements GLEventListener, MouseListener, MouseMotionListener, KeyListener, MouseWheelListener {
 
 
 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;
     private float tz = 0;
     private float anglex = 0;
     private float angley = 0;
@@ -94,8 +97,14 @@ public class MeshViewer extends JPanel implements GLEventListener, MouseListener
 
         gl.glEnable(GL.GL_LIGHTING);
         gl.glShadeModel(GL.GL_SMOOTH);
 
         gl.glEnable(GL.GL_LIGHTING);
         gl.glShadeModel(GL.GL_SMOOTH);
-        for(Mesh mesh : meshes)
+        for(Mesh mesh : meshes) {
             mesh.render(gl, Matrix.ONE);
             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) {
 
         // highlight the point closest to the mouse; we do this here to avoid flicker
         if (closest != null) {