|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.opengl.model.CollisionMesh
public class CollisionMesh
A mesh used for collision detection.
| Nested Class Summary | |
|---|---|
protected static class |
CollisionMesh.CenterComparator
Compares triangles based on one of the coordinates of their centers. |
protected static class |
CollisionMesh.InternalNode
An internal node containing two children. |
protected static class |
CollisionMesh.LeafNode
A leaf node containing a single triangle. |
protected static class |
CollisionMesh.Node
A node in the axis-aligned bounding box tree. |
| Field Summary | |
|---|---|
protected CollisionMesh.Node |
_root
The root node of the AABB tree. |
| Constructor Summary | |
|---|---|
CollisionMesh()
No-arg constructor for deserialization. |
|
CollisionMesh(Vector3f... vertices)
Creates the mesh from an array of vertices, where each set of three vertices represents a triangle. |
|
| Method Summary | |
|---|---|
protected static CollisionMesh.Node |
createNode(Triangle[] triangles)
Creates a node to hold the given array of triangles. |
Box |
getBounds()
Returns a reference to the bounds of the mesh. |
boolean |
getIntersection(Ray3D ray,
Vector3f result)
Finds the intersection of the given ray with this mesh and places it in the supplied result object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected CollisionMesh.Node _root
| Constructor Detail |
|---|
public CollisionMesh(Vector3f... vertices)
public CollisionMesh()
| Method Detail |
|---|
public Box getBounds()
public boolean getIntersection(Ray3D ray,
Vector3f result)
protected static CollisionMesh.Node createNode(Triangle[] triangles)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||