import javax.media.opengl.*;
import javax.media.opengl.glu.*;
import edu.berkeley.qfat.geom.*;
+import edu.berkeley.qfat.geom.HasBindingGroup;
import edu.wlu.cs.levy.CG.KDTree;
import edu.berkeley.qfat.geom.Point;
import com.infomatiq.jsi.IntProcedure;
for(Vertex p : (Iterable<Vertex>)getBoundPeers())
if (good || ignoreProblems) p.reComputeErrorAround();
- else p.transform(p.oldp, true);
+ else p.transform(p.oldp, true);
return good;
}
}
/** [UNIQUE] an edge */
- public final class E implements Comparable<E> {
+ public final class E extends HasBindingGroup implements Comparable<E> {
public final Vertex p1, p2;
T t; // triangle to our "left"
public boolean intersects(T t) { return t.intersects(p1.p, p2.p); }
+ public void bindingGroupChanged(edu.berkeley.qfat.geom.BindingGroup newBindingGroup_) {
+ edu.berkeley.qfat.geom.BindingGroup<E> newBindingGroup = (edu.berkeley.qfat.geom.BindingGroup<E>)newBindingGroup_;
+ if (newBindingGroup==null) return;
+ if (this==newBindingGroup.getMaster()) return;
+ for(E eother : (Iterable<E>)newBindingGroup) {
+ this.next.bindTo(newBindingGroup.getMatrix(eother), eother.next);
+ this.prev.bindTo(newBindingGroup.getMatrix(eother), eother.prev);
+ }
+ }
+
public float stretchRatio() {
Vertex nearest = error_against.nearest(midpoint());
float nearest_distance = midpoint().distance(nearest.p);
return nearest_distance/other_distance;
}
public float comparator() {
-
-
return length();
//return t==null?0:(1/t.aspect());
}
public final float a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p;
/** the zero matrix */
- public static final Matrix ZERO = new Matrix(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+ public static final Matrix ZERO = new Matrix(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
/** the identity matrix */
- public static final Matrix ONE = new Matrix(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);
+ public static final Matrix ONE = new Matrix(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);
+
+ /** the identity matrix */
+ public static final Matrix NEGATIVE_ONE = new Matrix(-1,0,0,0,0,-1,0,0,0,0,-1,0,0,0,0,1);
public Matrix(float a, float b, float c, float d, float e, float f, float g,
float h, float i, float j, float k, float l, float m, float n, float o, float p) {