checkpoint
[anneal.git] / src / edu / berkeley / qfat / MeshViewer.java
index 5110455..8c2dca8 100644 (file)
@@ -13,16 +13,31 @@ import edu.berkeley.qfat.geom.Point;
 
 public class MeshViewer extends Viewer {
 
+    public int whichNeighbor = 1;
+
+    public double temp;
+    public boolean tileon = true;
+    public boolean tilemeshon = false;
+    public boolean goalon = true;
+    public boolean anneal = false;
+    public boolean hillclimb = false;
+    public boolean neighbors = false;
+    public boolean neighborsWire = false;
+    public boolean neighborsWireOne = false;
+    public boolean errorNormals = false;
+
+    public boolean force = false;
+    public Matrix[] transforms;
+    public Mesh.Vertex[] points;
+    public int breaks = 0;
+
     public int temps;
     public int accepts;
     public    int vertss;
     protected HashSet<Mesh.T> safeTriangles = new HashSet<Mesh.T>();
 
     public MeshViewer(JFrame f) { super(f); }
-
-    /**
-     * Take care of initialization here.
-     */
+    /*
     public void init(GLAutoDrawable gld) {
         GL gl = gld.getGL();
         gl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
@@ -49,26 +64,22 @@ public class MeshViewer extends Viewer {
         gl.glLightfv(GL.GL_LIGHT5, GL.GL_POSITION, new float[] { 10.0f, -10.0f,  -10.0f, 0.0f }, 0);
         gl.glEnable(GL.GL_LIGHTING);
         gl.glEnable(GL.GL_LIGHT0);
-        /*
-        gl.glEnable(GL.GL_LIGHT1);
-        gl.glEnable(GL.GL_LIGHT2);
-        gl.glEnable(GL.GL_LIGHT3);
-        gl.glEnable(GL.GL_LIGHT4);
-        gl.glEnable(GL.GL_LIGHT5);
-        */
+
+        //gl.glEnable(GL.GL_LIGHT1);
+        //gl.glEnable(GL.GL_LIGHT2);
+        //gl.glEnable(GL.GL_LIGHT3);
+        //gl.glEnable(GL.GL_LIGHT4);
+        //gl.glEnable(GL.GL_LIGHT5);
+
         gl.glColorMaterial(GL.GL_FRONT_AND_BACK, GL.GL_AMBIENT_AND_DIFFUSE);
         gl.glEnable(GL.GL_COLOR_MATERIAL);
 
         display(gld);
     }
-
-    public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { }
-    public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) { }
+        */
     public void _display(GLAutoDrawable drawable, GL gl) {
 
         if (transforms==null) return;
-
-
         glcanvas.setSize(f.getWidth(), f.getHeight() - 100);
         Graphics2D g = (Graphics2D)f.getGraphics();
         g.setColor(Color.black);