|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jme.bounding.OBB2
Started Date: Sep 5, 2004
This class is like an OrientedBoundingBox, but lacks the overhead of
extending TriMesh.
| Field Summary | |
Vector3f |
center
Center of the Oriented Box. |
Vector3f |
extent
Extents of the box along the x,y,z axis. |
Vector3f |
xAxis
X axis of the Oriented Box. |
Vector3f |
yAxis
Y axis of the Oriented Box. |
Vector3f |
zAxis
Z axis of the Oriented Box. |
| Constructor Summary | |
OBB2()
|
|
| Method Summary | |
java.lang.Object |
clone(BoundingVolume store)
clone creates a new BoundingVolume object containing the
same data as this one. |
void |
computeCorners()
Sets the vectorStore information to the 8 corners of the box. |
void |
computeFromPoints(Vector3f[] points)
computeFromPoints generates a bounding volume that
encompasses a collection of points. |
void |
computeFromTris(com.jme.bounding.OBBTree.TreeTriangle[] tris,
int start,
int end)
|
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 |
intersection(OBB2 box1)
|
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(Matrix3f rotate,
Vector3f translate,
Vector3f scale,
BoundingVolume store)
|
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public final Vector3f center
public final Vector3f xAxis
public final Vector3f yAxis
public final Vector3f zAxis
public final Vector3f extent
| Constructor Detail |
public OBB2()
| Method Detail |
public BoundingVolume transform(Quaternion rotate,
Vector3f translate,
Vector3f scale)
BoundingVolumetransform alters the location of the bounding volume by a
rotation, translation and a scalar.
transform in interface BoundingVolumerotate - 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)
BoundingVolumetransform alters the location of the bounding volume by a
rotation, translation and a scalar.
transform in interface BoundingVolumerotate - 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 BoundingVolume transform(Matrix3f rotate,
Vector3f translate,
Vector3f scale,
BoundingVolume store)
public int whichSide(Plane plane)
BoundingVolumewhichSide returns the side on which the bounding volume
lies on a plane. Possible values are POSITIVE_SIDE, NEGATIVE_SIDE, and
NO_SIDE.
whichSide in interface BoundingVolumeplane - the plane to check against this bounding volume.
Pointpublic void computeFromPoints(Vector3f[] points)
BoundingVolumecomputeFromPoints generates a bounding volume that
encompasses a collection of points.
computeFromPoints in interface BoundingVolumepoints - the points to contain.public BoundingVolume merge(BoundingVolume volume)
BoundingVolumemerge combines two bounding volumes into a single bounding
volume that contains both this bounding volume and the parameter volume.
merge in interface BoundingVolumevolume - the volume to combine.
public BoundingVolume mergeLocal(BoundingVolume volume)
BoundingVolumemergeLocal combines two bounding volumes into a single
bounding volume that contains both this bounding volume and the parameter
volume. The result is stored locally.
mergeLocal in interface BoundingVolumevolume - the volume to combine.
public java.lang.Object clone(BoundingVolume store)
BoundingVolumeclone creates a new BoundingVolume object containing the
same data as this one.
clone in interface BoundingVolumestore - where to store the cloned information. if null or wrong class,
a new store is created.
public void initCheckPlanes()
BoundingVolumeinitCheckPlanes resets the checkplanes to their standard
order.
initCheckPlanes in interface BoundingVolumepublic int getCheckPlane(int index)
BoundingVolume
getCheckPlane in interface BoundingVolumeindex -
public void setCheckPlane(int index,
int value)
BoundingVolume
setCheckPlane in interface BoundingVolumeindex - value - public void recomputeMesh()
BoundingVolume
recomputeMesh in interface BoundingVolumepublic float distanceTo(Vector3f point)
BoundingVolume
distanceTo in interface BoundingVolumepoint - The point to get the distance to
public Vector3f getCenter(Vector3f store)
BoundingVolume
getCenter in interface BoundingVolumestore - The vector to store the center in.public void computeCorners()
public void computeFromTris(com.jme.bounding.OBBTree.TreeTriangle[] tris,
int start,
int end)
public boolean intersection(OBB2 box1)
public boolean intersects(BoundingVolume bv)
BoundingVolume
intersects in interface BoundingVolumebv - the second volume to test against.
public boolean intersectsSphere(BoundingSphere bs)
BoundingVolume
intersectsSphere in interface BoundingVolumebs - the bounding sphere to test against.
public boolean intersectsBoundingBox(BoundingBox bb)
BoundingVolume
intersectsBoundingBox in interface BoundingVolumebb - the bounding box to test against.
public boolean intersectsOrientedBoundingBox(OrientedBoundingBox obb)
BoundingVolume
intersectsOrientedBoundingBox in interface BoundingVolumeobb - the bounding box to test against.
public boolean intersectsOBB2(OBB2 obb)
BoundingVolume
intersectsOBB2 in interface BoundingVolumeobb - the bounding box to test against.
public boolean intersects(Ray ray)
BoundingVolume
intersects in interface BoundingVolumeray - the ray to test.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||