javax.media.j3d
Class TextureAttributesRetained

java.lang.Object
  extended by javax.media.j3d.IndexedObject
      extended by javax.media.j3d.SceneGraphObjectRetained
          extended by javax.media.j3d.NodeComponentRetained
              extended by javax.media.j3d.TextureAttributesRetained
All Implemented Interfaces:
java.lang.Cloneable

 class TextureAttributesRetained
extends NodeComponentRetained

The TextureAttributes object defines attributes that apply to to texture mapping.


Field Summary
(package private) static int COLOR_CHANGED
           
(package private) static int COMBINE_ALPHA_FCN_CHANGED
           
(package private) static int COMBINE_ALPHA_MODE_CHANGED
           
(package private) static int COMBINE_ALPHA_SCALE_CHANGED
           
(package private) static int COMBINE_ALPHA_SRC_CHANGED
           
(package private) static int COMBINE_RGB_FCN_CHANGED
           
(package private) static int COMBINE_RGB_MODE_CHANGED
           
(package private) static int COMBINE_RGB_SCALE_CHANGED
           
(package private) static int COMBINE_RGB_SRC_CHANGED
           
(package private)  int[] combineAlphaFcn
           
(package private)  int combineAlphaMode
           
(package private)  int combineAlphaScale
           
(package private)  int[] combineAlphaSrc
           
(package private)  int[] combineRgbFcn
           
(package private)  int combineRgbMode
           
(package private)  int combineRgbScale
           
(package private)  int[] combineRgbSrc
           
(package private) static java.lang.Integer[] commandInt
           
(package private) static int CORRECTION_CHANGED
           
(package private) static java.lang.Integer[] enums
           
(package private)  boolean mirrorCompDirty
           
(package private) static int MODE_CHANGED
           
(package private)  int numTextureColorTableComponents
           
(package private)  int perspCorrectionMode
           
(package private) static int TEXTURE_COLOR_TABLE_CHANGED
           
(package private)  Color4f textureBlendColor
           
(package private)  int[] textureColorTable
           
(package private)  int textureColorTableSize
           
(package private)  int textureMode
           
(package private)  Transform3D transform
           
(package private) static int TRANSFORM_CHANGED
           
 
Fields inherited from class javax.media.j3d.NodeComponentRetained
changedFrequent, compChanged, duplicateOnCloneTree, mirror, refCnt, refCount, users
 
Fields inherited from class javax.media.j3d.SceneGraphObjectRetained
DONT_MERGE, inBackgroundGroup, inSetLive, MERGE, MERGE_DONE, mergeFlag, onUpdateList, source
 
Fields inherited from class javax.media.j3d.IndexedObject
listIdx
 
Constructor Summary
TextureAttributesRetained()
           
 
Method Summary
protected  java.lang.Object clone()
           
(package private)  void createMirrorObject()
          Creates and initializes a mirror object, point the mirror object to the retained object if the object is not editable
(package private)  boolean equivalent(TextureAttributesRetained tr)
           
(package private)  int getCombineAlphaFunction(int index)
           
(package private)  int getCombineAlphaMode()
           
(package private)  int getCombineAlphaScale()
           
(package private)  int getCombineAlphaSource(int index)
           
(package private)  int getCombineRgbFunction(int index)
           
(package private)  int getCombineRgbMode()
           
(package private)  int getCombineRgbScale()
           
(package private)  int getCombineRgbSource(int index)
           
(package private)  int getNumTextureColorTableComponents()
           
(package private)  int getPerspectiveCorrectionMode()
          Gets perspective correction mode value.
(package private)  void getTextureBlendColor(Color4f textureBlendColor)
          Gets the texture blend color for this appearance component object.
(package private)  void getTextureColorTable(int[][] table)
           
(package private)  int getTextureColorTableSize()
           
(package private)  int getTextureMode()
          Gets the texture mode parameter for this texture attributes object.
(package private)  void getTextureTransform(Transform3D transform)
          Retrieves a copy of the texture transform object.
(package private)  void handleFrequencyChange(int bit)
           
