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

src/edu/berkeley/qfat/bind/HasQuadric.java
src/edu/berkeley/qfat/geom/HasPoint.java
src/edu/berkeley/qfat/geom/Point.java

index d5c32da..1b13c33 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 HasPoint {
+public abstract class HasQuadric extends HasBindingGroup implements HasPoint {
 
     public Matrix errorQuadric() { return quadric; }
     public boolean quadricStale = false;
 
     public Matrix errorQuadric() { return quadric; }
     public boolean quadricStale = false;
@@ -81,4 +81,11 @@ public abstract class HasQuadric extends HasPoint {
         nearest_in_other_mesh.computeError();
         nearest_in_other_mesh = null;
     }
         nearest_in_other_mesh.computeError();
         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(); }
 }
 }
index f086c68..203195c 100644 (file)
@@ -2,13 +2,6 @@ package 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 HasPoint extends edu.berkeley.qfat.bind.HasBindingGroup implements HasBoundingBox {
-    public abstract Point getPoint();
-    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 String toString() { return getPoint().toString(); }
+public interface HasPoint extends HasBoundingBox {
+    public Point getPoint();
 }
 }
index bb149be..b98fb2d 100644 (file)
@@ -3,7 +3,7 @@ import javax.media.opengl.*;
 import javax.media.opengl.glu.*;
 
 /** point in 3-space; immutable */
 import javax.media.opengl.glu.*;
 
 /** point in 3-space; immutable */
-public final class Point extends HasPoint implements HasBoundingBox, AffineConstraint {
+public final class Point implements HasBoundingBox, AffineConstraint, HasPoint {
 
     public static final Point ZERO = new Point(0,0,0);
 
 
     public static final Point ZERO = new Point(0,0,0);
 
@@ -41,5 +41,6 @@ public final class Point extends HasPoint implements HasBoundingBox, AffineConst
         return new AffineConstraint.Nothing();
     }
     public AffineConstraint multiply(Matrix m) { return m.times(this); }
         return new AffineConstraint.Nothing();
     }
     public AffineConstraint multiply(Matrix m) { return m.times(this); }
+
 }
 
 }