net.java.joglutils.msg.nodes
Class TriangleSet

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.TriangleSet

public class TriangleSet
extends TriangleBasedShape

A TriangleSet assembles the coordinates specified by a Coordinate3 node, and any auxiliary nodes such as a TextureCoordinate2 node, into a set of triangles.


Constructor Summary
TriangleSet()
           
 
Method Summary
 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.
 int getNumTriangles()
          Returns the number of triangles this TriangleSet references.
 void render(GLRenderAction action)
          Support for the built-in GLRenderAction.
 void setNumTriangles(int numTriangles)
          Sets the number of triangles this TriangleSet references.
 
Methods inherited from class net.java.joglutils.msg.nodes.TriangleBasedShape
rayPick
 
Methods inherited from class net.java.joglutils.msg.nodes.Node
doAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TriangleSet

public TriangleSet()
Method Detail

setNumTriangles

public void setNumTriangles(int numTriangles)
Sets the number of triangles this TriangleSet references.


getNumTriangles

public int getNumTriangles()
Returns the number of triangles this TriangleSet references.


render

public void render(GLRenderAction action)
Description copied from class: Node
Support for the built-in GLRenderAction. Note that supplying virtual methods in Node subclasses to support various actions is not required due to the framework supporting action methods, but for built-in actions it may make it simpler.

Overrides:
render 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