(package private)  void initCombineAlphaFunction(int index, int fcn)
           
(package private)  void initCombineAlphaMode(int mode)
           
(package private)  void initCombineAlphaScale(int scale)
           
(package private)  void initCombineAlphaSource(int index, int src)
           
(package private)  void initCombineMode(TextureAttributesRetained tr)
           
(package private)  void initCombineRgbFunction(int index, int fcn)
           
(package private)  void initCombineRgbMode(int mode)
           
(package private)  void initCombineRgbScale(int scale)
           
(package private)  void initCombineRgbSource(int index, int src)
           
(package private)  void initMirrorObject()
          Initializes a mirror object
(package private)  void initPerspectiveCorrectionMode(int mode)
           
(package private)  void initTextureBlendColor(Color4f textureBlendColor)
           
(package private)  void initTextureBlendColor(float r, float g, float b, float a)
           
(package private)  void initTextureColorTable(int[][] table)
           
(package private) static void initTextureEnums()
           
(package private)  void initTextureMode(int textureMode)
           
(package private)  void initTextureTransform(Transform3D transform)
           
(package private)  void sendMessage(int attrMask, java.lang.Object attr1, java.lang.Object attr2)
           
protected  void set(TextureAttributesRetained tr)
           
(package private)  void setCombineAlphaFunction(int index, int fcn)
           
(package private)  void setCombineAlphaMode(int mode)
           
(package private)  void setCombineAlphaScale(int scale)
           
(package private)  void setCombineAlphaSource(int index, int src)
           
(package private)  void setCombineRgbFunction(int index, int fcn)
           
(package private)  void setCombineRgbMode(int mode)
           
(package private)  void setCombineRgbScale(int scale)
           
(package private)  void setCombineRgbSource(int index, int src)
           
(package private)  void setPerspectiveCorrectionMode(int mode)
          Sets perspective correction mode to be used for color and/or texture coordinate interpolation.
(package private)  void setTextureBlendColor(Color4f textureBlendColor)
          Sets the texture blend color for this texture attributes object.
(package private)  void setTextureBlendColor(float r, float g, float b, float a)
          Sets the texture blend color for this appearance component object.
(package private)  void setTextureColorTable(int[][] table)
           
(package private)  void setTextureMode(int textureMode)
          Sets the texture mode parameter for this appearance component object.
(package private)  void setTextureTransform(Transform3D transform)
          Sets the texture transform object used to transform texture coordinates.
(package private)  void updateMirrorObject(int component, java.lang.Object value, java.lang.Object value2)
          Update the "component" field of the mirror object with the given "value"
(package private)  void updateNative(Canvas3D cv, boolean simulate, int textureFormat)
           
 
Methods inherited from class javax.media.j3d.NodeComponentRetained
addAMirrorUser, addUser, clearLive, copyMirrorUsers, decRefCnt, doSetLive, getDuplicateOnCloneTree, getInImmCtx, incRefCnt, notifyUsers, removeAMirrorUser, removeMirrorUsers, removeUser, set, setDuplicateOnCloneTree, setFrequencyChangeMask, setInImmCtx, setLive, updateMirrorObject
 
Methods inherited from class javax.media.j3d.SceneGraphObjectRetained
clearLive, clearLive, compile, doSetLive, doSetLive, getSource, getVirtualUniverse, isInSetLive, isStatic, markAsLive, merge, mergeTransform, setCompiled, setLive, setLive, setSource, traverse
 
Methods inherited from class javax.media.j3d.IndexedObject
getIdxUsed, incIdxUsed
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRANSFORM_CHANGED

static final int TRANSFORM_CHANGED
See Also:
Constant Field Values

MODE_CHANGED

static final int MODE_CHANGED
See Also:
Constant Field Values

COLOR_CHANGED

static final int COLOR_CHANGED
See Also:
Constant Field Values

CORRECTION_CHANGED

static final int CORRECTION_CHANGED
See Also:
Constant Field Values

TEXTURE_COLOR_TABLE_CHANGED

