/** a vertex in the mesh */
- public final class Vertex extends HasQuadric implements Visitor {
+ public final class Vertex extends HasQuadric implements Visitor, HasPoint {
public void bindTo(Matrix bindingMatrix, HasBindingGroup other) {
bindTo(bindingMatrix, other, EPSILON);
}
+ public float getMaxX() { return getPoint().getMaxX(); }
+ public float getMinX() { return getPoint().getMinX(); }
+ public float getMaxY() { return getPoint().getMaxY(); }
+ public float getMinY() { return getPoint().getMinY(); }
+ public float getMaxZ() { return getPoint().getMaxZ(); }
+ public float getMinZ() { return getPoint().getMinZ(); }
public Point p, goodp;
public Point oldp;
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;
}
}
import javax.media.opengl.*;
/** any object associated with a specific point in 3D space */
-public abstract class HasQuadric extends HasBindingGroup implements HasPoint {
+public abstract class HasQuadric extends HasBindingGroup {
public Matrix errorQuadric() { return quadric; }
public boolean quadricStale = false;
nearest_in_other_mesh = null;
}
- public float getMaxX() { return getPoint().getMaxX(); }
- public float getMinX() { return getPoint().getMinX(); }
- public float getMaxY() { return getPoint().getMaxY(); }
- public float getMinY() { return getPoint().getMinY(); }
- public float getMaxZ() { return getPoint().getMaxZ(); }
- public float getMinZ() { return getPoint().getMinZ(); }
}