javax.media.j3d
Class TransparencyAttributesRetained

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.TransparencyAttributesRetained
All Implemented Interfaces:
java.lang.Cloneable

 class TransparencyAttributesRetained
extends NodeComponentRetained

The TransparencyAttributes object defines all attributes affecting transparency of the object.


Field Summary
(package private) static int DST_BLEND_FUNCTION_CHANGED
           
(package private)  int dstBlendFunction
           
(package private)  int isDirty
           
(package private) static int MODE_CHANGED
           
(package private) static int SRC_BLEND_FUNCTION_CHANGED
           
(package private)  int srcBlendFunction
           
(package private)  float transparency
           
(package private)  int transparencyMode
           
(package private) static int VALUE_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
TransparencyAttributesRetained()
           
 
Method Summary
(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(TransparencyAttributesRetained tr)
           
(package private)  int getDstBlendFunction()
          Retrieves this appearance's destination blend function.
(package private)  int getSrcBlendFunction()
          Retrieves this appearance's source blend function.
(package private)  float getTransparency()
          Retrieves this appearance's transparency.
(package private)  int getTransparencyMode()
          Gets the transparency mode for this appearance component object.
(package private)  void handleFrequencyChange(int bit)
           
(package private)  void initDstBlendFunction(int blendFunction)
          Sets the destination blend function used in blended transparency and antialiasing operations.
(package private)  void initMirrorObject()
          Initializes a mirror object, point the mirror object to the retained object if the object is not editable
(package private)  void initSrcBlendFunction(int blendFunction)
          Sets the source blend function used in blended transparency and antialiasing operations.
(package private)  void initTransparency(float transparency)
          Sets this appearance's transparency.
(package private)  void initTransparencyMode(int transparencyMode)
          Sets the transparency mode for this appearance component object.
(package private)  void sendMessage(int attrMask, java.lang.Object attr)
           
protected  void set(TransparencyAttributesRetained transp)
           
(package private)  void setDstBlendFunction(int blendFunction)
          Sets the destination blend function used in blended transparency and antialiasing operations and sends a message notifying the interested structures of the change.
(package private)  void setSrcBlendFunction(int blendFunction)
          Sets the source blend function used in blended transparency and antialiasing operations and sends a message notifying the interested structures of the change.
(package private)  void setTransparency(float transparency)
          Sets this appearance's transparency and sends a message notifying the interested structures of the change.
(package private)  void setTransparencyMode(int transparencyMode)
          Sets the transparency mode for this appearance component object and sends a message notifying the interested structures of the change.
(package private)  void updateMirrorObject(int component, java.lang.Object value)
          Update the "component" field of the mirror object with the given "value"
(package private)  void updateNative(Context ctx, float alpha, int geometryType, int polygonMode, boolean lineAA, boolean pointAA)
           
 
Methods inherited from class javax.media.j3d.NodeComponentRetained
addAMirrorUser, addUser, clearLive, clone, copyMirrorUsers, decRefCnt, doSetLive, getDuplicateOnCloneTree, getInImmCtx, incRefCnt, notifyUsers, removeAMirrorUser, removeMirrorUsers, removeUser, set, setDuplicateOnCloneTree, setFrequencyChangeMask, setInImmCtx, setLive
 
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

MODE_CHANGED

static final int MODE_CHANGED
See Also:
Constant Field Values

VALUE_CHANGED

static final int VALUE_CHANGED
See Also:
Constant Field Values

SRC_BLEND_FUNCTION_CHANGED

static final int SRC_BLEND_FUNCTION_CHANGED
See Also:
Constant Field Values

DST_BLEND_FUNCTION_CHANGED

static final int DST_BLEND_FUNCTION_CHANGED
See Also:
Constant Field Values

isDirty

int isDirty

transparencyMode

int transparencyMode

transparency

float transparency

srcBlendFunction

int srcBlendFunction

dstBlendFunction

int dstBlendFunction
Constructor Detail

TransparencyAttributesRetained

TransparencyAttributesRetained()
Method Detail

initTransparencyMode

final void initTransparencyMode(int transparencyMode)
Sets the transparency mode for this appearance component object.

Parameters:
transparencyMode - the transparency mode to be used, one of NONE, FASTEST, NICEST, SCREEN_DOOR, or BLENDED

setTransparencyMode

final void setTransparencyMode(int transparencyMode)
Sets the transparency mode for this appearance component object and sends a message notifying the interested structures of the change.

Parameters:
transparencyMode - the transparency mode to be used, one of FASTEST, NICEST, SCREEN_DOOR, or BLENDED

getTransparencyMode

final int getTransparencyMode()
Gets the transparency mode for this appearance component object.

Returns:
transparencyMode the transparency mode

initTransparency

final void initTransparency(float transparency)
Sets this appearance's transparency.

Parameters:
transparency - the appearance's transparency in the range [0.0, 1.0] with 0.0 being fully opaque and 1.0 being fully transparent

setTransparency

final void setTransparency(float transparency)
Sets this appearance's transparency and sends a message notifying the interested structures of the change.

Parameters:
transparency - the appearance's transparency in the range [0.0, 1.0] with 0.0 being fully opaque and 1.0 being fully transparent

getTransparency

final float getTransparency()
Retrieves this appearance's transparency.

Returns:
the appearance's transparency

initSrcBlendFunction

final void initSrcBlendFunction(int blendFunction)
Sets the source blend function used in blended transparency and antialiasing operations. The source function specifies the factor that is multiplied by the source color; this value is added to the product of the destination factor and the destination color. The default source blend function is BLEND_SRC_ALPHA.

Parameters:
blendFunction - the blend function to be used for the source color, one of BLEND_ZERO, BLEND_ONE, BLEND_SRC_ALPHA, or BLEND_ONE_MINUS_SRC_ALPHA.

setSrcBlendFunction

final void setSrcBlendFunction(int blendFunction)
Sets the source blend function used in blended transparency and antialiasing operations and sends a message notifying the interested structures of the change. The source function specifies the factor that is multiplied by the source color; this value is added to the product of the destination factor and the destination color. The default source blend function is BLEND_SRC_ALPHA.

Parameters:
blendFunction - the blend function to be used for the source color, one of BLEND_ZERO, BLEND_ONE, BLEND_SRC_ALPHA, or BLEND_ONE_MINUS_SRC_ALPHA.

getSrcBlendFunction

final int getSrcBlendFunction()
Retrieves this appearance's source blend function.

Returns:
the appearance's source blend function

initDstBlendFunction

final void initDstBlendFunction(int blendFunction)
Sets the destination blend function used in blended transparency and antialiasing operations. The destination function specifies the factor that is multiplied by the destination color; this value is added to the product of the source factor and the source color. The default destination blend function is BLEND_ONE_MINUS_SRC_ALPHA.

Parameters:
blendFunction - the blend function to be used for the destination color, one of BLEND_ZERO, BLEND_ONE, BLEND_SRC_ALPHA, or BLEND_ONE_MINUS_SRC_ALPHA.

setDstBlendFunction

final void setDstBlendFunction(int blendFunction)
Sets the destination blend function used in blended transparency and antialiasing operations and sends a message notifying the interested structures of the change. The destination function specifies the factor that is multiplied by the destination color; this value is added to the product of the source factor and the source color. The default destination blend function is BLEND_ONE_MINUS_SRC_ALPHA.

Parameters:
blendFunction - the blend function to be used for the destination color, one of BLEND_ZERO, BLEND_ONE, BLEND_SRC_ALPHA, or BLEND_ONE_MINUS_SRC_ALPHA.

getDstBlendFunction

final int getDstBlendFunction()
Retrieves this appearance's destination blend function.

Returns:
the appearance's destination blend function

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

updateNative

void updateNative(Context ctx,
                  float alpha,
                  int geometryType,
                  int polygonMode,
                  boolean lineAA,
                  boolean pointAA)

initMirrorObject

void initMirrorObject()
Initializes a mirror object, point the mirror object to the retained object if the object is not editable

Overrides:
initMirrorObject in class NodeComponentRetained

updateMirrorObject

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

Overrides:
updateMirrorObject in class NodeComponentRetained

equivalent

boolean equivalent(TransparencyAttributesRetained tr)

set

protected void set(TransparencyAttributesRetained transp)

sendMessage

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

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.