|
||||||||||
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.OrthogonalBoundingBox
public class OrthogonalBoundingBox
Started Date: Sep 5, 2004
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.jme.bounding.BoundingVolume |
---|
BoundingVolume.Type |
Field Summary | |
---|---|
boolean |
correctCorners
|
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, _compVect3, center, checkPlane |
Constructor Summary | |
---|---|
OrthogonalBoundingBox()
|
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 4 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(OrthogonalBoundingBox 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 bb)
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 OrthogonalBoundingBox()
Method Detail |
---|
public BoundingVolume.Type getType()
BoundingVolume
getType
in class BoundingVolume
public BoundingVolume transform(Quaternion rotate, Vector3f translate, Vector3f scale, BoundingVolume store)
BoundingVolume
transform
alters the location of the bounding volume by a
rotation, translation and a scalar.
transform
in class BoundingVolume
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 BoundingVolume transform(Matrix3f rotate, Vector3f translate, Vector3f scale, BoundingVolume store)
public Plane.Side whichSide(Plane plane)
BoundingVolume
whichSide
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 BoundingVolume
plane
- the plane to check against this bounding volume.
public void computeFromPoints(java.nio.FloatBuffer points)
BoundingVolume
computeFromPoints
generates a bounding volume that
encompasses a collection of points.
computeFromPoints
in class BoundingVolume
points
- the points to contain.public BoundingVolume merge(BoundingVolume volume)
BoundingVolume
merge
combines two bounding volumes into a single bounding
volume that contains both this bounding volume and the parameter volume.
merge
in class BoundingVolume
volume
- the volume to combine.
public BoundingVolume mergeLocal(BoundingVolume volume)
BoundingVolume
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.
mergeLocal
in class BoundingVolume
volume
- the volume to combine.
public BoundingVolume clone(BoundingVolume store)
BoundingVolume
clone
creates a new BoundingVolume object containing the
same data as this one.
clone
in class BoundingVolume
store
- 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 BoundingVolume
public boolean intersection(OrthogonalBoundingBox box1)
public boolean intersects(BoundingVolume bv)
BoundingVolume
intersects
in class BoundingVolume
bv
- the second volume to test against.
public boolean intersectsSphere(BoundingSphere bs)
BoundingVolume
intersectsSphere
in class BoundingVolume
bs
- the bounding sphere to test against.
public boolean intersectsBoundingBox(BoundingBox bb)
BoundingVolume
intersectsBoundingBox
in class BoundingVolume
bb
- the bounding box to test against.
public boolean intersectsCapsule(BoundingCapsule bc)
BoundingVolume
intersectsCapsule
in class BoundingVolume
bc
- the bounding capsule to test against.
public boolean intersects(Ray ray)
BoundingVolume
intersects
in class BoundingVolume
ray
- the ray to test.
public IntersectionRecord intersectsWhere(Ray ray)
BoundingVolume
intersectsWhere
in class BoundingVolume
ray
- 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 BoundingVolume
point
- the point to check
public float distanceToEdge(Vector3f point)
BoundingVolume
distanceToEdge
in class BoundingVolume
point
- The point to get the distance to
public void write(JMEExporter e) throws java.io.IOException
write
in interface Savable
write
in class BoundingVolume
java.io.IOException
public void read(JMEImporter e) throws java.io.IOException
read
in interface Savable
read
in class BoundingVolume
java.io.IOException
public float getVolume()
getVolume
in class BoundingVolume
public boolean intersectsOrientedBoundingBox(OrientedBoundingBox bb)
BoundingVolume
intersectsOrientedBoundingBox
in class BoundingVolume
bb
- the bounding box to test against.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |