|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
BoundingVolume defines an interface for dealing with
containment of a collection of points.
| Method Summary | |
java.lang.Object |
clone(BoundingVolume store)
clone creates a new BoundingVolume object containing the
same data as this one. |
void |
computeFromPoints(Vector3f[] points)
computeFromPoints generates a bounding volume that
encompasses a collection of points. |
float |
distanceTo(Vector3f point)
Find the distance from the center of this Bounding Volume to the given point. |
Vector3f |
getCenter(Vector3f store)
This function stores the approximate center of the bounding volume into the store vector. |
int |
getCheckPlane(int index)
get the value for a given index in the checkplanes |
void |
initCheckPlanes()
initCheckPlanes resets the checkplanes to their standard
order. |
boolean |
intersects(BoundingVolume bv)
determines if this bounding volume and a second given volume are intersecting. |
boolean |
intersects(Ray ray)
determines if a ray intersects this bounding volume. |
boolean |
intersectsBoundingBox(BoundingBox bb)
determines if this bounding volume and a given bounding box are intersecting. |
boolean |
intersectsOBB2(OBB2 obb)
determines if this bounding volume and a given oriented bounding box are intersecting. |
boolean |
intersectsOrientedBoundingBox(OrientedBoundingBox obb)
determines if this bounding volume and a given oriented bounding box are intersecting. |
boolean |
intersectsSphere(BoundingSphere bs)
determines if this bounding volume and a given bounding sphere are intersecting. |
BoundingVolume |
merge(BoundingVolume volume)
merge combines two bounding volumes into a single bounding
volume that contains both this bounding volume and the parameter volume. |
BoundingVolume |
mergeLocal(BoundingVolume volume)
mergeLocal combines two bounding volumes into a single
bounding volume that contains both this bounding volume and the parameter
volume. |
void |
recomputeMesh()
Reconstruct a visible mesh for the bound. |
void |
setCheckPlane(int index,
int value)
set the value for a given index in the checkplanes |
BoundingVolume |
transform(Quaternion rotate,
Vector3f translate,
Vector3f scale)
transform alters the location of the bounding volume by a
rotation, translation and a scalar. |
BoundingVolume |
transform(Quaternion rotate,
Vector3f translate,
Vector3f scale,
BoundingVolume store)
transform alters the location of the bounding volume by a
rotation, translation and a scalar. |
int |
whichSide(Plane plane)
whichSide returns the side on which the bounding volume
lies on a plane. |
| Method Detail |
public BoundingVolume transform(Quaternion rotate,
Vector3f translate,
Vector3f scale)
transform alters the location of the bounding volume by a
rotation, translation and a scalar.
rotate - the rotation to affect the bound.translate - the translation to affect the bound.scale - the scale to resize the bound.
public BoundingVolume transform(Quaternion rotate,
Vector3f translate,
Vector3f scale,
BoundingVolume store)
transform alters the location of the bounding volume by a
rotation, translation and a scalar.
rotate - the rotation to affect the bound.translate - the translation to affect the bound.scale - the scale to resize the bound.store - sphere to store result in
public int whichSide(Plane plane)
whichSide returns the side on which the bounding volume
lies on a plane. Possible values are POSITIVE_SIDE, NEGATIVE_SIDE, and
NO_SIDE.
plane - the plane to check against this bounding volume.
Pointpublic void computeFromPoints(Vector3f[] points)
computeFromPoints generates a bounding volume that
encompasses a collection of points.
points - the points to contain.public BoundingVolume merge(BoundingVolume volume)
merge combines two bounding volumes into a single bounding
volume that contains both this bounding volume and the parameter volume.
volume - the volume to combine.
public BoundingVolume mergeLocal(BoundingVolume volume)
mergeLocal combines two bounding volumes into a single
bounding volume that contains both this bounding volume and the parameter
volume. The result is stored locally.
volume - the volume to combine.
public java.lang.Object clone(BoundingVolume store)
clone creates a new BoundingVolume object containing the
same data as this one.
store - where to store the cloned information. if null or wrong class,
a new store is created.
public void initCheckPlanes()
initCheckPlanes resets the checkplanes to their standard
order.
public int getCheckPlane(int index)
index -
public void setCheckPlane(int index,
int value)
index - value - public void recomputeMesh()
public float distanceTo(Vector3f point)
point - The point to get the distance to
public Vector3f getCenter(Vector3f store)
store - The vector to store the center in.public boolean intersects(BoundingVolume bv)
bv - the second volume to test against.
public boolean intersects(Ray ray)
ray - the ray to test.
public boolean intersectsSphere(BoundingSphere bs)
bs - the bounding sphere to test against.
public boolean intersectsBoundingBox(BoundingBox bb)
bb - the bounding box to test against.
public boolean intersectsOrientedBoundingBox(OrientedBoundingBox obb)
obb - the bounding box to test against.
public boolean intersectsOBB2(OBB2 obb)
obb - the bounding box to test against.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||