package edu.berkeley.qfat.bind;
import edu.berkeley.qfat.geom.*;
-import javax.media.opengl.*;
import java.util.*;
/**
*/
private HashMap<T,Matrix> matrices = new HashMap<T,Matrix>();
- public BindingGroup(T master) {
+ BindingGroup(T master) {
this.master = master;
matrices.put(master, Matrix.ONE);
}
bg.matrices = null;
}
- public Matrix getMatrix(T t) { return matrices.get(t); }
+ Matrix getMatrix(T t) { return matrices.get(t); }
public Iterator<T> iterator() { return matrices.keySet().iterator(); }
/** t1 = getMatrix(t1, t2) * t2 */
- public Matrix getMatrix(T t1, T t2) {
+ Matrix getMatrix(T t1, T t2) {
// t1 = getMatrix(t1) * master
// getMatrix(t2)^-1 * t2 = master
// t1 = getMatrix(t1) * getMatrix(t2)^-1 * t2
return getMatrix(t1).times(getMatrix(t2).inverse());
}
- public AffineConstraint getAffineConstraint(T t) {
+ AffineConstraint getAffineConstraint(T t) {
return constraint.multiply(matrices.get(t));
}
matrices = newmatrices;
}
- public boolean contains(HasBindingGroup t) {
+ boolean contains(HasBindingGroup t) {
return matrices.get((T)t) != null;
}
}