|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jme.bounding.BoundingVolume
com.jme.bounding.OrientedBoundingBox
public class OrientedBoundingBox
Started Date: Sep 5, 2004
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.jme.bounding.BoundingVolume |
|---|
BoundingVolume.Type |
| Field Summary | |
|---|---|
boolean |
correctCorners
If true, the box's vectorStore array correctly represents the box's corners. |
Vector3f |
extent
Extents of the box along the x,y,z axis. |
Vector3f[] |
vectorStore
Vector array used to store the array of 8 corners the box has. |
Vector3f |
xAxis
X axis of the Oriented Box. |
Vector3f |
yAxis
Y axis of the Oriented Box. |
Vector3f |
zAxis
Z axis of the Oriented Box. |
| Fields inherited from class com.jme.bounding.BoundingVolume |
|---|
_compVect1, _compVect2, center, checkPlane |
| Constructor Summary | |
|---|---|
OrientedBoundingBox()
|
|
| Method Summary | |
|---|---|
BoundingVolume |
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(java.nio.FloatBuffer points)
computeFromPoints generates a bounding volume that
encompasses a collection of points. |
void |
computeFromTris(int[] indices,
TriMesh mesh,
int start,
int end)
|
void |
computeFromTris(Triangle[] tris,
int start,
int end)
|
boolean |
contains(Vector3f point)
determines if a given point is contained within this bounding volume. |
float |
distanceToEdge(Vector3f point)
Find the distance from the nearest edge of this Bounding Volume to the given point. |
Vector3f |
getExtent()
|
BoundingVolume.Type |
getType()
getType returns the type of bounding volume this is. |
float |
getVolume()
|
Vector3f |
getXAxis()
|
Vector3f |
getYAxis()
|
Vector3f |
getZAxis()
|
boolean |
intersection(OrientedBoundingBox 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 |
intersectsCapsule(BoundingCapsule bc)
determins if this bounding volume and a given bounding capsule are intersecting. |
boolean |
intersectsOrientedBoundingBox(OrientedBoundingBox obb)
determines if this bounding volume and a given bounding box are intersecting. |
boolean |
intersectsSphere(BoundingSphere bs)
determines if this bounding volume and a given bounding sphere are intersecting. |
IntersectionRecord |
intersectsWhere(Ray ray)
determines if a ray intersects this bounding volume and if so, where. |
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 |
read(JMEImporter e)
|
void |
setExtent(Vector3f ext)
|
void |
setXAxis(Vector3f axis)
|
void |
setYAxis(Vector3f axis)
|
void |
setZAxis(Vector3f axis)
|
BoundingVolume |
transform(Matrix3f rotate,
Vector3f translate,
Vector3f scale,
BoundingVolume store)
|
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. |
Plane.Side |
whichSide(Plane plane)
whichSide returns the side on which the bounding volume
lies on a plane. |
void |
write(JMEExporter e)
|
| Methods inherited from class com.jme.bounding.BoundingVolume |
|---|
distanceSquaredTo, distanceTo, getCenter, getCenter, getCheckPlane, getClassTag, setCenter, setCheckPlane, transform |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final Vector3f xAxis
public final Vector3f yAxis
public final Vector3f zAxis
public final Vector3f extent
public final Vector3f[] vectorStore
public boolean correctCorners
| Constructor Detail |
|---|
public OrientedBoundingBox()
| Method Detail |
|---|
public BoundingVolume.Type getType()
BoundingVolume
getType in class BoundingVolume
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 class 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 Plane.Side 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 class BoundingVolumeplane - the plane to check against this bounding volume.
public void computeFromPoints(java.nio.FloatBuffer points)
BoundingVolumecomputeFromPoints generates a bounding volume that
encompasses a collection of points.
computeFromPoints in class 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 class 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 class BoundingVolumevolume - the volume to combine.
public BoundingVolume clone(BoundingVolume store)
BoundingVolumeclone creates a new BoundingVolume object containing the
same data as this one.
clone in class BoundingVolumestore - where to store the cloned information. if null or wrong class,
a new store is created.
public void computeCorners()
public void computeFromTris(int[] indices,
TriMesh mesh,
int start,
int end)
computeFromTris in class BoundingVolume
public void computeFromTris(Triangle[] tris,
int start,
int end)
computeFromTris in class BoundingVolumepublic boolean intersection(OrientedBoundingBox box1)
public boolean intersects(BoundingVolume bv)
BoundingVolume
intersects in class BoundingVolumebv - the second volume to test against.
public boolean intersectsSphere(BoundingSphere bs)
BoundingVolume
intersectsSphere in class BoundingVolumebs - the bounding sphere to test against.
public boolean intersectsBoundingBox(BoundingBox bb)
BoundingVolume
intersectsBoundingBox in class BoundingVolumebb - the bounding box to test against.
public boolean intersectsOrientedBoundingBox(OrientedBoundingBox obb)
BoundingVolume
intersectsOrientedBoundingBox in class BoundingVolumeobb - the bounding box to test against.
public boolean intersectsCapsule(BoundingCapsule bc)
BoundingVolume
intersectsCapsule in class BoundingVolumebc - the bounding capsule to test against.
public boolean intersects(Ray ray)
BoundingVolume
intersects in class BoundingVolumeray - the ray to test.
public IntersectionRecord intersectsWhere(Ray ray)
BoundingVolume
intersectsWhere in class BoundingVolumeray - the ray to test.
BoundingVolume.intersectsWhere(com.jme.math.Ray)public void setXAxis(Vector3f axis)
public void setYAxis(Vector3f axis)
public void setZAxis(Vector3f axis)
public void setExtent(Vector3f ext)
public Vector3f getXAxis()
public Vector3f getYAxis()
public Vector3f getZAxis()
public Vector3f getExtent()
public boolean contains(Vector3f point)
BoundingVolume
contains in class BoundingVolumepoint - the point to check
public float distanceToEdge(Vector3f point)
BoundingVolume
distanceToEdge in class BoundingVolumepoint - The point to get the distance to
public void write(JMEExporter e)
throws java.io.IOException
write in interface Savablewrite in class BoundingVolumejava.io.IOException
public void read(JMEImporter e)
throws java.io.IOException
read in interface Savableread in class BoundingVolumejava.io.IOExceptionpublic float getVolume()
getVolume in class BoundingVolume
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||