static final int TEXTURE_COLOR_TABLE_CHANGED
See Also:
Constant Field Values

COMBINE_RGB_MODE_CHANGED

static final int COMBINE_RGB_MODE_CHANGED
See Also:
Constant Field Values

COMBINE_ALPHA_MODE_CHANGED

static final int COMBINE_ALPHA_MODE_CHANGED
See Also:
Constant Field Values

COMBINE_RGB_SRC_CHANGED

static final int COMBINE_RGB_SRC_CHANGED
See Also:
Constant Field Values

COMBINE_ALPHA_SRC_CHANGED

static final int COMBINE_ALPHA_SRC_CHANGED
See Also:
Constant Field Values

COMBINE_RGB_FCN_CHANGED

static final int COMBINE_RGB_FCN_CHANGED
See Also:
Constant Field Values

COMBINE_ALPHA_FCN_CHANGED

static final int COMBINE_ALPHA_FCN_CHANGED
See Also:
Constant Field Values

COMBINE_RGB_SCALE_CHANGED

static final int COMBINE_RGB_SCALE_CHANGED
See Also:
Constant Field Values

COMBINE_ALPHA_SCALE_CHANGED

static final int COMBINE_ALPHA_SCALE_CHANGED
See Also:
Constant Field Values

commandInt

static java.lang.Integer[] commandInt

enums

static java.lang.Integer[] enums

transform

Transform3D transform

textureMode

int textureMode

textureBlendColor

Color4f textureBlendColor

textureColorTable

int[] textureColorTable

numTextureColorTableComponents

int numTextureColorTableComponents

textureColorTableSize

int textureColorTableSize

combineRgbMode

int combineRgbMode

combineAlphaMode

int combineAlphaMode

combineRgbSrc

int[] combineRgbSrc

combineAlphaSrc

int[] combineAlphaSrc

combineRgbFcn

int[] combineRgbFcn

combineAlphaFcn

int[] combineAlphaFcn

combineRgbScale

int combineRgbScale

combineAlphaScale

int combineAlphaScale

perspCorrectionMode

int perspCorrectionMode

mirrorCompDirty

boolean mirrorCompDirty
Constructor Detail

TextureAttributesRetained

TextureAttributesRetained()
Method Detail

initTextureEnums

static final void initTextureEnums()

initCombineMode

final void initCombineMode(TextureAttributesRetained tr)

initTextureMode

final void initTextureMode(int textureMode)

setTextureMode

final void setTextureMode(int textureMode)
Sets the texture mode parameter for this appearance component object.

Parameters:
textureMode - the texture mode, one of: MODULATE, DECAL, BLEND, or REPLACE

getTextureMode

final int getTextureMode()
Gets the texture mode parameter for this texture attributes object.

Returns:
textureMode the texture mode

initTextureBlendColor

final void initTextureBlendColor(Color4f textureBlendColor)

setTextureBlendColor

final void setTextureBlendColor(Color4f textureBlendColor)
Sets the texture blend color for this texture attributes object.

Parameters:
textureBlendColor - the texture blend color used when the mode is BLEND

initTextureBlendColor

final void initTextureBlendColor(float r,
                                 float g,
                                 float b,
                                 float a)

setTextureBlendColor

final void setTextureBlendColor(float r,
                                float g,
                                float b,
                                float a)
Sets the texture blend color for this appearance component object. This color is used when the mode is BLEND.

Parameters:
r - the red component of the color
g - the green component of the color
b - the blue component of the color
a - the alpha component of the color

getTextureBlendColor

final void getTextureBlendColor(Color4f textureBlendColor)
Gets the texture blend color for this appearance component object.

Parameters:
textureBlendColor - the vector that will receive the texture blend color used when the mode is BLEND

initTextureTransform

final void initTextureTransform(Transform3D transform)

setTextureTransform

final void setTextureTransform(Transform3D transform)
Sets the texture transform object used to transform texture coordinates. A copy of the specified Transform3D object is stored in this TextureAttributes object.

Parameters:
transform - the new transform object

getTextureTransform

