|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjme.geometry.bounding.BoundingCapsule
BoundingCapsule
defines a bounding volume in the shape of
a capsule, where a capsule is an extension of sphere. A capsule can be
thought of as a cylinder with domed caps.
Constructor Summary | |
BoundingCapsule()
Default constructor instantiates an empty bounding capsule. |
|
BoundingCapsule(Line lineSegment,
float radius)
Constructor instantiates a new BoundingCapsule with
supplied attributes of line segment and radius. |
Method Summary | |
float |
distance(BoundingVolume volume)
|
Vector |
getDirection()
getDirection gets the direction vector of the line
segment that makes up the capsule. |
Vector |
getOrigin()
getOrigin gets the origin of the line segment that
makes up the capsule. |
float |
getRadius()
getRadius gets the radius of the capsule. |
boolean |
hasCollision(BoundingVolume volume)
|
boolean |
isVisible(Frustum frustum)
|
void |
leastSquaresFit(Vector[] points)
leastSquaresFit selects a parameterized equation
that represents a discrete set of points in a continuous manner. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BoundingCapsule()
leastSquaresFit
method with an array of points.
public BoundingCapsule(Line lineSegment, float radius)
BoundingCapsule
with
supplied attributes of line segment and radius.
lineSegment
- the line defining the length of center of the
capsule.radius
- the radius of the capsule.Method Detail |
public Vector getOrigin()
getOrigin
gets the origin of the line segment that
makes up the capsule.
public Vector getDirection()
getDirection
gets the direction vector of the line
segment that makes up the capsule.
public float getRadius()
getRadius
gets the radius of the capsule.
public void leastSquaresFit(Vector[] points)
leastSquaresFit
selects a parameterized equation
that represents a discrete set of points in a continuous manner.
The radius is then found to be the maximum distance from the
data points to the line.
points
- the points to contain.public boolean hasCollision(BoundingVolume volume)
hasCollision
in interface BoundingVolume
public float distance(BoundingVolume volume)
distance
in interface BoundingVolume
public boolean isVisible(Frustum frustum)
isVisible
in interface BoundingVolume
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |