checkpoint
[anneal.git] / src / edu / berkeley / qfat / Mesh.java
index 374f012..94b4e73 100644 (file)
@@ -11,8 +11,8 @@ import edu.berkeley.qfat.geom.Point;
 
 public class Mesh implements Iterable<Mesh.T> {
 
-    public static float EPSILON = (float)0.0001;
-    public static Random random = new Random();
+    public static final float EPSILON = (float)0.0001;
+    public static final Random random = new Random();
 
     private PointSet<Vert> pointset = new PointSet<Vert>();
 
@@ -198,7 +198,6 @@ public class Mesh implements Iterable<Mesh.T> {
                 float newy = m.e*p.x + m.f*p.y + m.g*p.z + m.h;
                 float newz = m.i*p.x + m.j*p.y + m.k*p.z + m.l;
                 this.p = new Point(newx, newy, newz);
-                // FIXME: what if we move onto exactly where another point is?
                 pointset.add(this);
             } catch (Exception e) {
                 throw new RuntimeException(e);
@@ -305,6 +304,7 @@ public class Mesh implements Iterable<Mesh.T> {
         E next;  // next half-edge
         E pair;  // partner half-edge
         public BindingGroup bg = new BindingGroup(this);
+        boolean shattered = false;
 
         public int compareTo(E e) { return e.length() > length() ? 1 : -1; }
 
@@ -320,7 +320,6 @@ public class Mesh implements Iterable<Mesh.T> {
             }
         }
 
-        boolean shattered = false;
         public Point shatter() { return shatter(midpoint(), null, null); }
         public Point shatter(Point mid, BindingGroup bg1, BindingGroup bg2) {
             if (shattered) return mid;