final void getTextureTransform(Transform3D transform)
Retrieves a copy of the texture transform object.

Parameters:
transform - the transform object that will receive the current texture transform.

initPerspectiveCorrectionMode

final void initPerspectiveCorrectionMode(int mode)

setPerspectiveCorrectionMode

final void setPerspectiveCorrectionMode(int mode)
Sets perspective correction mode to be used for color and/or texture coordinate interpolation. A value of NICEST indicates that perspective correction should be performed and that the highest quality method should be used. A value of FASTEST indicates that the most efficient perspective correction method should be used.

Parameters:
mode - one of NICEST or FASTEST. The default value is NICEST.

getPerspectiveCorrectionMode

final int getPerspectiveCorrectionMode()
Gets perspective correction mode value.

Returns:
mode the value of perspective correction mode.

setTextureColorTable

final void setTextureColorTable(int[][] table)

initTextureColorTable

final void initTextureColorTable(int[][] table)

getTextureColorTable

final void getTextureColorTable(int[][] table)

getNumTextureColorTableComponents

final int getNumTextureColorTableComponents()

getTextureColorTableSize

final int getTextureColorTableSize()

initCombineRgbMode

final void initCombineRgbMode(int mode)

setCombineRgbMode

final void setCombineRgbMode(int mode)

getCombineRgbMode

final int getCombineRgbMode()

initCombineAlphaMode

final void initCombineAlphaMode(int mode)

setCombineAlphaMode

final void setCombineAlphaMode(int mode)

getCombineAlphaMode

final int getCombineAlphaMode()

initCombineRgbSource

final void initCombineRgbSource(int index,
                                int src)

setCombineRgbSource

final void setCombineRgbSource(int index,
                               int src)

getCombineRgbSource

final int getCombineRgbSource(int index)

initCombineAlphaSource

final void initCombineAlphaSource(int index,
                                  int src)

setCombineAlphaSource

final void setCombineAlphaSource(int index,
                                 int src)

getCombineAlphaSource

final int getCombineAlphaSource(int index)

initCombineRgbFunction

final void initCombineRgbFunction(int index,
                                  int fcn)

setCombineRgbFunction

final void setCombineRgbFunction(int index,
                                 int fcn)

getCombineRgbFunction

final int getCombineRgbFunction(int index)

initCombineAlphaFunction

final void initCombineAlphaFunction(int index,
                                    int fcn)

setCombineAlphaFunction

final void setCombineAlphaFunction(int index,
                                   int fcn)

getCombineAlphaFunction

final int getCombineAlphaFunction(int index)

initCombineRgbScale

final void initCombineRgbScale(int scale)

setCombineRgbScale

final void setCombineRgbScale(int scale)

getCombineRgbScale

final int getCombineRgbScale()

initCombineAlphaScale

final void initCombineAlphaScale(int scale)

setCombineAlphaScale

final void setCombineAlphaScale(int scale)

getCombineAlphaScale

final int getCombineAlphaScale()

updateNative

void updateNative(Canvas3D cv,
                  boolean simulate,
                  int textureFormat)

createMirrorObject

void createMirrorObject()
Creates and initializes a mirror object, point the mirror object to the retained object if the object is not editable

Overrides:
createMirrorObject in class NodeComponentRetained

initMirrorObject

void initMirrorObject()
Initializes a mirror object

Overrides:
initMirrorObject in class NodeComponentRetained

updateMirrorObject

void updateMirrorObject(int component,
                        java.lang.Object value,
                        java.lang.Object value2)
Update the "component" field of the mirror object with the given "value"


equivalent

boolean equivalent(TextureAttributesRetained tr)

clone

protected java.lang.Object clone()
Overrides:
clone in class NodeComponentRetained

set

protected void set(TextureAttributesRetained tr)

sendMessage

final void sendMessage(int attrMask,
                       java.lang.Object attr1,
                       java.lang.Object attr2)

handleFrequencyChange

void handleFrequencyChange(int bit)
Overrides:
handleFrequencyChange in class SceneGraphObjectRetained


Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.