org.xith3d.render.states
Class StateSortable

java.lang.Object
  extended by org.xith3d.render.states.StateSortable
Direct Known Subclasses:
RenderAtom, StateUnit

public abstract class StateSortable
extends java.lang.Object

The state sortable interface allows for rendering elements to be sorted according to a priority set in the Renderer. This can apply to shaders, atoms, etc.


Constructor Summary
StateSortable(int stateType)
           
 
Method Summary
 long getCachedStateId()
           
abstract  long getStateId()
           
 int getStateType()
          Each Shader type needs a unique state type id which it can obtain from the StateMap class.
 void updateCachedStateId()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StateSortable

public StateSortable(int stateType)
Method Detail

getStateType

public final int getStateType()
Each Shader type needs a unique state type id which it can obtain from the StateMap class.


getStateId

public abstract long getStateId()
Returns:
the state ID used to sort the item

updateCachedStateId

public final void updateCachedStateId()

getCachedStateId

public final long getCachedStateId()