|
|||||||||
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.RenderingAttributes
The RenderingAttributes object defines common rendering attributes for all primitive types. The rendering attributes are:
setAlphaTestFunction
method. The alpha test
function is one of the following:
setAlphaTestValue
method. The default alpha test value is 0.0.
setRasterOp
method. The raster operation
is enabled or disabled with the setRasterOpEnable
method. The raster operation is one of the following:
setIgnoreVertexColors
method. If
ignoreVertexColors is false, per-vertex colors are used, when
present in the associated geometry objects, taking
precedence over the ColoringAttributes color and Material
diffuse color. If ignoreVertexColors is true, per-vertex
colors are ignored. In this case, if lighting is enabled, the
Material diffuse color will be used as the object color.
if lighting is disabled, the ColoringAttributes color is
used. The default value is false.
setVisible
method. By default, the visibility flag is true.
setDepthBufferEnable
method enables
or disabled the depth buffer. The
setDepthBufferWriteEnable
method enables or disables
writing the depth buffer for this object. During the transparent
rendering pass, this attribute can be overridden by the
depthBufferFreezeTransparent attribute in the View
object. Transparent objects include BLENDED transparent and
antialiased lines and points. Transparent objects do not
include opaque objects or primitives rendered with
SCREEN_DOOR transparency. By default, the depth buffer
is enabled and the depth buffer write is enabled.
Appearance
Field Summary | |
static int |
ALLOW_ALPHA_TEST_FUNCTION_READ
Specifies that this RenderingAttributes object allows reading its alpha test function component information. |
static int |
ALLOW_ALPHA_TEST_FUNCTION_WRITE
Specifies that this RenderingAttributes object allows writing its alpha test function component information. |
static int |
ALLOW_ALPHA_TEST_VALUE_READ
Specifies that this RenderingAttributes object allows reading its alpha test value component information. |
static int |
ALLOW_ALPHA_TEST_VALUE_WRITE
Specifies that this RenderingAttributes object allows writing its alpha test value component information. |
static int |
ALLOW_DEPTH_ENABLE_READ
Specifies that this RenderingAttributes object allows reading its depth buffer enable and depth buffer write enable component information. |
static int |
ALLOW_IGNORE_VERTEX_COLORS_READ
Specifies that this RenderingAttributes object allows reading its ignore vertex colors information. |
static int |
ALLOW_IGNORE_VERTEX_COLORS_WRITE
Specifies that this RenderingAttributes object allows writing its ignore vertex colors information. |
static int |
ALLOW_RASTER_OP_READ
Specifies that this RenderingAttributes object allows reading its raster operation information. |
static int |
ALLOW_RASTER_OP_WRITE
Specifies that this RenderingAttributes object allows writing its raster operation information. |
static int |
ALLOW_VISIBLE_READ
Specifies that this RenderingAttributes object allows reading its visibility information. |
static int |
ALLOW_VISIBLE_WRITE
Specifies that this RenderingAttributes object allows writing its visibility information. |
static int |
ALWAYS
Indicates pixels are always drawn irrespective of alpha value. |
static int |
EQUAL
Indicates pixels are drawn if pixel alpha value is equal to alpha test value. |
static int |
GREATER
Indicates pixels are drawn if pixel alpha value is greater than alpha test value. |
static int |
GREATER_OR_EQUAL
Indicates pixels are drawn if pixel alpha value is greater than or equal to alpha test value. |
static int |
LESS
Indicates pixels are drawn if pixel alpha value is less than alpha test value. |
static int |
LESS_OR_EQUAL
Indicates pixels are drawn if pixel alpha value is less than or equal to alpha test value. |
static int |
NEVER
Indicates pixels are never drawn irrespective of alpha value. |
static int |
NOT_EQUAL
Indicates pixels are drawn if pixel alpha value is not equal to alpha test value. |
static int |
ROP_COPY
Raster operation: DST = SRC . |
static int |
ROP_XOR
Raster operation: DST = SRC ^ DST . |
Constructor Summary | |
RenderingAttributes()
Constructs a RenderingAttributes object with default parameters. |
|
RenderingAttributes(boolean depthBufferEnable,
boolean depthBufferWriteEnable,
float alphaTestValue,
int alphaTestFunction)
Constructs a RenderingAttributes object with specified values. |
|
RenderingAttributes(boolean depthBufferEnable,
boolean depthBufferWriteEnable,
float alphaTestValue,
int alphaTestFunction,
boolean visible,
boolean ignoreVertexColors,
boolean rasterOpEnable,
int rasterOp)
Constructs a RenderingAttributes object with specified values |
Method Summary | |
NodeComponent |
cloneNodeComponent()
Deprecated. replaced with cloneNodeComponent(boolean forceDuplicate) |
int |
getAlphaTestFunction()
Retrieves current alpha test function. |
float |
getAlphaTestValue()
Retrieves the alpha test value. |
boolean |
getDepthBufferEnable()
Retrieves the state of zBuffer Enable flag |
boolean |
getDepthBufferWriteEnable()
Retrieves the state of Depth Buffer Write Enable flag. |
boolean |
getIgnoreVertexColors()
Retrieves the ignoreVertexColors flag for this RenderingAttributes object. |
int |
getRasterOp()
Retrieves the current raster operation for this RenderingAttributes object. |
boolean |
getRasterOpEnable()
Retrieves the rasterOp enable flag for this RenderingAttributes object. |
boolean |
getVisible()
Retrieves the visibility flag for this RenderingAttributes object. |
void |
setAlphaTestFunction(int function)
Set alpha test function. |
void |
setAlphaTestValue(float value)
Set alpha test value used by alpha test function. |
void |
setDepthBufferEnable(boolean state)
Enables or disables depth buffer mode for this RenderingAttributes component object. |
void |
setDepthBufferWriteEnable(boolean state)
Enables or disables writing the depth buffer for this object. |
void |
setIgnoreVertexColors(boolean ignoreVertexColors)
Sets a flag that indicates whether vertex colors are ignored for this RenderingAttributes object. |
void |
setRasterOp(int rasterOp)
Sets the raster operation function for this RenderingAttributes component object. |
void |
setRasterOpEnable(boolean rasterOpEnable)
Sets the rasterOp enable flag for this RenderingAttributes component object. |
void |
setVisible(boolean visible)
Sets the visibility flag for this RenderingAttributes 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_ALPHA_TEST_VALUE_READ
public static final int ALLOW_ALPHA_TEST_VALUE_WRITE
public static final int ALLOW_ALPHA_TEST_FUNCTION_READ
public static final int ALLOW_ALPHA_TEST_FUNCTION_WRITE
public static final int ALLOW_DEPTH_ENABLE_READ
public static final int ALLOW_VISIBLE_READ
public static final int ALLOW_VISIBLE_WRITE
public static final int ALLOW_IGNORE_VERTEX_COLORS_READ
public static final int ALLOW_IGNORE_VERTEX_COLORS_WRITE
public static final int ALLOW_RASTER_OP_READ
public static final int ALLOW_RASTER_OP_WRITE
public static final int ALWAYS
public static final int NEVER
public static final int EQUAL
public static final int NOT_EQUAL
public static final int LESS
public static final int LESS_OR_EQUAL
public static final int GREATER
public static final int GREATER_OR_EQUAL
public static final int ROP_COPY
DST = SRC
.setRasterOp(int)
public static final int ROP_XOR
DST = SRC ^ DST
.setRasterOp(int)
Constructor Detail |
public RenderingAttributes()
public RenderingAttributes(boolean depthBufferEnable, boolean depthBufferWriteEnable, float alphaTestValue, int alphaTestFunction)
depthBufferEnable
- a flag to turn depth buffer on/offdepthBufferWriteEnable
- a flag to to make depth buffer
read/write or read onlyalphaTestValue
- the alpha test reference valuealphaTestFunction
- the function for comparing alpha valuespublic RenderingAttributes(boolean depthBufferEnable, boolean depthBufferWriteEnable, float alphaTestValue, int alphaTestFunction, boolean visible, boolean ignoreVertexColors, boolean rasterOpEnable, int rasterOp)
depthBufferEnable
- a flag to turn depth buffer on/offdepthBufferWriteEnable
- a flag to make depth buffer
read/write or read onlyalphaTestValue
- the alpha test reference valuealphaTestFunction
- the function for comparing alpha valuesvisible
- a flag that specifies whether the object is visibleignoreVertexColors
- a flag to enable or disable
the ignoring of per-vertex colorsrasterOpEnable
- a flag that specifies whether logical
raster operations are enabled for this RenderingAttributes object.
This disables all alpha blending operations.rasterOp
- the logical raster operation, one of ROP_COPY or
ROP_XOR.Method Detail |
public void setDepthBufferEnable(boolean state)
state
- true or false to enable or disable depth buffer modepublic boolean getDepthBufferEnable()
public void setDepthBufferWriteEnable(boolean state)
state
- true or false to enable or disable depth buffer Write modeView.setDepthBufferFreezeTransparent(boolean)
public boolean getDepthBufferWriteEnable()
public void setAlphaTestValue(float value)
value
- the alpha test valuepublic float getAlphaTestValue()
public void setAlphaTestFunction(int function)
function
- the new alpha test function. One of
ALWAYS, NEVER, EQUAL, NOT_EQUAL, LESS, LESS_OR_EQUAL, GREATER,
GREATER_OR_EQUALpublic int getAlphaTestFunction()
public void setVisible(boolean visible)
visible
- true or false to enable or disable visibilityView.setVisibilityPolicy(int)
public boolean getVisible()
public void setIgnoreVertexColors(boolean ignoreVertexColors)
ignoreVertexColors
is false, per-vertex
colors are used, when present in the associated Geometry
objects, taking precedence over the ColoringAttributes color
and Material diffuse color. If ignoreVertexColors
is true, per-vertex colors are ignored. In this case, if
lighting is enabled, the Material diffuse color will be
used as the object color. If lighting is disabled, the
ColoringAttributes color will be used. The default value is false.ignoreVertexColors
- true or false to enable or disable
the ignoring of per-vertex colorsColoringAttributes
,
Material
public boolean getIgnoreVertexColors()
public void setRasterOpEnable(boolean rasterOpEnable)
rasterOpEnable
- true or false to enable or disable
raster operationssetRasterOp(int)
public boolean getRasterOpEnable()
public void setRasterOp(int rasterOp)
rasterOp
- the logical raster operation, one of ROP_COPY or
ROP_XORpublic int getRasterOp()
public NodeComponent cloneNodeComponent()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |