|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjme.geometry.bounding.BoundingBox
BoundingBox defines a bounding volume that contains
all vertices that make up the geometry.
| Constructor Summary | |
BoundingBox()
Default constructor instantiates a new BoundingBox
object with default (0,0,0) vectors. |
|
BoundingBox(Vector center,
Vector minPoint,
Vector maxPoint)
Constructor creates a new BoundingBox object
with the defined attributes. |
|
| Method Summary | |
void |
axisAligned(Vector[] points)
axisAligned creates a minimal box around all
supplied points. |
float |
distance(BoundingVolume volume)
|
Vector |
getCenter()
getCenter returns the center (in relation to the
parent entity) of the bounding box. |
Vector |
getMaxPoint()
getMaxPoint returns the maxPoint of maximum point of
the box. |
Vector |
getMinPoint()
getMinPoint returns the minPoint or minimum point of
the bounding box. |
boolean |
hasCollision(BoundingVolume volume)
|
boolean |
isVisible(Frustum frustum)
|
void |
setCenter(Vector center)
setCenter sets the center of the bounding box. |
void |
setMaxPoint(Vector maxPoint)
setMaxPoint sets the new maximum point of the box. |
void |
setMinPoint(Vector minPoint)
setMinPoint sets the minPoint or maximum point of the
bounding box. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BoundingBox()
BoundingBox
object with default (0,0,0) vectors.
public BoundingBox(Vector center,
Vector minPoint,
Vector maxPoint)
BoundingBox object
with the defined attributes.
center - the center of the box.minPoint - the minimum point of the box.maxPoint - the maximum point of the box.| Method Detail |
public void axisAligned(Vector[] points)
axisAligned creates a minimal box around all
supplied points. The orientation is always aligned with the
local entity's coordinate system and therefore is axis
aligned.
points - the list of points to contain.public Vector getMinPoint()
getMinPoint returns the minPoint or minimum point of
the bounding box.
public void setMinPoint(Vector minPoint)
setMinPoint sets the minPoint or maximum point of the
bounding box.
minPoint - the new minPoint point of the box.public Vector getCenter()
getCenter returns the center (in relation to the
parent entity) of the bounding box.
public void setCenter(Vector center)
setCenter sets the center of the bounding box.
center - the new center of the bounding box.public Vector getMaxPoint()
getMaxPoint returns the maxPoint of maximum point of
the box.
public void setMaxPoint(Vector maxPoint)
setMaxPoint sets the new maximum point of the box.
maxPoint - the new maxPoint of the box.public boolean hasCollision(BoundingVolume volume)
hasCollision in interface BoundingVolumepublic float distance(BoundingVolume volume)
distance in interface BoundingVolumepublic boolean isVisible(Frustum frustum)
isVisible in interface BoundingVolume
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||