org.xith3d.render.states.units
Class ColoringStateUnit

java.lang.Object
  extended by org.xith3d.render.states.StateSortable
      extended by org.xith3d.render.states.StateUnit
          extended by org.xith3d.render.states.units.ColoringStateUnit

public class ColoringStateUnit
extends StateUnit

The ColoringShader encapsulates the Java3D standard coloring which are attached to an Appearance.


Field Summary
static StateMap coloringStateMap
           
static ColoringAttributes DEFAULT_COLOR_ATTR
           
static TransparencyAttributes DEFAULT_TRANS_ATTR
           
static int STATE_TYPE
           
static StateMap transparencyStateMap
           
 
Fields inherited from class org.xith3d.render.states.StateUnit
MAX_ATOM_TYPES, MAX_STATE_TYPES
 
Method Summary
 ColoringAttributes getColoringAttributes()
           
 ColoringAttributes getNodeComponent()
          
 long getStateId()
          
 TransparencyAttributes getTransparencyAttributes()
           
static boolean isDefault(ColoringStateUnit cs)
           
 boolean isTranslucent()
          Because the rendering engine needs to deal with translucent geometry differently the shader needs to be able to indicate whether it is translucent or not.
static ColoringStateUnit makeColoringStateUnit(ColoringAttributes ca, TransparencyAttributes ta, StateUnit[] cache)
           
 java.lang.String toString()
          
 void update(ColoringAttributes ca, TransparencyAttributes ta)
           
 
Methods inherited from class org.xith3d.render.states.StateUnit
isDefault
 
Methods inherited from class org.xith3d.render.states.StateSortable
getCachedStateId, getStateType, updateCachedStateId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STATE_TYPE

public static final int STATE_TYPE

coloringStateMap

public static final StateMap coloringStateMap

transparencyStateMap

public static final StateMap transparencyStateMap

DEFAULT_COLOR_ATTR

public static final ColoringAttributes DEFAULT_COLOR_ATTR

DEFAULT_TRANS_ATTR

public static final TransparencyAttributes DEFAULT_TRANS_ATTR
Method Detail

getColoringAttributes

public final ColoringAttributes getColoringAttributes()

getTransparencyAttributes

public final TransparencyAttributes getTransparencyAttributes()

isDefault

public static boolean isDefault(ColoringStateUnit cs)

getNodeComponent

public ColoringAttributes getNodeComponent()

Specified by:
getNodeComponent in class StateUnit

isTranslucent

public final boolean isTranslucent()
Because the rendering engine needs to deal with translucent geometry differently the shader needs to be able to indicate whether it is translucent or not.

Specified by:
isTranslucent in class StateUnit
Returns:
true, if the Shader is translucent

getStateId

public final long getStateId()

Specified by:
getStateId in class StateSortable
Returns:
the state ID used to sort the item

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

update

public final void update(ColoringAttributes ca,
                         TransparencyAttributes ta)

makeColoringStateUnit

public static ColoringStateUnit makeColoringStateUnit(ColoringAttributes ca,
                                                      TransparencyAttributes ta,
                                                      StateUnit[] cache)