org.xith3d.scenegraph
Class TextureAttributes

java.lang.Object
  extended by org.xith3d.scenegraph.SceneGraphObject
      extended by org.xith3d.scenegraph.NodeComponent
          extended by org.xith3d.scenegraph.TextureAttributes
All Implemented Interfaces:
java.lang.Comparable<TextureAttributes>, org.jagatoo.datatypes.NamableObject, org.jagatoo.datatypes.NamedObject, StateTrackable<TextureAttributes>

public class TextureAttributes
extends NodeComponent
implements StateTrackable<TextureAttributes>

TextureAttributes defines attributes that apply to .


Field Summary
static org.jagatoo.opengl.enums.TextureMode BLEND
           
static org.jagatoo.opengl.enums.TextureCombineMode COMBINE
           
static org.jagatoo.opengl.enums.TextureCombineMode COMBINE_ADD
           
static org.jagatoo.opengl.enums.TextureCombineMode COMBINE_ADD_SIGNED
           
static org.jagatoo.opengl.enums.TextureCombineSource COMBINE_CONSTANT_COLOR
           
static org.jagatoo.opengl.enums.TextureCombineMode COMBINE_DOT3
           
static org.jagatoo.opengl.enums.TextureCombineMode COMBINE_INTERPOLATE
           
static org.jagatoo.opengl.enums.TextureCombineMode COMBINE_MODULATE
           
static org.jagatoo.opengl.enums.TextureCombineSource COMBINE_OBJECT_COLOR
           
static org.jagatoo.opengl.enums.TextureCombineFunction COMBINE_ONE_MINUS_SRC_ALPHA
           
static org.jagatoo.opengl.enums.TextureCombineFunction COMBINE_ONE_MINUS_SRC_COLOR
           
static org.jagatoo.opengl.enums.TextureCombineSource COMBINE_PREVIOUS_TEXTURE_UNIT
           
static org.jagatoo.opengl.enums.TextureCombineMode COMBINE_REPLACE
           
static org.jagatoo.opengl.enums.TextureCombineFunction COMBINE_SRC_ALPHA
           
static org.jagatoo.opengl.enums.TextureCombineFunction COMBINE_SRC_COLOR
           
static org.jagatoo.opengl.enums.TextureCombineMode COMBINE_SUBTRACT
           
static org.jagatoo.opengl.enums.TextureCombineSource COMBINE_TEXTURE_COLOR
           
static org.jagatoo.opengl.enums.TextureCombineSource COMBINE_TEXTURE0
           
static org.jagatoo.opengl.enums.TextureCombineSource COMBINE_TEXTURE1
           
static org.jagatoo.opengl.enums.TextureMode DECAL
           
static org.jagatoo.opengl.enums.PerspectiveCorrectionMode FASTEST
           
static org.jagatoo.opengl.enums.TextureMode MODULATE
           
static org.jagatoo.opengl.enums.PerspectiveCorrectionMode NICEST
           
static org.jagatoo.opengl.enums.TextureMode REPLACE
           
 
Fields inherited from class org.xith3d.scenegraph.SceneGraphObject
XITH3D_USERDATAKEY_OLDUSERDATA
 
Constructor Summary
TextureAttributes()
          Constructs a new TextureAttributes object.
TextureAttributes(org.jagatoo.opengl.enums.TextureMode textureMode, Transform3D transform, org.openmali.vecmath2.Colorf textureBlendColor, org.jagatoo.opengl.enums.PerspectiveCorrectionMode perspCorrectionMode)
          Constructs a new TextureAttributes object.
 
Method Summary
 TextureAttributes cloneNodeComponent(boolean forceDuplicate)
          
 int compareTo(TextureAttributes o)
          
protected  void duplicateNodeComponent(NodeComponent nodeOriginal, boolean forceDuplicate)
          
 boolean equals(java.lang.Object o)
          
 void freeOpenGLResources(CanvasPeer canvasPeer)
          This method frees OpenGL resources (names) for all this NodeComponent and all child-components.
 org.jagatoo.opengl.enums.TextureCombineFunction getCombineAlphaFunction(int index)
           
 org.jagatoo.opengl.enums.TextureCombineMode getCombineAlphaMode()
           
 int getCombineAlphaScale()
           
 org.jagatoo.opengl.enums.TextureCombineSource getCombineAlphaSource(int index)
           
 org.jagatoo.opengl.enums.TextureCombineFunction getCombineRGBFunction(int index)
           
 org.jagatoo.opengl.enums.TextureCombineMode getCombineRGBMode()
           
 int getCombineRGBScale()
           
 org.jagatoo.opengl.enums.TextureCombineSource getCombineRGBSource(int index)
           
 org.jagatoo.opengl.enums.CompareFunction getCompareFunction()
           
 org.jagatoo.opengl.enums.TextureCompareMode getCompareMode()
           
 TextureAttributes getCopy()
          
 org.jagatoo.opengl.enums.PerspectiveCorrectionMode getPerspectiveCorrectionMode()
           
 long getStateId()
           
 StateNode getStateNode()
          
 org.openmali.vecmath2.Colorf getTextureBlendColor()
          gets the texture blend color.
 void getTextureBlendColor(org.openmali.vecmath2.Colorf color)
           
 org.jagatoo.opengl.enums.TextureMode getTextureMode()
          gets the texture mode.
 Transform3D getTextureTransform()
          gets the texture transform.
 void setCombineAlphaFunction(int index, org.jagatoo.opengl.enums.TextureCombineFunction combineAlphaFunction)
           
 void setCombineAlphaMode(org.jagatoo.opengl.enums.TextureCombineMode combineAlphaMode)
           
 void setCombineAlphaScale(int combineAlphaScale)
           
 void setCombineAlphaSource(int index, org.jagatoo.opengl.enums.TextureCombineSource value)
           
 void setCombineRGBFunction(int index, org.jagatoo.opengl.enums.TextureCombineFunction combineRgbFunction)
           
 void setCombineRGBMode(org.jagatoo.opengl.enums.TextureCombineMode combineRgbMode)
           
 void setCombineRGBScale(int combineRgbScale)
           
 void setCombineRGBSource(int index, org.jagatoo.opengl.enums.TextureCombineSource value)
           
 void setCompareFunction(org.jagatoo.opengl.enums.CompareFunction compareFunc)
           
 void setCompareMode(org.jagatoo.opengl.enums.TextureCompareMode compareMode)
           
 void setPerspectiveCorrectionMode(org.jagatoo.opengl.enums.PerspectiveCorrectionMode mode)
          Sets the perspective correction mode.
 void setStateNode(StateNode node)
          Used by the render engine to set the state id for the node.
 void setTextureBlendColor(org.openmali.vecmath2.Colorf color)
          sets the texture blend color.
 void setTextureMode(org.jagatoo.opengl.enums.TextureMode mode)
          sets the texture mode.
 void setTextureTransform(org.openmali.vecmath2.Matrix4f matrix)
          sets the texture transform.
 void setTextureTransform(Transform3D transform)
          sets the texture transform.
 
Methods inherited from class org.xith3d.scenegraph.NodeComponent
freeOpenGLResources, getDuplicateOnCloneTree, getModListener, isChanged, isChanged2, setChanged, setDuplicateOnCloneTree, setModListener
 
Methods inherited from class org.xith3d.scenegraph.SceneGraphObject
getName, getUserData, getUserData, getUserDataMap, isLive, setLive, setName, setUserData, setUserData, setUserDataRecursive, setUserDataRecursive, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MODULATE

public static final org.jagatoo.opengl.enums.TextureMode MODULATE
See Also:
TextureMode.MODULATE

REPLACE

public static final org.jagatoo.opengl.enums.TextureMode REPLACE
See Also:
TextureMode.REPLACE

BLEND

public static final org.jagatoo.opengl.enums.TextureMode BLEND
See Also:
TextureMode.BLEND

DECAL

public static final org.jagatoo.opengl.enums.TextureMode DECAL
See Also:
TextureMode.DECAL

NICEST

public static final org.jagatoo.opengl.enums.PerspectiveCorrectionMode NICEST
See Also:
PerspectiveCorrectionMode.NICEST

FASTEST

