--- /dev/null
+package edu.berkeley.qfat.geom;
+import javax.media.opengl.*;
+
+/** a line segment defined by two points in space */
+public class Segment implements HasBoundingBox {
+
+ public final Point p1;
+ public final Point p2;
+
+ public Segment(Point p1, Point p2) { this.p1 = p1; this.p2 = p2; }
+
+ public float getMaxX() { return Math.max(p1.x, p2.x); }
+ public float getMinX() { return Math.min(p1.x, p2.x); }
+ public float getMaxY() { return Math.max(p1.y, p2.y); }
+ public float getMinY() { return Math.min(p1.y, p2.y); }
+ public float getMaxZ() { return Math.max(p1.z, p2.z); }
+ public float getMinZ() { return Math.min(p1.z, p2.z); }
+
+}