|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jme.bounding.OBBTree
Started Date: Sep 5, 2004
This class is used exclusivly by the TriMesh object. There is no need for
users to call functions on this class directly. It is a tree of OBB objects
that represent a model's bound.
| Field Summary | |
OBB2 |
bounds
Untransformed bounds of this tree. |
static int |
maxPerLeaf
The max number of triangles in a leaf. |
OBB2 |
worldBounds
This tree's bounds after transformation. |
| Constructor Summary | |
OBBTree()
|
|
| Method Summary | |
void |
construct(TriMesh parent)
Recreates this OBBTree's information for the given TriMesh. |
void |
createTree(int start,
int end)
Creates an OBB tree recursivly from the tris's array of triangles. |
boolean |
intersect(OBBTree collisionTree)
Returns true if this OBBTree intersects the given OBBTree. |
boolean |
intersect(OBBTree collisionTree,
java.util.ArrayList aList,
java.util.ArrayList bList)
Stores in the given array list all indexes of triangle intersection between the two OBBTree. |
void |
intersect(Ray toTest,
java.util.ArrayList triList)
Stores in the given array list all indexes of triangle intersection between this tree and a given ray. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static int maxPerLeaf
public OBB2 bounds
public OBB2 worldBounds
| Constructor Detail |
public OBBTree()
| Method Detail |
public void construct(TriMesh parent)
parent - The trimesh that this OBBTree should represent.
public void createTree(int start,
int end)
start - The start index of the tris array, inclusive.end - The end index of the tris array, exclusive.public boolean intersect(OBBTree collisionTree)
collisionTree - The Tree to test.
public boolean intersect(OBBTree collisionTree,
java.util.ArrayList aList,
java.util.ArrayList bList)
collisionTree - The tree to test this one against.aList - The arraylist to hold indexes of this OBBTree's triangle
intersections.bList - The arraylist to hold indexes of the testing OBBTree's
triangle intersections.
public void intersect(Ray toTest,
java.util.ArrayList triList)
triList - The arraylist to hold indexes of this OBBTree's triangle
intersections.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||