|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.faceless.graph.BoundingBox
public final class BoundingBox
A BoundingBox
is a simple cube which
is used to define the "Bounding Box", or the smallest
cube that contains a object, on a Canvas
.
This class is used internally by the library and is of no interest to end users
Constructor Summary | |
---|---|
BoundingBox(Point[] p)
|
|
BoundingBox(Point p1,
Point p2)
Create a new Bounding Box with one corner at p1 and the other at p2 |
Method Summary | |
---|---|
Point |
center()
Return the center of the box |
boolean |
contains(BoundingBox b)
Returns true if this contains the specified bounding box. |
void |
expand(Point p)
Expand a box to include the specified point |
double |
getDepth()
Return the depth of this box |
double |
getHeight()
Return the height of this box |
double |
getMaxX()
Return the hightest X value of this box |
double |
getMaxY()
Return the hightest Y value of this box |
double |
getMaxZ()
Return the hightest Z value of this box |
double |
getMinX()
Return the lowest X value of this box |
double |
getMinY()
Return the lowest Y value of this box |
double |
getMinZ()
Return the lowest Z value of this box |
double |
getWidth()
Return the width of this box |
BoundingBox |
intersection(BoundingBox b)
Return a new bounding box that is the intersection of this and the specified box. |
BoundingBox |
superset(BoundingBox b)
Return the smallest bounding box that contains this box and the box passed as a parameter. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BoundingBox(Point p1, Point p2)
p1
- The first corner of the boxp2
- The opposite corner of the boxpublic BoundingBox(Point[] p)
Method Detail |
---|
public void expand(Point p)
public boolean contains(BoundingBox b)
public BoundingBox superset(BoundingBox b)
public BoundingBox intersection(BoundingBox b)
public Point center()
public double getMinX()
public double getMinY()
public double getMinZ()
public double getMaxX()
public double getMaxY()
public double getMaxZ()
public double getWidth()
public double getHeight()
public double getDepth()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |