checkpoint
[anneal.git] / src / edu / berkeley / qfat / Main.java
index d8896c2..bb5dd11 100644 (file)
@@ -12,6 +12,8 @@ import edu.berkeley.qfat.geom.Point;
 
 public class Main extends MeshViewer {
 
+    public static int verts = 0;
+
     public static final Random random = new Random();
     
     /** magnification factor */
@@ -127,23 +129,23 @@ public class Main extends MeshViewer {
                     if ((t1.v1().p.times(m).minus(t2.v1().p).mag() < Mesh.EPSILON) &&
                         (t1.v2().p.times(m).minus(t2.v3().p).mag() < Mesh.EPSILON) &&
                         (t1.v3().p.times(m).minus(t2.v2().p).mag() < Mesh.EPSILON)) {
-                        t1.e1().bind(t2.e3().pair);
-                        t1.e2().bind(t2.e2().pair);
-                        t1.e3().bind(t2.e1().pair);
+                        t1.e1().bindEdge(t2.e3());
+                        t1.e2().bindEdge(t2.e2());
+                        t1.e3().bindEdge(t2.e1());
                     }
                     if ((t1.v2().p.times(m).minus(t2.v1().p).mag() < Mesh.EPSILON) &&
                         (t1.v3().p.times(m).minus(t2.v3().p).mag() < Mesh.EPSILON) &&
                         (t1.v1().p.times(m).minus(t2.v2().p).mag() < Mesh.EPSILON)) {
-                        t1.e2().bind(t2.e3().pair);
-                        t1.e3().bind(t2.e2().pair);
-                        t1.e1().bind(t2.e1().pair);
+                        t1.e2().bindEdge(t2.e3());
+                        t1.e3().bindEdge(t2.e2());
+                        t1.e1().bindEdge(t2.e1());
                     }
                     if ((t1.v3().p.times(m).minus(t2.v1().p).mag() < Mesh.EPSILON) &&
                         (t1.v1().p.times(m).minus(t2.v3().p).mag() < Mesh.EPSILON) &&
                         (t1.v2().p.times(m).minus(t2.v2().p).mag() < Mesh.EPSILON)) {
-                        t1.e3().bind(t2.e3().pair);
-                        t1.e1().bind(t2.e2().pair);
-                        t1.e2().bind(t2.e1().pair);
+                        t1.e3().bindEdge(t2.e3());
+                        t1.e1().bindEdge(t2.e2());
+                        t1.e2().bindEdge(t2.e1());
                     }
                 }
             }
@@ -220,8 +222,6 @@ public class Main extends MeshViewer {
         }
     }
 
-    public static int verts = 0;
-
     public void anneal() throws Exception {
         int verts = 0;
         while(true) {
@@ -249,4 +249,5 @@ public class Main extends MeshViewer {
         Main main = new Main(stlf, f);
         main.anneal();
     }
+
 }
\ No newline at end of file