org.xith3d.render.states
Interface StateTrackable<T extends StateTrackable<T>>

All Superinterfaces:
java.lang.Comparable<T>
All Known Implementing Classes:
AssemblyShaderProgram, AssemblyShaderProgramContext, ColoringAttributes, GLSLContext, GLSLShaderProgram, LineAttributes, Material, PointAttributes, PolygonAttributes, RenderingAttributes, ShaderProgram, ShaderProgramContext, TexCoordGeneration, TextureAttributes, TransparencyAttributes

public interface StateTrackable<T extends StateTrackable<T>>
extends java.lang.Comparable<T>

Simple interface that allows the renderer to assign a state id to a node. This is used to speed up caching state changes during rendering.


Method Summary
 T getCopy()
           
 StateNode getStateNode()
           
 void setStateNode(StateNode node)
          Used by the render engine to set the state id for the node.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

setStateNode

void setStateNode(StateNode node)
Used by the render engine to set the state id for the node.

Parameters:
node -

getStateNode

StateNode getStateNode()
Returns:
the id of the object. This should return -1 if there is no assigned id.

getCopy

T getCopy()
Returns:
a copy of the state of the referenced trackable object.