ProGAL.geom3d
Class Rectangle
java.lang.Object
ProGAL.geom3d.Rectangle
public class Rectangle
- extends java.lang.Object
A planar rectangle in 3d. The only real functionality so far is the Rectangle-Rectangle distance method that
is used for RSS intersection checks.
- Author:
- P.Winter and R.Fonseca
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
center
public Point center
bases
public final Vector[] bases
Rectangle
public Rectangle(Point center,
Vector[] bases)
distance
public double distance(Rectangle rect)
distance_optimized
public double distance_optimized(Rectangle rect)
distance_nonoptimized
public double distance_nonoptimized(Rectangle rect)
- 670HOps
closestSegmentPoint
public static Point[] closestSegmentPoint(Point p1,
Point p2,
Point q1,
Point q2)
- 28HOps at most.
closestSegmentPoint
public static Point closestSegmentPoint(Point p11,
Point p12,
Point p2)
getCorners
public Point[] getCorners()
- Return corners of rectangle in counter-clockwise order.
getPlane
public Plane getPlane()
distance_Gottschalk
public double distance_Gottschalk(Rectangle b)