checkpoint
[anneal.git] / src / Main.java
index 5fae70a..bc01a06 100644 (file)
@@ -181,23 +181,23 @@ public class Main implements GLEventListener, MouseListener, MouseMotionListener
                 for(Geom.T t2 : tile) {
                     if (t1==t2) continue;
 
-                    if ((t1.p1().times(m).minus(t2.p1()).mag() < Geom.EPSILON) &&
-                        (t1.p2().times(m).minus(t2.p3()).mag() < Geom.EPSILON) &&
-                        (t1.p3().times(m).minus(t2.p2()).mag() < Geom.EPSILON)) {
+                    if ((t1.p1().p.times(m).minus(t2.p1().p).mag() < Geom.EPSILON) &&
+                        (t1.p2().p.times(m).minus(t2.p3().p).mag() < Geom.EPSILON) &&
+                        (t1.p3().p.times(m).minus(t2.p2().p).mag() < Geom.EPSILON)) {
                         t1.e1().bind(t2.e3().pair);
                         t1.e2().bind(t2.e2().pair);
                         t1.e3().bind(t2.e1().pair);
                     }
-                    if ((t1.p2().times(m).minus(t2.p1()).mag() < Geom.EPSILON) &&
-                        (t1.p3().times(m).minus(t2.p3()).mag() < Geom.EPSILON) &&
-                        (t1.p1().times(m).minus(t2.p2()).mag() < Geom.EPSILON)) {
+                    if ((t1.p2().p.times(m).minus(t2.p1().p).mag() < Geom.EPSILON) &&
+                        (t1.p3().p.times(m).minus(t2.p3().p).mag() < Geom.EPSILON) &&
+                        (t1.p1().p.times(m).minus(t2.p2().p).mag() < Geom.EPSILON)) {
                         t1.e2().bind(t2.e3().pair);
                         t1.e3().bind(t2.e2().pair);
                         t1.e1().bind(t2.e1().pair);
                     }
-                    if ((t1.p3().times(m).minus(t2.p1()).mag() < Geom.EPSILON) &&
-                        (t1.p1().times(m).minus(t2.p3()).mag() < Geom.EPSILON) &&
-                        (t1.p2().times(m).minus(t2.p2()).mag() < Geom.EPSILON)) {
+                    if ((t1.p3().p.times(m).minus(t2.p1().p).mag() < Geom.EPSILON) &&
+                        (t1.p1().p.times(m).minus(t2.p3().p).mag() < Geom.EPSILON) &&
+                        (t1.p2().p.times(m).minus(t2.p2().p).mag() < Geom.EPSILON)) {
                         t1.e3().bind(t2.e3().pair);
                         t1.e1().bind(t2.e2().pair);
                         t1.e2().bind(t2.e1().pair);
@@ -261,7 +261,7 @@ public class Main implements GLEventListener, MouseListener, MouseMotionListener
         r1 = r1 - (float)Math.floor(r1);
         r1 = r1 * (float)0.01;
         r1 = r1 - (float)0.005;
-        Geom.Vec v = p.watchback().minus(p).norm().times(r1);
+        Geom.Vec v = p.watchback().p.minus(p.p).norm().times(r1);
 
         //v = p.norm().times(v.dot(p.norm()));
 
@@ -352,7 +352,7 @@ public class Main implements GLEventListener, MouseListener, MouseMotionListener
             i++;
             if (i != 1 /*&& i!=4*/) continue;
             Geom.V p = tile.newP(0, 0, 0).times(m).register();
-            Geom.Vec v = tile.new Vec(p.x, p.y, p.z);
+            Geom.Vec v = tile.new Vec(p.p.x, p.p.y, p.p.z);
             v = v.times((float)1.04);
             gl.glTranslatef(v.x, v.y, v.z);
             draw(gl, false, tile);
@@ -387,12 +387,12 @@ public class Main implements GLEventListener, MouseListener, MouseMotionListener
                 gl.glEnd();
             } else {
                 gl.glBegin(GL.GL_LINES);
-                t.e1().p1.glVertex(gl);
-                t.e1().p2.glVertex(gl);
-                t.e2().p1.glVertex(gl);
-                t.e2().p2.glVertex(gl);
-                t.e3().p1.glVertex(gl);
-                t.e3().p2.glVertex(gl);
+                t.e1().p1.p.glVertex(gl);
+                t.e1().p2.p.glVertex(gl);
+                t.e2().p1.p.glVertex(gl);
+                t.e2().p2.p.glVertex(gl);
+                t.e3().p1.p.glVertex(gl);
+                t.e3().p2.p.glVertex(gl);
                 gl.glEnd();
             }
 
@@ -406,9 +406,9 @@ public class Main implements GLEventListener, MouseListener, MouseMotionListener
 
             if (mesh==goal)
                 for(Geom.V p : new Geom.V[] { t.p1(), t.p2(), t.p3() }) {
-                    p.glVertex(gl);
+                    p.p.glVertex(gl);
                     //p.plus(p.norm().times(p.score()*10)).glVertex(gl);
-                    p.partner().glVertex(gl);
+                    p.partner().p.glVertex(gl);
                     //tile.nearest(p).centroid().glVertex(gl);
                 }