com.threerings.opengl.model
Class CollisionMesh.LeafNode

java.lang.Object
  extended by com.threerings.opengl.model.CollisionMesh.Node
      extended by com.threerings.opengl.model.CollisionMesh.LeafNode
All Implemented Interfaces:
Exportable
Enclosing class:
CollisionMesh

protected static class CollisionMesh.LeafNode
extends CollisionMesh.Node

A leaf node containing a single triangle.


Field Summary
protected  Triangle _triangle
          The triangle in the leaf.
 
Fields inherited from class com.threerings.opengl.model.CollisionMesh.Node
_bounds
 
Constructor Summary
CollisionMesh.LeafNode()
           
CollisionMesh.LeafNode(Box bounds, Triangle triangle)
           
 
Method Summary
 boolean computeIntersection(Ray3D ray, Vector3f result)
          Computes the actual intersection between the ray and this node's geometry, once it has been established that the ray intersects the node's bounding box.
 
Methods inherited from class com.threerings.opengl.model.CollisionMesh.Node
getBounds, getIntersection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_triangle

protected Triangle _triangle
The triangle in the leaf.

Constructor Detail

CollisionMesh.LeafNode

public CollisionMesh.LeafNode(Box bounds,
                              Triangle triangle)

CollisionMesh.LeafNode

public CollisionMesh.LeafNode()
Method Detail

computeIntersection

public boolean computeIntersection(Ray3D ray,
                                   Vector3f result)
Description copied from class: CollisionMesh.Node
Computes the actual intersection between the ray and this node's geometry, once it has been established that the ray intersects the node's bounding box.

Specified by:
computeIntersection in class CollisionMesh.Node
Returns:
true if the ray hit a triangle within the node, in which case the result will be placed in the object supplied.