|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.media.j3d.SceneGraphObject | +--javax.media.j3d.NodeComponent | +--javax.media.j3d.TransparencyAttributes
The TransparencyAttributes object defines all attributes affecting transparency of the object. The transparency attributes are:
Field Summary | |
static int |
ALLOW_BLEND_FUNCTION_READ
Specifies that this TransparencyAttributes object allows reading its blend function. |
static int |
ALLOW_BLEND_FUNCTION_WRITE
Specifies that this TransparencyAttributes object allows writing its blend function. |
static int |
ALLOW_MODE_READ
Specifies that this TransparencyAttributes object allows reading its transparency mode component information. |
static int |
ALLOW_MODE_WRITE
Specifies that this TransparencyAttributes object allows writing its transparency mode component information. |
static int |
ALLOW_VALUE_READ
Specifies that this TransparencyAttributes object allows reading its transparency value. |
static int |
ALLOW_VALUE_WRITE
Specifies that this TransparencyAttributes object allows writing its transparency value. |
static int |
BLEND_ONE
Blend function: f = 1 . |
static int |
BLEND_ONE_MINUS_SRC_ALPHA
Blend function: f = 1-alphasrc . |
static int |
BLEND_SRC_ALPHA
Blend function: f = alphasrc . |
static int |
BLEND_ZERO
Blend function: f = 0 . |
static int |
BLENDED
Use alpha blended transparency. |
static int |
FASTEST
Use the fastest available method for transparency. |
static int |
NICEST
Use the nicest available method for transparency. |
static int |
NONE
No transparency, opaque object. |
static int |
SCREEN_DOOR
Use screen-door transparency. |
Constructor Summary | |
TransparencyAttributes()
Constructs a TransparencyAttributes object with default parameters. |
|
TransparencyAttributes(int tMode,
float tVal)
Construct TransparencyAttributes object with specified values. |
|
TransparencyAttributes(int tMode,
float tVal,
int srcBlendFunction,
int dstBlendFunction)
Construct TransparencyAttributes object with specified values. |
Method Summary | |
NodeComponent |
cloneNodeComponent()
Deprecated. replaced with cloneNodeComponent(boolean forceDuplicate) |
int |
getDstBlendFunction()
Gets the destination blend function for this TransparencyAttributes object. |
int |
getSrcBlendFunction()
Gets the source blend function for this TransparencyAttributes object. |
float |
getTransparency()
Retrieves this appearance's transparency. |
int |
getTransparencyMode()
Gets the transparency mode for this appearance component object. |
void |
setDstBlendFunction(int blendFunction)
Sets the destination blend function used in blended transparency and antialiasing operations. |
void |
setSrcBlendFunction(int blendFunction)
Sets the source blend function used in blended transparency and antialiasing operations. |
void |
setTransparency(float transparency)
Sets this appearance's transparency. |
void |
setTransparencyMode(int transparencyMode)
Sets the transparency mode for this appearance component object. |
Methods inherited from class javax.media.j3d.NodeComponent |
cloneNodeComponent,
duplicateNodeComponent,
duplicateNodeComponent,
getDuplicateOnCloneTree,
setDuplicateOnCloneTree |
Methods inherited from class javax.media.j3d.SceneGraphObject |
clearCapability,
duplicateSceneGraphObject,
getCapability,
getUserData,
isCompiled,
isLive,
setCapability,
setUserData,
updateNodeReferences |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int ALLOW_MODE_READ
public static final int ALLOW_MODE_WRITE
public static final int ALLOW_VALUE_READ
public static final int ALLOW_VALUE_WRITE
public static final int ALLOW_BLEND_FUNCTION_READ
public static final int ALLOW_BLEND_FUNCTION_WRITE
public static final int FASTEST
setTransparencyMode(int)
public static final int NICEST
setTransparencyMode(int)
public static final int BLENDED
alpha*src + (1-alpha)*dst
alpha
is 1-transparency
.setTransparencyMode(int)
,
setSrcBlendFunction(int)
,
setDstBlendFunction(int)
public static final int SCREEN_DOOR
setTransparencyMode(int)
public static final int NONE
setTransparencyMode(int)
public static final int BLEND_ZERO
f = 0
.setSrcBlendFunction(int)
,
setDstBlendFunction(int)
public static final int BLEND_ONE
f = 1
.setSrcBlendFunction(int)
,
setDstBlendFunction(int)
public static final int BLEND_SRC_ALPHA
f = alphasrc
.setSrcBlendFunction(int)
,
setDstBlendFunction(int)
public static final int BLEND_ONE_MINUS_SRC_ALPHA
f = 1-alphasrc
.setSrcBlendFunction(int)
,
setDstBlendFunction(int)
Constructor Detail |
public TransparencyAttributes()
NONE
BLEND_SRC_ALPHA
BLEND_ONE_MINUS_SRC_ALPHA
public TransparencyAttributes(int tMode, float tVal)
tMode
- the transparency modetVal
- the transparency valuetMode
is a value other than
NONE
, FASTEST
, NICEST
,
SCREEN_DOOR
, or BLENDED
public TransparencyAttributes(int tMode, float tVal, int srcBlendFunction, int dstBlendFunction)
tMode
- the transparency modetVal
- the transparency valuesrcBlendFunction
- 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
.dstBlendFunction
- 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
.tMode
is a value other than
NONE
, FASTEST
, NICEST
,
SCREEN_DOOR
, or BLENDED
srcBlendFunction
or dstBlendFunction
is a value other than BLEND_ZERO
, BLEND_ONE
,
BLEND_SRC_ALPHA
, or
BLEND_ONE_MINUS_SRC_ALPHA
.Method Detail |
public void setTransparencyMode(int transparencyMode)
transparencyMode
- the transparency mode to be used, one of
NONE
, FASTEST
, NICEST
,
SCREEN_DOOR
, or BLENDED
transparencyMode
is a value other than
NONE
, FASTEST
, NICEST
,
SCREEN_DOOR
, or BLENDED
public int getTransparencyMode()
public void setTransparency(float transparency)
transparency
- the appearance's transparency
in the range [0.0, 1.0] with 0.0 being
fully opaque and 1.0 being fully transparentpublic float getTransparency()
public void setSrcBlendFunction(int blendFunction)
BLEND_SRC_ALPHA
.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
.blendFunction
is a value other than BLEND_ZERO
,
BLEND_ONE
,
BLEND_SRC_ALPHA
, or
BLEND_ONE_MINUS_SRC_ALPHA
.public int getSrcBlendFunction()
public void setDstBlendFunction(int blendFunction)
BLEND_ONE_MINUS_SRC_ALPHA
.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
.blendFunction
is a value other than BLEND_ZERO
,
BLEND_ONE
,
BLEND_SRC_ALPHA
, or
BLEND_ONE_MINUS_SRC_ALPHA
.public int getDstBlendFunction()
public NodeComponent cloneNodeComponent()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |