checkpoint
[anneal.git] / src / edu / berkeley / qfat / Mesh.java
index 94b4e73..08d89e7 100644 (file)
@@ -135,6 +135,17 @@ public class Mesh implements Iterable<Mesh.T> {
         float oldscore = 0;
         boolean inserted = false;
 
+        public Matrix quadric() {
+            Matrix m = new Matrix(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+            E e = this.e;
+            do {
+                T t = e.t;
+                m = m.plus(t.norm().fundamentalQuadric(t.centroid()));
+                e = e.pair.next;
+            } while(e != this.e);
+            return m;
+        }
+
         public Point getPoint() { return p; }
         private Vert(Point p) {
             this.p = p;