org.xith3d.render.states.units
Class TextureUnitStateUnit

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

public class TextureUnitStateUnit
extends StateUnit

This StateUnit encapsulates a whole TextureUnit.


Field Summary
static TextureAttributes DEFAULT_TEX_ATTR
           
static TexCoordGeneration DEFAULT_TEXCOORD_GEN
           
static TextureUnitStateUnit[] DEFAULT_UNIT
           
static int[] STATE_TYPES
           
static StateMap texAttribsStateMap
           
static StateMap texCoorGenStateMap
           
 
Fields inherited from class org.xith3d.render.states.StateUnit
MAX_ATOM_TYPES, MAX_STATE_TYPES
 
Method Summary
 ColoringAttributes getNodeComponent()
          
 long getStateId()
          
 TexCoordGeneration getTexCoordGeneration()
           
 Texture getTexture()
           
 TextureAttributes getTextureAttributes()
           
 int getUnit()
           
 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 TextureUnitStateUnit makeTextureUnitStateUnit(int unit, TextureUnit tu, StateUnit[] cache)
           
 java.lang.String toString()
          
 void update(Texture texture, TextureAttributes texAttribs, TexCoordGeneration texCoordGen)
           
 
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_TYPES

public static final int[] STATE_TYPES

texAttribsStateMap

public static final StateMap texAttribsStateMap

texCoorGenStateMap

public static final StateMap texCoorGenStateMap

DEFAULT_TEX_ATTR

public static final TextureAttributes DEFAULT_TEX_ATTR

DEFAULT_TEXCOORD_GEN

public static final TexCoordGeneration DEFAULT_TEXCOORD_GEN

DEFAULT_UNIT

public static final TextureUnitStateUnit[] DEFAULT_UNIT
Method Detail

getUnit

public final int getUnit()

getTexture

public final Texture getTexture()

getTextureAttributes

public final TextureAttributes getTextureAttributes()

getTexCoordGeneration

public final TexCoordGeneration getTexCoordGeneration()

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(Texture texture,
                         TextureAttributes texAttribs,
                         TexCoordGeneration texCoordGen)

makeTextureUnitStateUnit

public static TextureUnitStateUnit makeTextureUnitStateUnit(int unit,
                                                            TextureUnit tu,
                                                            StateUnit[] cache)