ProGAL.geom3d
Class Rectangle

java.lang.Object
  extended by 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

Field Summary
 Vector[] bases
           
 Point center
           
 
Constructor Summary
Rectangle(Point center, Vector[] bases)
           
 
Method Summary
static Point closestSegmentPoint(Point p11, Point p12, Point p2)
           
static Point[] closestSegmentPoint(Point p1, Point p2, Point q1, Point q2)
          28HOps at most.
 double distance_Gottschalk(Rectangle b)
           
 double distance_nonoptimized(Rectangle rect)
          670HOps
 double distance_optimized(Rectangle rect)
           
 double distance(Rectangle rect)
           
 Point[] getCorners()
          Return corners of rectangle in counter-clockwise order.
 Plane getPlane()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

center

public Point center

bases

public final Vector[] bases
Constructor Detail

Rectangle

public Rectangle(Point center,
                 Vector[] bases)
Method Detail

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)