checkpoint
authoradam <adam@megacz.com>
Mon, 7 Jul 2008 19:53:11 +0000 (12:53 -0700)
committeradam <adam@megacz.com>
Mon, 7 Jul 2008 19:53:11 +0000 (12:53 -0700)
darcs-hash:20080707195311-5007d-ce3a018bcb250abf437c7e5a9214fdb52344bcdf.gz

src/edu/berkeley/qfat/Mesh.java
src/edu/berkeley/qfat/bind/BindingGroup.java
src/edu/berkeley/qfat/bind/HasQuadric.java

index f537429..926a5b7 100644 (file)
@@ -217,10 +217,16 @@ public class Mesh implements Iterable<Mesh.T> {
 
 
     /** a vertex in the mesh */
 
 
     /** 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 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;
 
         public Point p, goodp;
         public Point oldp;
index 00a7dd7..501fb81 100644 (file)
@@ -1,6 +1,5 @@
 package edu.berkeley.qfat.bind;
 import edu.berkeley.qfat.geom.*;
 package edu.berkeley.qfat.bind;
 import edu.berkeley.qfat.geom.*;
-import javax.media.opengl.*;
 import java.util.*;
 
 /**
 import java.util.*;
 
 /**
@@ -22,7 +21,7 @@ class BindingGroup<T extends HasBindingGroup> implements Iterable<T> {
      */
     private HashMap<T,Matrix>  matrices   = new HashMap<T,Matrix>();
 
      */
     private HashMap<T,Matrix>  matrices   = new HashMap<T,Matrix>();
 
-    public BindingGroup(T master) {
+    BindingGroup(T master) {
         this.master = master;
         matrices.put(master, Matrix.ONE);
     }
         this.master = master;
         matrices.put(master, Matrix.ONE);
     }
@@ -54,19 +53,19 @@ class BindingGroup<T extends HasBindingGroup> implements Iterable<T> {
         bg.matrices = null;
     }
 
         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 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());
     }
 
         //                    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));
     }
 
         return constraint.multiply(matrices.get(t));
     }
 
@@ -97,7 +96,7 @@ class BindingGroup<T extends HasBindingGroup> implements Iterable<T> {
         matrices = newmatrices;
     }
 
         matrices = newmatrices;
     }
 
-    public boolean contains(HasBindingGroup t) {
+    boolean contains(HasBindingGroup t) {
         return matrices.get((T)t) != null;
     }
 }
         return matrices.get((T)t) != null;
     }
 }
index 1b13c33..afd2823 100644 (file)
@@ -3,7 +3,7 @@ import edu.berkeley.qfat.geom.*;
 import javax.media.opengl.*;
 
 /** any object associated with a specific point in 3D space */
 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;
 
     public Matrix errorQuadric() { return quadric; }
     public boolean quadricStale = false;
@@ -82,10 +82,4 @@ public abstract class HasQuadric extends HasBindingGroup implements HasPoint {
         nearest_in_other_mesh = null;
     }
 
         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(); }
 }
 }