agentland.geo
Class BoundingBox

java.lang.Object
  |
  +--agentland.geo.BoundingBox
All Implemented Interfaces:
Serializable

public class BoundingBox
extends Object
implements Serializable

See Also:
Serialized Form

Field Summary
protected  Point3D ltf
           
protected  Point3D rbb
           
protected  double rotation
          the rotation of this BoundingBox about the Z axis, in radians
 
Constructor Summary
BoundingBox(Point3D cornerA, double length, double width, double height)
           
BoundingBox(Point3D cornerA, Point3D cornerB)
           
 
Method Summary
 boolean contains(Point3D point)
          Is given point inside Manifestation?
 Point3D getCenter()
          The center of the thing, in world coordinates.
 double getDistance(Point3D point)
          Distance to point.
 double getRotation()
           
 double getRotationDegrees()
           
 boolean inTopDownProjectionBox(int x, int y)
          Point in top-down projection bounding box.
 void move(int dx, int dy, int dz)
           
 void resize(int dx, int dy, int dz)
           
 void rotate(double theta)
           
 void rotateByDegrees(double theta)
           
 void setRotation(double theta)
           
 void setRotationDegrees(double theta)
           
 Rectangle topDownProjectionBox()
          Get a top-down projection bounding box.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ltf

protected Point3D ltf

rbb

protected Point3D rbb

rotation

protected double rotation
the rotation of this BoundingBox about the Z axis, in radians
Constructor Detail

BoundingBox

public BoundingBox(Point3D cornerA,
                   Point3D cornerB)

BoundingBox

public BoundingBox(Point3D cornerA,
                   double length,
                   double width,
                   double height)
Method Detail

move

public void move(int dx,
                 int dy,
                 int dz)

resize

public void resize(int dx,
                   int dy,
                   int dz)

getRotation

public double getRotation()

getRotationDegrees

public double getRotationDegrees()

setRotation

public void setRotation(double theta)

setRotationDegrees

public void setRotationDegrees(double theta)

rotate

public void rotate(double theta)

rotateByDegrees

public void rotateByDegrees(double theta)

getCenter

public Point3D getCenter()
The center of the thing, in world coordinates.

topDownProjectionBox

public Rectangle topDownProjectionBox()
Get a top-down projection bounding box.

inTopDownProjectionBox

public boolean inTopDownProjectionBox(int x,
                                      int y)
Point in top-down projection bounding box.

getDistance

public double getDistance(Point3D point)
Distance to point.

contains

public boolean contains(Point3D point)
Is given point inside Manifestation?