|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.rico.engine.geometry.collision.BoundingBox
public class BoundingBox
This class can be used as a bounding box for a mesh. The bounding box is
aligned to the original world axis and stays that way, i.e. the box will not
be rotated along with the meshes rotation this axis belongs to.
Constructor Summary | |
---|---|
BoundingBox(AbstractMesh mesh)
Creates a bounding box for the meshes current triangle coordinates |
Method Summary | |
---|---|
void |
draw(javax.media.opengl.GL gl)
Draws the bounding volume |
float |
getBackZ()
Returns the back z value of the bounding box. |
float |
getBottomY()
Returns the bottom y-coordinate of the bounding box. |
Point3D |
getCenter()
Returns the center point of the bounding volume |
float |
getFrontZ()
Returns the front z-coordinate of the bounding box. |
float |
getHeight()
Returns the height of the bounding box. |
float |
getLeftX()
Returns the most left x-coordinate of the bounding box. |
float |
getLength()
Returns the length of the bounding box. |
float |
getMeshBottom()
|
float |
getMeshHeight()
Returns the height of the mesh that is bounded by the bounding volume. |
float |
getRightX()
Returns the most right x value of the bounding box. |
float |
getTopY()
Returns the top y value of the bounding box. |
float |
getWidth()
Returns the width of the bounding box. |
boolean |
isWithinFrustum(ViewingFrustum frustum)
Determines whether the bounding volume is inside the viewing frustum. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BoundingBox(AbstractMesh mesh)
mesh
- mesh to create a bounding box forMethod Detail |
---|
public float getMeshBottom()
public float getLeftX()
public float getRightX()
public float getBottomY()
public float getTopY()
public float getFrontZ()
public float getBackZ()
public float getMeshHeight()
BoundingVolumeIface
getMeshHeight
in interface BoundingVolumeIface
public float getWidth()
public float getHeight()
public float getLength()
public Point3D getCenter()
BoundingVolumeIface
getCenter
in interface BoundingVolumeIface
public boolean isWithinFrustum(ViewingFrustum frustum)
BoundingVolumeIface
isWithinFrustum
in interface BoundingVolumeIface
frustum
- viewing frustum object which is coupled
to the camera objectpublic void draw(javax.media.opengl.GL gl)
BoundingVolumeIface
draw
in interface BoundingVolumeIface
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |