add RTree classes
[anneal.git] / src / edu / berkeley / qfat / geom / Point.java
index d54e631..5511e44 100644 (file)
@@ -2,7 +2,7 @@ package edu.berkeley.qfat.geom;
 import javax.media.opengl.*;
 
 /** point in 3-space; immutable */
-public final class Point {
+public final class Point 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; }
@@ -16,4 +16,11 @@ public final class Point {
     private void _glVertex(GL gl) { gl.glVertex3f(x, y, z); }
     public String toString() { return "("+x+","+y+","+z+")"; }
     public int hashCode() { return Float.floatToIntBits(x) ^ Float.floatToIntBits(y) ^ Float.floatToIntBits(z); }
+
+    public float getMaxX() { return x; }
+    public float getMinX() { return x; }
+    public float getMaxY() { return y; }
+    public float getMinY() { return y; }
+    public float getMaxZ() { return z; }
+    public float getMinZ() { return z; }
 }