net.java.joglutils.msg.nodes
Class IndexedTriangleSet

java.lang.Object
  extended by net.java.joglutils.msg.nodes.Node
      extended by net.java.joglutils.msg.nodes.Shape
          extended by net.java.joglutils.msg.nodes.TriangleBasedShape
              extended by net.java.joglutils.msg.nodes.IndexedTriangleSet

public class IndexedTriangleSet
extends TriangleBasedShape

An IndexedTriangleSet assembles the coordinates specified by a Coordinate3 node, and any auxiliary nodes such as a TextureCoordinate2 node, into a set of triangles by indexing into the pools of coordinates set up by these other nodes. (NOTE: (FIXME) rendering support for this node is not yet implemented.)


Constructor Summary
IndexedTriangleSet()
           
 
Method Summary
 void doAction(Action action)
          Performs the "typical" operation for this node when an action is applied to it.
 void generateTriangles(Action action, TriangleCallback cb)
          Based on the state in the given Action, calls the specified triangle callback for each triangle in the shape.
 IntBuffer getIndices()
          Returns the indices this node uses to group vertices into triangles.
 void setIndices(IntBuffer indices)
          Sets the indices this node uses to group vertices into triangles.
 
Methods inherited from class net.java.joglutils.msg.nodes.TriangleBasedShape
rayPick
 
Methods inherited from class net.java.joglutils.msg.nodes.Node
render
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexedTriangleSet

public IndexedTriangleSet()
Method Detail

setIndices

public void setIndices(IntBuffer indices)
Sets the indices this node uses to group vertices into triangles.


getIndices

public IntBuffer getIndices()
Returns the indices this node uses to group vertices into triangles.


doAction

public void doAction(Action action)
Description copied from class: Node
Performs the "typical" operation for this node when an action is applied to it. The default implementation does nothing.

Overrides:
doAction in class Node

generateTriangles

public void generateTriangles(Action action,
                              TriangleCallback cb)
Description copied from class: TriangleBasedShape
Based on the state in the given Action, calls the specified triangle callback for each triangle in the shape. Coordinates are specified in the local coordinate system of this shape; the caller must transform them into the world coordinate system if necessary.

Specified by:
generateTriangles in class TriangleBasedShape