public static final org.jagatoo.opengl.enums.PerspectiveCorrectionMode FASTEST
See Also:
PerspectiveCorrectionMode.FASTEST

COMBINE_REPLACE

public static final org.jagatoo.opengl.enums.TextureCombineMode COMBINE_REPLACE

COMBINE_MODULATE

public static final org.jagatoo.opengl.enums.TextureCombineMode COMBINE_MODULATE

COMBINE_ADD

public static final org.jagatoo.opengl.enums.TextureCombineMode COMBINE_ADD

COMBINE_ADD_SIGNED

public static final org.jagatoo.opengl.enums.TextureCombineMode COMBINE_ADD_SIGNED

COMBINE_SUBTRACT

public static final org.jagatoo.opengl.enums.TextureCombineMode COMBINE_SUBTRACT

COMBINE_INTERPOLATE

public static final org.jagatoo.opengl.enums.TextureCombineMode COMBINE_INTERPOLATE

COMBINE_DOT3

public static final org.jagatoo.opengl.enums.TextureCombineMode COMBINE_DOT3

COMBINE

public static final org.jagatoo.opengl.enums.TextureCombineMode COMBINE

COMBINE_OBJECT_COLOR

public static final org.jagatoo.opengl.enums.TextureCombineSource COMBINE_OBJECT_COLOR

COMBINE_TEXTURE_COLOR

public static final org.jagatoo.opengl.enums.TextureCombineSource COMBINE_TEXTURE_COLOR

COMBINE_CONSTANT_COLOR

public static final org.jagatoo.opengl.enums.TextureCombineSource COMBINE_CONSTANT_COLOR

COMBINE_PREVIOUS_TEXTURE_UNIT

public static final org.jagatoo.opengl.enums.TextureCombineSource COMBINE_PREVIOUS_TEXTURE_UNIT

COMBINE_TEXTURE0

public static final org.jagatoo.opengl.enums.TextureCombineSource COMBINE_TEXTURE0

COMBINE_TEXTURE1

public static final org.jagatoo.opengl.enums.TextureCombineSource COMBINE_TEXTURE1

COMBINE_SRC_COLOR

public static final org.jagatoo.opengl.enums.TextureCombineFunction COMBINE_SRC_COLOR

COMBINE_ONE_MINUS_SRC_COLOR

public static final org.jagatoo.opengl.enums.TextureCombineFunction COMBINE_ONE_MINUS_SRC_COLOR

COMBINE_SRC_ALPHA

public static final org.jagatoo.opengl.enums.TextureCombineFunction COMBINE_SRC_ALPHA

COMBINE_ONE_MINUS_SRC_ALPHA

public static final org.jagatoo.opengl.enums.TextureCombineFunction COMBINE_ONE_MINUS_SRC_ALPHA
Constructor Detail

TextureAttributes

public TextureAttributes()
Constructs a new TextureAttributes object.


TextureAttributes

public TextureAttributes(org.jagatoo.opengl.enums.TextureMode textureMode,
                         Transform3D transform,
                         org.openmali.vecmath2.Colorf textureBlendColor,
                         org.jagatoo.opengl.enums.PerspectiveCorrectionMode perspCorrectionMode)
Constructs a new TextureAttributes object.

Method Detail

setCombineAlphaSource

public void setCombineAlphaSource(int index,
                                  org.jagatoo.opengl.enums.TextureCombineSource value)

getCombineAlphaSource

public org.jagatoo.opengl.enums.TextureCombineSource getCombineAlphaSource(int index)

setCombineRGBSource

public void setCombineRGBSource(int index,
                                org.jagatoo.opengl.enums.TextureCombineSource value)

getCombineRGBSource

public org.jagatoo.opengl.enums.TextureCombineSource getCombineRGBSource(int index)

setTextureMode

public final void setTextureMode(org.jagatoo.opengl.enums.TextureMode mode)
sets the texture mode. MODULATE, DECAL, BLEND or REPLACE. Default is MODULATE.


getTextureMode

public org.jagatoo.opengl.enums.TextureMode getTextureMode()
gets the texture mode.


setTextureBlendColor

public final void setTextureBlendColor(org.openmali.vecmath2.Colorf color)
sets the texture blend color.


