|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.rico.engine.geometry.collision.BoundingSphere
public class BoundingSphere
This class describes a bounding sphere that can be used for collision
detection between meshes or frustum culling.
Constructor Summary | |
---|---|
BoundingSphere(AbstractMesh mesh)
|
Method Summary | |
---|---|
void |
draw(javax.media.opengl.GL gl)
Draws the bounding volume |
Point3D |
getCenter()
Returns the center point of the bounding volume |
float |
getMeshHeight()
Returns the height of the mesh that is bounded by the bounding volume. |
float |
getRadius()
Returns the radius of the sphere. |
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 BoundingSphere(AbstractMesh mesh)
Method Detail |
---|
public float getMeshHeight()
BoundingVolumeIface
getMeshHeight
in interface BoundingVolumeIface
public Point3D getCenter()
BoundingVolumeIface
getCenter
in interface BoundingVolumeIface
public float getRadius()
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 |