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.bind.*;
import edu.berkeley.qfat.geom.Point;
import com.infomatiq.jsi.IntProcedure;
}
- 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;
+ public void bindingGroupChanged() {
HashSet<E> nbg = new HashSet<E>();
- for(E eother : (Iterable<E>)newBindingGroup) nbg.add(eother);
+ for(E eother : (Iterable<E>)getBoundPeers()) nbg.add(eother);
for(E eother : nbg) {
if (next==null || prev==null) continue;
if (eother.next==null || eother.prev==null) continue;
v1.bindTo(getBindingMatrix(e), e.v1);
v2.bindTo(getBindingMatrix(e), e.v2);
/*
- e.v1.setConstraint(getConstraint());
- e.v2.setConstraint(getConstraint());
+ e.v1.setConstraint(getAffineConstraint());
+ e.v2.setConstraint(getAffineConstraint());
*/
}
}
e.v2.getE(mid).pair.pair.bindTo(e.getBindingMatrix(firste), firstq.pair);
}
/*
- first.setConstraint(firste.getConstraint());
- firstq.setConstraint(firste.getConstraint());
+ first.setConstraint(firste.getAffineConstraint());
+ firstq.setConstraint(firste.getAffineConstraint());
*/
return nearest(midpoint());
}
}
*/
/*
- first.setConstraint(firste.getConstraint());
- firstq.setConstraint(firste.getConstraint());
+ first.setConstraint(firste.getAffineConstraint());
+ firstq.setConstraint(firste.getAffineConstraint());
*/
return null;
}