getTextureBlendColor

public final void getTextureBlendColor(org.openmali.vecmath2.Colorf color)

getTextureBlendColor

public final org.openmali.vecmath2.Colorf getTextureBlendColor()
gets the texture blend color.


setTextureTransform

public final void setTextureTransform(Transform3D transform)
sets the texture transform.


setTextureTransform

public final void setTextureTransform(org.openmali.vecmath2.Matrix4f matrix)
sets the texture transform.


getTextureTransform

public final Transform3D getTextureTransform()
gets the texture transform.


setPerspectiveCorrectionMode

public final void setPerspectiveCorrectionMode(org.jagatoo.opengl.enums.PerspectiveCorrectionMode mode)
Sets the perspective correction mode.
The default is NICEST.


getPerspectiveCorrectionMode

public final org.jagatoo.opengl.enums.PerspectiveCorrectionMode getPerspectiveCorrectionMode()
Returns:
the perspective correction mode.

setCombineRGBMode

public void setCombineRGBMode(org.jagatoo.opengl.enums.TextureCombineMode combineRgbMode)

getCombineRGBMode

public org.jagatoo.opengl.enums.TextureCombineMode getCombineRGBMode()

setCombineAlphaMode

public void setCombineAlphaMode(org.jagatoo.opengl.enums.TextureCombineMode combineAlphaMode)

getCombineAlphaMode

public org.jagatoo.opengl.enums.TextureCombineMode getCombineAlphaMode()

setCombineRGBFunction

public void setCombineRGBFunction(int index,
                                  org.jagatoo.opengl.enums.TextureCombineFunction combineRgbFunction)

getCombineRGBFunction

public org.jagatoo.opengl.enums.TextureCombineFunction getCombineRGBFunction(int index)

setCombineAlphaFunction

public void setCombineAlphaFunction(int index,
                                    org.jagatoo.opengl.enums.TextureCombineFunction combineAlphaFunction)

getCombineAlphaFunction

public org.jagatoo.opengl.enums.TextureCombineFunction getCombineAlphaFunction(int index)

getCombineRGBScale

public int getCombineRGBScale()

setCombineRGBScale

public void setCombineRGBScale(int combineRgbScale)

getCombineAlphaScale

public int getCombineAlphaScale()

setCombineAlphaScale

public void setCombineAlphaScale(int combineAlphaScale)

setCompareMode

public void setCompareMode(org.jagatoo.opengl.enums.TextureCompareMode compareMode)

getCompareMode

public final org.jagatoo.opengl.enums.TextureCompareMode getCompareMode()

setCompareFunction

public void setCompareFunction(org.jagatoo.opengl.enums.CompareFunction compareFunc)

getCompareFunction

public final org.jagatoo.opengl.enums.CompareFunction getCompareFunction()

duplicateNodeComponent

protected void duplicateNodeComponent(NodeComponent nodeOriginal,
                                      boolean forceDuplicate)

Overrides:
duplicateNodeComponent in class NodeComponent

cloneNodeComponent

public TextureAttributes cloneNodeComponent(boolean forceDuplicate)

Specified by:
cloneNodeComponent in class NodeComponent

freeOpenGLResources

public void freeOpenGLResources(CanvasPeer canvasPeer)
This method frees OpenGL resources (names) for all this NodeComponent and all child-components.

Specified by:
freeOpenGLResources in class NodeComponent

setStateNode

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

Specified by:
setStateNode in interface StateTrackable<TextureAttributes>

getStateNode

public final StateNode getStateNode()

Specified by:
getStateNode in interface StateTrackable<TextureAttributes>
Returns:
the id of the object. This should return -1 if there is no assigned id.

getStateId

public final long getStateId()

getCopy

public TextureAttributes getCopy()

Specified by:
getCopy in interface StateTrackable<TextureAttributes>
Returns:
a copy of the state of the referenced trackable object.

equals

public boolean equals(java.lang.Object o)

Overrides:
equals in class java.lang.Object

compareTo

public int compareTo(TextureAttributes o)

Specified by:
compareTo in interface java.lang.Comparable<TextureAttributes>