checkpoint
[anneal.git] / src / edu / berkeley / qfat / geom / Point.java
index 1a4ac79..a4bc276 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 implements HasBoundingBox {
+public final class Point extends HasPoint implements HasBoundingBox {
     public final float x, y, z;
     public Point(double x, double y, double z) { this((float)x, (float)y, (float)z); }
     public Point(float x, float y, float z) { this.x = x; this.y = y; this.z = z; }
     public final float x, y, z;
     public Point(double x, double y, double z) { this((float)x, (float)y, (float)z); }
     public Point(float x, float y, float z) { this.x = x; this.y = y; this.z = z; }
@@ -23,6 +23,8 @@ public final class Point implements HasBoundingBox {
     public boolean equals(Object o) { return o!=null && (o instanceof Point) && ((Point)o).x==x && ((Point)o).y==y && ((Point)o).z==z; }
     public int hashCode() { return Float.floatToIntBits(x) ^ Float.floatToIntBits(y) ^ Float.floatToIntBits(z); }
 
     public boolean equals(Object o) { return o!=null && (o instanceof Point) && ((Point)o).x==x && ((Point)o).y==y && ((Point)o).z==z; }
     public int hashCode() { return Float.floatToIntBits(x) ^ Float.floatToIntBits(y) ^ Float.floatToIntBits(z); }
 
+    public Point getPoint() { return this; }
+
     public float getMaxX() { return x; }
     public float getMinX() { return x; }
     public float getMaxY() { return y; }
     public float getMaxX() { return x; }
     public float getMinX() { return x; }
     public float getMaxY() { return y; }