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());
}