+ public Vec norm() {
+ Vec norm = new Vec(0, 0, 0);
+ E e = this.e;
+ do {
+ if (e.t != null) norm = norm.plus(e.t.norm().times((float)e.prev.angle()));
+ e = e.pair.next;
+ } while(e != this.e);
+ return norm.norm();
+ }
+ V bound_to = this;
+ }
+
+ public class P {
+ float x, y, z;
+
+ int watch_count;
+ float watch_x;
+ float watch_y;
+ float watch_z;
+ V watch;
+
+ E e; // some edge *leaving* this point
+ M binding = new M();
+
+ float oldscore = 0;
+
+ boolean inserted = false;
+ public float distance(P p) { return distance(p.x, p.y, p.z); }
+ public float distance(float ox, float oy, float oz) { return (float)Math.sqrt((x-ox)*(x-ox)+(y-oy)*(y-oy)+(z-oz)*(z-oz)); }
+
+ public V register() { V v = ps.get(this); return v==null ? new V(this) : v; }
+
+ public P times(M m) { return m.times(this); }