checkpoint
[anneal.git] / src / edu / berkeley / qfat / Mesh.java
index 3a53041..f537429 100644 (file)
@@ -215,8 +215,13 @@ public class Mesh implements Iterable<Mesh.T> {
 
     // Vertexices //////////////////////////////////////////////////////////////////////////////
 
+
     /** a vertex in the mesh */
     public final class Vertex extends HasQuadric implements Visitor {
+        public void bindTo(Matrix bindingMatrix, HasBindingGroup other) {
+            bindTo(bindingMatrix, other, EPSILON);
+        }
+
         public Point p, goodp;
         public Point oldp;
         E e;                // some edge *leaving* this point
@@ -557,6 +562,10 @@ public class Mesh implements Iterable<Mesh.T> {
     /** [UNIQUE] an edge */
     public final class E extends HasBindingGroup implements Comparable<E> {
 
+        public void bindTo(Matrix bindingMatrix, HasBindingGroup other) {
+            bindTo(bindingMatrix, other, EPSILON);
+        }
+
         public void sanity() {
             if (destroyed) return;
             if (pair!=null && (pair.v1!=v2 || pair.v2!=v1)) throw new RuntimeException();
@@ -687,8 +696,8 @@ public class Mesh implements Iterable<Mesh.T> {
                 v1.bindTo(getBindingMatrix(e), e.v1);
                 v2.bindTo(getBindingMatrix(e), e.v2);
                 /*
-                e.v1.setConstraint(getConstraint());
-                e.v2.setConstraint(getConstraint());
+                e.v1.setConstraint(getAffineConstraint());
+                e.v2.setConstraint(getAffineConstraint());
                 */
             }
         }
@@ -732,8 +741,8 @@ public class Mesh implements Iterable<Mesh.T> {
                 e.v2.getE(mid).pair.pair.bindTo(e.getBindingMatrix(firste), firstq.pair);
             }
             /*
-            first.setConstraint(firste.getConstraint());
-            firstq.setConstraint(firste.getConstraint());
+            first.setConstraint(firste.getAffineConstraint());
+            firstq.setConstraint(firste.getAffineConstraint());
             */
             return nearest(midpoint());
         }
@@ -1065,8 +1074,8 @@ public class Mesh implements Iterable<Mesh.T> {
             }
             */
             /*
-            first.setConstraint(firste.getConstraint());
-            firstq.setConstraint(firste.getConstraint());
+            first.setConstraint(firste.getAffineConstraint());
+            firstq.setConstraint(firste.getAffineConstraint());
             */
             return null;
         }