| java.lang.Object javax.media.j3d.SceneGraphObject javax.media.j3d.NodeComponent javax.media.j3d.RenderingAttributes
RenderingAttributes | public class RenderingAttributes extends NodeComponent (Code) | | The RenderingAttributes object defines common rendering attributes
for all primitive types. The rendering attributes are:
- Depth test function - used to compare the incoming (source) depth of
each pixel with depth of the pixel stored in frame buffer. If the test
passes, the pixel is written, otherwise the pixel is not written. The depth test
function is set with the
setDepthTestFunction
method. By default, LESS_OR_EQUAL is the function used. The depth test
function is one of the following:
- ALWAYS - pixels are always drawn, irrespective of the depth
value. This effectively disables depth testing.
- NEVER - pixels are never drawn, irrespective of the depth
value.
- EQUAL - pixels are drawn if the incoming pixel depth is equal
to the stored pixel depth in the frame buffer.
- NOT_EQUAL - pixels are drawn if the incoming pixel depth is
not equal to the stored pixel depth in the frame buffer.
- LESS - pixels are drawn if the incoming pixel depth is less
than the stored pixel depth in the frame buffer.
- LESS_OR_EQUAL - pixels are drawn if the incoming pixel depth
is less than or equal to the stored pixel depth in the frame buffer.
This is the default setting.
- GREATER - pixels are drawn if the incoming pixel depth is greater
than the stored pixel depth in the frame buffer.
- GREATER_OR_EQUAL - pixels are drawn if the incoming pixel depth
is greater than or equal to the stored pixel depth in the frame buffer.
- Alpha test function - used to compare the incoming (source) alpha value
of each pixel with the alpha test value. If the test passes, the pixel is
written, otherwise the pixel is not written. The alpha test
function is set with the
setAlphaTestFunction
method. The alpha test
function is one of the following:
- ALWAYS - pixels are always drawn, irrespective of the alpha
value. This effectively disables alpha testing.
This is the default setting.
- NEVER - pixels are never drawn, irrespective of the alpha
value.
- EQUAL - pixels are drawn if the incoming pixel alpha value is equal
to the alpha test value.
- NOT_EQUAL - pixels are drawn if the incoming pixel alpha value is
not equal to the alpha test value.
- LESS - pixels are drawn if the incoming pixel alpha value is less
than the alpha test value.
- LESS_OR_EQUAL - pixels are drawn if the incoming pixel alpha value
is less than or equal to the alpha test value.
- GREATER - pixels are drawn if the incoming pixel alpha value is greater
than the alpha test value.
- GREATER_OR_EQUAL - pixels are drawn if the incoming pixel alpha
value is greater than or equal to the alpha test value.
- Alpha test value - the test value used by the alpha test function.
This value is compared to the alpha value of each rendered pixel.
The alpha test value is set with the
setAlphaTestValue
method. The default alpha test value is 0.0.
- Raster operation - the raster operation function for this
RenderingAttributes component object. The raster operation is
set with the
setRasterOp method. The raster operation
is enabled or disabled with the setRasterOpEnable
method. The raster operation is one of the following:
- ROP_CLEAR - DST = 0.
- ROP_AND DST = SRC & DST.
- ROP_AND_REVERSE DST = SRC & ~DST.
- ROP_COPY - DST = SRC. This is the default operation.
- ROP_AND_INVERTED - DST = ~SRC & DST.
- ROP_NOOP - DST = DST.
- ROP_XOR - DST = SRC ^ DST.
- ROP_OR - DST = DST | SRC.
- ROP_NOR - DST = ~( DST | SRC .)
- ROP_EQUIV - DST = ~( DST ^ SRC .)
- ROP_INVERT - DST = ~DST.
- ROP_OR_REVERSE - DST = src | ~DST.
- ROP_COPY_INVERTED - DST = ~SRC.
- ROP_OR_INVERTED - DST = ~SRC | DST.
- ROP_NAND - DST = ~(SRC & DST.)
- ROP_SET - DST = 1.
- Vertex colors - vertex colors can be ignored for this
RenderingAttributes object. This capability is set with the
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 the
specified Material color(s). 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.
- Visibility flag - when set, invisible objects are
not rendered (subject to the visibility policy for
the current view), but they can be picked or collided with.
This flag is set with the
setVisible
method. By default, the visibility flag is true.
- Depth buffer - can be enabled or disabled for this
RenderingAttributes component object. The
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.
- Stencil buffer - can be enabled or disabled for this RenderingAttributes
component object using the
setStencilEnable method. If the
stencil buffer is disabled, the stencil operation and function are ignored.
If a scene graph is rendered on a Canvas3D that does not have a stencil
buffer, the stencil buffer will be implicitly disabled for that
canvas.
- Stencil write mask - mask that controls which bits of the stencil
buffer are written when the stencil buffer is enabled. The default value is
~0 (all ones).
- Stencil operation - a set of three stencil operations performed
when: 1) the stencil test fails; 2) the stencil test passes, but
the depth test fails; or 3) both the stencil test and depth test pass.
The stencil operations are set with the
setStencilOp
method. The stencil operation is one of the following:
- STENCIL_KEEP - keeps the current value (no operation performed).
This is the default setting.
- STENCIL_ZERO - Sets the stencil buffer value to 0.
- STENCIL_REPLACE - Sets the stencil buffer value to
refValue , as specified by setStencilFunction .
- STENCIL_INCR - Increments the current stencil buffer value.
- STENCIL_DECR - Decrements the current stencil buffer value.
- STENCIL_INVERT - Bitwise inverts the current stencil buffer value.
- Stencil test function - used to compare the stencil reference value with
the per-pixel stencil value stored in the frame buffer. If the test passes,
the pixel is written, otherwise the pixel is not written. The stencil
test function, reference value, and comparison mask are set with the
setStencilFunction method. The stencil comparison mask is
bitwise-ANDed with both the stencil reference value and the stored stencil
value prior to doing the comparison. The default value for the reference value
is 0. The default value for the comparison mask is ~0 (all ones).
The stencil test function is one of the following:
- ALWAYS - pixels are always drawn, irrespective of the stencil
value. This effectively disables stencil testing.
This is the default setting.
- NEVER - pixels are never drawn, irrespective of the stencil
value.
- EQUAL - pixels are drawn if the stencil reference value is equal
to the stored stencil value in the frame buffer.
- NOT_EQUAL - pixels are drawn if the stencil reference value is
not equal to the stored stencil value in the frame buffer.
- LESS - pixels are drawn if the stencil reference value is less
than the stored stencil value in the frame buffer.
- LESS_OR_EQUAL - pixels are drawn if the stencil reference value
is less than or equal to the stored stencil value in the frame buffer.
- GREATER - pixels are drawn if the stencil reference value is greater
than the stored stencil value in the frame buffer.
- GREATER_OR_EQUAL - pixels are drawn if the stencil reference value
is greater than or equal to the stored stencil value in the frame buffer.
Note: the alpha test, depth test, and stencil functions all use
the same enums.
See Also: Appearance |
Field Summary | |
final public static int | ALLOW_ALPHA_TEST_FUNCTION_READ Specifies that this RenderingAttributes object
allows reading its alpha test function component information. | final public static int | ALLOW_ALPHA_TEST_FUNCTION_WRITE Specifies that this RenderingAttributes object
allows writing its alpha test function component information. | final public static int | ALLOW_ALPHA_TEST_VALUE_READ Specifies that this RenderingAttributes object
allows reading its alpha test value component information. | final public static int | ALLOW_ALPHA_TEST_VALUE_WRITE Specifies that this RenderingAttributes object
allows writing its alpha test value component information. | final public static int | ALLOW_DEPTH_ENABLE_READ Specifies that this RenderingAttributes object
allows reading its depth buffer enable and depth buffer write enable
component information. | final public static int | ALLOW_DEPTH_ENABLE_WRITE Specifies that this RenderingAttributes object
allows writing its depth buffer enable and depth buffer write enable
component information. | final public static int | ALLOW_DEPTH_TEST_FUNCTION_READ Specifies that this RenderingAttributes object
allows reading its depth test function component information. | final public static int | ALLOW_DEPTH_TEST_FUNCTION_WRITE Specifies that this RenderingAttributes object
allows writing its depth test function component information. | final public static int | ALLOW_IGNORE_VERTEX_COLORS_READ Specifies that this RenderingAttributes object
allows reading its ignore vertex colors information. | final public static int | ALLOW_IGNORE_VERTEX_COLORS_WRITE Specifies that this RenderingAttributes object
allows writing its ignore vertex colors information. | final public static int | ALLOW_RASTER_OP_READ Specifies that this RenderingAttributes object
allows reading its raster operation information. | final public static int | ALLOW_RASTER_OP_WRITE Specifies that this RenderingAttributes object
allows writing its raster operation information. | final public static int | ALLOW_STENCIL_ATTRIBUTES_READ Specifies that this RenderingAttributes object allows reading
its stencil enable, stencil op, stencil function, and
stencil write mask information. | final public static int | ALLOW_STENCIL_ATTRIBUTES_WRITE Specifies that this RenderingAttributes object allows writing
its stencil enable, stencil op, stencil function, and
stencil write mask information. | final public static int | ALLOW_VISIBLE_READ Specifies that this RenderingAttributes object
allows reading its visibility information. | final public static int | ALLOW_VISIBLE_WRITE Specifies that this RenderingAttributes object
allows writing its visibility information. | final public static int | ALWAYS Specifies that pixels are always drawn irrespective of the
values being tested. | final public static int | EQUAL Specifies that pixels are drawn if the two values being tested are equal. | final public static int | GREATER Specifies that pixels are drawn if the source/reference value is greater
than the destination/test value. | final public static int | GREATER_OR_EQUAL Specifies that pixels are drawn if the source/reference value is greater
than or equal to the destination/test value. | final public static int | LESS Specifies that pixels are drawn if the source/reference value is less
than the destination/test value. | final public static int | LESS_OR_EQUAL Specifies that pixels are drawn if the source/reference value is less
than or equal to the destination/test value. | final public static int | NEVER Specifies that pixels are never drawn irrespective of the
values being tested. | final public static int | NOT_EQUAL Specifies that pixels are drawn if the two values being tested are not equal. | final public static int | ROP_AND Raster operation: DST = SRC & DST . | final public static int | ROP_AND_INVERTED Raster operation: DST = ~SRC & DST . | final public static int | ROP_AND_REVERSE Raster operation: DST = SRC & ~DST . | final public static int | ROP_CLEAR Raster operation: DST = 0 . | final public static int | ROP_COPY Raster operation: DST = SRC . | final public static int | ROP_COPY_INVERTED Raster operation: DST = ~SRC . | final public static int | ROP_EQUIV Raster operation: DST = ~( DST ^ SRC ) . | final public static int | ROP_INVERT Raster operation: DST = ~DST . | final public static int | ROP_NAND Raster operation: DST = ~(SRC & DST) . | final public static int | ROP_NOOP Raster operation: DST = DST . | final public static int | ROP_NOR Raster operation: DST = ~( DST | SRC ) . | final public static int | ROP_OR Raster operation: DST = DST | SRC . | final public static int | ROP_OR_INVERTED Raster operation: DST = ~SRC | DST . | final public static int | ROP_OR_REVERSE Raster operation: DST = src | ~DST . | final public static int | ROP_SET Raster operation: DST = 1 . | final public static int | ROP_XOR Raster operation: DST = SRC ^ DST . | final public static int | STENCIL_DECR | final public static int | STENCIL_INCR | final public static int | STENCIL_INVERT | final public static int | STENCIL_KEEP | final public static int | STENCIL_REPLACE | final public static int | STENCIL_ZERO |
Constructor Summary | |
public | RenderingAttributes() Constructs a RenderingAttributes object with default parameters. | public | RenderingAttributes(boolean depthBufferEnable, boolean depthBufferWriteEnable, float alphaTestValue, int alphaTestFunction) Constructs a RenderingAttributes object with specified values. | public | RenderingAttributes(boolean depthBufferEnable, boolean depthBufferWriteEnable, float alphaTestValue, int alphaTestFunction, boolean visible, boolean ignoreVertexColors, boolean rasterOpEnable, int rasterOp) |
Method Summary | |
public NodeComponent | cloneNodeComponent() | void | createRetained() Creates a retained mode RenderingAttributesRetained object that this
RenderingAttributes component object will point to. | void | duplicateAttributes(NodeComponent originalNodeComponent, boolean forceDuplicate) Copies all node information from originalNodeComponent into
the current node. | public int | getAlphaTestFunction() Retrieves current alpha test function. | public float | getAlphaTestValue() Retrieves the alpha test value. | public boolean | getDepthBufferEnable() | public boolean | getDepthBufferWriteEnable() Retrieves the state of Depth Buffer Write Enable flag. | public int | getDepthTestFunction() Retrieves current depth test function. | public boolean | getIgnoreVertexColors() Retrieves the ignoreVertexColors flag for this
RenderingAttributes object. | public int | getRasterOp() Retrieves the current raster operation for this RenderingAttributes
object. | public boolean | getRasterOpEnable() Retrieves the rasterOp enable flag for this RenderingAttributes
object. | public boolean | getStencilEnable() Retrieves the stencil buffer enable flag for this RenderingAttributes
object. | public void | getStencilFunction(int[] params) Retrieves the stencil function, reference value, and comparison mask,
and copies them into the specified array. | public void | getStencilOp(int[] stencilOps) Retrieves the current set of stencil operations, and copies them
into the specified array. | public int | getStencilWriteMask() Retrieves the current stencil write mask for this RenderingAttributes
object. | public boolean | getVisible() Retrieves the visibility flag for this RenderingAttributes object. | public void | setAlphaTestFunction(int function) Set alpha test function. | public void | setAlphaTestValue(float value) Set alpha test value used by alpha test function. | public void | setDepthBufferEnable(boolean state) Enables or disables depth buffer mode for this RenderingAttributes
component object. | public void | setDepthBufferWriteEnable(boolean state) Enables or disables writing the depth buffer for this object. | public void | setDepthTestFunction(int function) Set depth test function. | public void | setIgnoreVertexColors(boolean ignoreVertexColors) Sets a flag that indicates whether vertex colors are ignored
for this RenderingAttributes object. | public void | setRasterOp(int rasterOp) Sets the raster operation function for this RenderingAttributes
component object. | public void | setRasterOpEnable(boolean rasterOpEnable) Sets the rasterOp enable flag for this RenderingAttributes
component object. | public void | setStencilEnable(boolean state) Enables or disables the stencil buffer for this RenderingAttributes
component object. | public void | setStencilFunction(int function, int refValue, int compareMask) Sets the stencil function, reference value, and comparison mask
for this RenderingAttributes object to the specified parameters.
Parameters: function - the stencil test function, used to compare thestencil reference value with the stored per-pixelstencil value in the frame buffer. | public void | setStencilFunction(int[] params) Sets the stencil function, reference value, and comparison mask
for this RenderingAttributes object to the specified parameters. | public void | setStencilOp(int failOp, int zFailOp, int zPassOp) Sets the stencil operations for this RenderingAttributes object to the
specified parameters. | public void | setStencilOp(int[] stencilOps) Sets the stencil operations for this RenderingAttributes object to the
specified parameters.
Parameters: stencilOps - an array of three integers that specifies the newset of stencil operations. | public void | setStencilWriteMask(int mask) Sets the stencil write mask for this RenderingAttributes
object. | public void | setVisible(boolean visible) Sets the visibility flag for this RenderingAttributes
component object. |
ALLOW_ALPHA_TEST_FUNCTION_READ | final public static int ALLOW_ALPHA_TEST_FUNCTION_READ(Code) | | Specifies that this RenderingAttributes object
allows reading its alpha test function component information.
|
ALLOW_ALPHA_TEST_FUNCTION_WRITE | final public static int ALLOW_ALPHA_TEST_FUNCTION_WRITE(Code) | | Specifies that this RenderingAttributes object
allows writing its alpha test function component information.
|
ALLOW_ALPHA_TEST_VALUE_READ | final public static int ALLOW_ALPHA_TEST_VALUE_READ(Code) | | Specifies that this RenderingAttributes object
allows reading its alpha test value component information.
|
ALLOW_ALPHA_TEST_VALUE_WRITE | final public static int ALLOW_ALPHA_TEST_VALUE_WRITE(Code) | | Specifies that this RenderingAttributes object
allows writing its alpha test value component information.
|
ALLOW_DEPTH_ENABLE_READ | final public static int ALLOW_DEPTH_ENABLE_READ(Code) | | Specifies that this RenderingAttributes object
allows reading its depth buffer enable and depth buffer write enable
component information.
|
ALLOW_DEPTH_ENABLE_WRITE | final public static int ALLOW_DEPTH_ENABLE_WRITE(Code) | | Specifies that this RenderingAttributes object
allows writing its depth buffer enable and depth buffer write enable
component information.
since: Java 3D 1.3 |
ALLOW_DEPTH_TEST_FUNCTION_READ | final public static int ALLOW_DEPTH_TEST_FUNCTION_READ(Code) | | Specifies that this RenderingAttributes object
allows reading its depth test function component information.
since: Java 3D 1.4 |
ALLOW_DEPTH_TEST_FUNCTION_WRITE | final public static int ALLOW_DEPTH_TEST_FUNCTION_WRITE(Code) | | Specifies that this RenderingAttributes object
allows writing its depth test function component information.
since: Java 3D 1.4 |
ALLOW_IGNORE_VERTEX_COLORS_READ | final public static int ALLOW_IGNORE_VERTEX_COLORS_READ(Code) | | Specifies that this RenderingAttributes object
allows reading its ignore vertex colors information.
since: Java 3D 1.2 |
ALLOW_IGNORE_VERTEX_COLORS_WRITE | final public static int ALLOW_IGNORE_VERTEX_COLORS_WRITE(Code) | | Specifies that this RenderingAttributes object
allows writing its ignore vertex colors information.
since: Java 3D 1.2 |
ALLOW_RASTER_OP_READ | final public static int ALLOW_RASTER_OP_READ(Code) | | Specifies that this RenderingAttributes object
allows reading its raster operation information.
since: Java 3D 1.2 |
ALLOW_RASTER_OP_WRITE | final public static int ALLOW_RASTER_OP_WRITE(Code) | | Specifies that this RenderingAttributes object
allows writing its raster operation information.
since: Java 3D 1.2 |
ALLOW_STENCIL_ATTRIBUTES_READ | final public static int ALLOW_STENCIL_ATTRIBUTES_READ(Code) | | Specifies that this RenderingAttributes object allows reading
its stencil enable, stencil op, stencil function, and
stencil write mask information.
since: Java 3D 1.4 |
ALLOW_STENCIL_ATTRIBUTES_WRITE | final public static int ALLOW_STENCIL_ATTRIBUTES_WRITE(Code) | | Specifies that this RenderingAttributes object allows writing
its stencil enable, stencil op, stencil function, and
stencil write mask information.
since: Java 3D 1.4 |
ALLOW_VISIBLE_READ | final public static int ALLOW_VISIBLE_READ(Code) | | Specifies that this RenderingAttributes object
allows reading its visibility information.
since: Java 3D 1.2 |
ALLOW_VISIBLE_WRITE | final public static int ALLOW_VISIBLE_WRITE(Code) | | Specifies that this RenderingAttributes object
allows writing its visibility information.
since: Java 3D 1.2 |
RenderingAttributes | public RenderingAttributes()(Code) | | Constructs a RenderingAttributes object with default parameters.
The default values are as follows:
depth buffer enable : true
depth buffer write enable : true
alpha test function : ALWAYS
alpha test value : 0.0f
visible : true
ignore vertex colors : false
raster operation enable : false
raster operation : ROP_COPY
depth test: LESS_OR_EQUAL
stencil enable : false
stencil write mask : ~0 (all ones)
stencil op - failOp : STENCIL_KEEP
stencil op - zFailOp : STENCIL_KEEP
stencil op - zPassOp : STENCIL_KEEP
stencil function : ALWAYS
stencil reference value : 0
stencil comparison mask : ~0 (all ones)
|
RenderingAttributes | public RenderingAttributes(boolean depthBufferEnable, boolean depthBufferWriteEnable, float alphaTestValue, int alphaTestFunction)(Code) | | Constructs a RenderingAttributes object with specified values.
Parameters: depthBufferEnable - a flag to turn depth buffer on/off Parameters: depthBufferWriteEnable - a flag to to make depth bufferread/write or read only Parameters: alphaTestValue - the alpha test reference value Parameters: alphaTestFunction - the function for comparing alpha values |
RenderingAttributes | public RenderingAttributes(boolean depthBufferEnable, boolean depthBufferWriteEnable, float alphaTestValue, int alphaTestFunction, boolean visible, boolean ignoreVertexColors, boolean rasterOpEnable, int rasterOp)(Code) | | Constructs a RenderingAttributes object with specified values
Parameters: depthBufferEnable - a flag to turn depth buffer on/off Parameters: depthBufferWriteEnable - a flag to make depth bufferread/write or read only Parameters: alphaTestValue - the alpha test reference value Parameters: alphaTestFunction - the function for comparing alpha values Parameters: visible - a flag that specifies whether the object is visible Parameters: ignoreVertexColors - a flag to enable or disablethe ignoring of per-vertex colors Parameters: rasterOpEnable - a flag that specifies whether logicalraster operations are enabled for this RenderingAttributes object.This disables all alpha blending operations. Parameters: rasterOp - the logical raster operation, one of:ROP_CLEAR, ROP_AND, ROP_AND_REVERSE, ROP_COPY, ROP_AND_INVERTED,ROP_NOOP, ROP_XOR, ROP_OR, ROP_NOR, ROP_EQUIV, ROP_INVERT,ROP_OR_REVERSE, ROP_COPY_INVERTED, ROP_OR_INVERTED, ROP_NAND or ROP_SET since: Java 3D 1.2 |
createRetained | void createRetained()(Code) | | Creates a retained mode RenderingAttributesRetained object that this
RenderingAttributes component object will point to.
|
duplicateAttributes | void duplicateAttributes(NodeComponent originalNodeComponent, boolean forceDuplicate)(Code) | | Copies all node information from originalNodeComponent into
the current node. This method is called from the
duplicateNode method. This routine does
the actual duplication of all "local data" (any data defined in
this object).
Parameters: originalNodeComponent - the original node to duplicate. Parameters: forceDuplicate - when set to true , causes theduplicateOnCloneTree flag to be ignored. Whenfalse , the value of each node'sduplicateOnCloneTree variable determines whetherNodeComponent data is duplicated or copied. See Also: Node.cloneTree See Also: NodeComponent.setDuplicateOnCloneTree |
getAlphaTestFunction | public int getAlphaTestFunction()(Code) | | Retrieves current alpha test function.
the current alpha test function exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph |
getAlphaTestValue | public float getAlphaTestValue()(Code) | | Retrieves the alpha test value.
the alpha test value. exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph |
getDepthBufferEnable | public boolean getDepthBufferEnable()(Code) | | Retrieves the state of zBuffer Enable flag
true if depth buffer mode is enabled, falseif depth buffer mode is disabled exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph |
getDepthBufferWriteEnable | public boolean getDepthBufferWriteEnable()(Code) | | Retrieves the state of Depth Buffer Write Enable flag.
true if depth buffer is writable, falseif depth buffer is read-only exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph |
getDepthTestFunction | public int getDepthTestFunction()(Code) | | Retrieves current depth test function.
the current depth test function exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph since: Java 3D 1.4 |
getIgnoreVertexColors | public boolean getIgnoreVertexColors()(Code) | | Retrieves the ignoreVertexColors flag for this
RenderingAttributes object.
true if per-vertex colors are ignored; falseif per-vertex colors are used. exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph since: Java 3D 1.2 |
getRasterOp | public int getRasterOp()(Code) | | Retrieves the current raster operation for this RenderingAttributes
object.
one of:ROP_CLEAR, ROP_AND, ROP_AND_REVERSE, ROP_COPY, ROP_AND_INVERTED,ROP_NOOP, ROP_XOR, ROP_OR, ROP_NOR, ROP_EQUIV, ROP_INVERT,ROP_OR_REVERSE, ROP_COPY_INVERTED, ROP_OR_INVERTED, ROP_NAND or ROP_SET exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph since: Java 3D 1.2 |
getRasterOpEnable | public boolean getRasterOpEnable()(Code) | | Retrieves the rasterOp enable flag for this RenderingAttributes
object.
true if raster operations are enabled; falseif raster operations are disabled. exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph since: Java 3D 1.2 |
getStencilEnable | public boolean getStencilEnable()(Code) | | Retrieves the stencil buffer enable flag for this RenderingAttributes
object.
true if stencil buffer operations are enabled; falseif stencil buffer operations are disabled. exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph since: Java 3D 1.4 |
getStencilFunction | public void getStencilFunction(int[] params)(Code) | | Retrieves the stencil function, reference value, and comparison mask,
and copies them into the specified array. The caller must ensure
that this array has been allocated with enough space to hold the results.
Parameters: params - array that will receive the current stencil function,reference value, and comparison mask. The stencil function is copiedinto element 0 of the array, the reference value is copiedinto element 1, and the comparison mask is copiedinto element 2. exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph since: Java 3D 1.4 |
getStencilOp | public void getStencilOp(int[] stencilOps)(Code) | | Retrieves the current set of stencil operations, and copies them
into the specified array. The caller must ensure that this array
has been allocated with enough space to hold the results.
Parameters: stencilOps - array that will receive the current set ofthree stencil operations. The failOp parameter is copiedinto element 0 of the array, the zFailOp parameter is copiedinto element 1, and the zPassOp parameter is copiedinto element 2. exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph since: Java 3D 1.4 |
getStencilWriteMask | public int getStencilWriteMask()(Code) | | Retrieves the current stencil write mask for this RenderingAttributes
object.
the stencil write mask. exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph since: Java 3D 1.4 |
getVisible | public boolean getVisible()(Code) | | Retrieves the visibility flag for this RenderingAttributes object.
true if the object is visible; falseif the object is invisible. exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph since: Java 3D 1.2 |
setAlphaTestFunction | public void setAlphaTestFunction(int function)(Code) | | Set alpha test function. This function is used to compare
each incoming (source) per-pixel alpha value with the alpha test value.
If the test passes, the pixel is written otherwise the pixel is not
written.
Parameters: function - the new alpha test function. One ofALWAYS, NEVER, EQUAL, NOT_EQUAL, LESS, LESS_OR_EQUAL, GREATER,GREATER_OR_EQUAL exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph |
setAlphaTestValue | public void setAlphaTestValue(float value)(Code) | | Set alpha test value used by alpha test function. This value is
compared to the alpha value of each rendered pixel.
Parameters: value - the alpha test value exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph |
setDepthBufferEnable | public void setDepthBufferEnable(boolean state)(Code) | | Enables or disables depth buffer mode for this RenderingAttributes
component object.
Parameters: state - true or false to enable or disable depth buffer mode exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph See Also: GraphicsConfigTemplate3D.setDepthSize |
setDepthBufferWriteEnable | public void setDepthBufferWriteEnable(boolean state)(Code) | | 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.
Parameters: state - true or false to enable or disable depth buffer Write mode exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph See Also: View.setDepthBufferFreezeTransparent |
setDepthTestFunction | public void setDepthTestFunction(int function)(Code) | | Set depth test function. This function is used to compare each
incoming (source) per-pixel depth test value with the stored per-pixel
depth value in the frame buffer. If the test
passes, the pixel is written, otherwise the pixel is not
written.
Parameters: function - the new depth test function. One ofALWAYS, NEVER, EQUAL, NOT_EQUAL, LESS, LESS_OR_EQUAL, GREATER,or GREATER_OR_EQUAL.The default value is LESS_OR_EQUAL. exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph since: Java 3D 1.4 |
setIgnoreVertexColors | public void setIgnoreVertexColors(boolean ignoreVertexColors)(Code) | | Sets a flag that indicates whether vertex colors are ignored
for this RenderingAttributes object. If
ignoreVertexColors is false, per-vertex
colors are used, when present in the associated Geometry
objects, taking precedence over the ColoringAttributes color
and the specified Material color(s). 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.
Parameters: ignoreVertexColors - true or false to enable or disablethe ignoring of per-vertex colors exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph See Also: ColoringAttributes See Also: Material since: Java 3D 1.2 |
setRasterOp | public void setRasterOp(int rasterOp)(Code) | | Sets the raster operation function for this RenderingAttributes
component object.
Parameters: rasterOp - the logical raster operation, one of:ROP_CLEAR, ROP_AND, ROP_AND_REVERSE, ROP_COPY, ROP_AND_INVERTED,ROP_NOOP, ROP_XOR, ROP_OR, ROP_NOR, ROP_EQUIV, ROP_INVERT,ROP_OR_REVERSE, ROP_COPY_INVERTED, ROP_OR_INVERTED, ROP_NAND or ROP_SET. exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph since: Java 3D 1.2 |
setRasterOpEnable | public void setRasterOpEnable(boolean rasterOpEnable)(Code) | | Sets the rasterOp enable flag for this RenderingAttributes
component object. When set to true, this enables logical
raster operations as specified by the setRasterOp method.
Enabling raster operations effectively disables alpha blending,
which is used for transparency and antialiasing. Raster
operations, especially XOR mode, are primarily useful when
rendering to the front buffer in immediate mode. Most
applications will not wish to enable this mode.
Parameters: rasterOpEnable - true or false to enable or disableraster operations exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph See Also: RenderingAttributes.setRasterOp since: Java 3D 1.2 |
setStencilEnable | public void setStencilEnable(boolean state)(Code) | | Enables or disables the stencil buffer for this RenderingAttributes
component object. If the stencil buffer is disabled, the
stencil operation and function are ignored. If a scene graph
is rendered on a Canvas3D that does not have a stencil buffer,
the stencil buffer will be implicitly disabled for that canvas.
Parameters: state - true or false to enable or disable stencil bufferoperations.If this is set to false, the stencilOp and stencilFunction parametersare not used. exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph See Also: GraphicsConfigTemplate3D.setStencilSize since: Java 3D 1.4 |
setStencilFunction | public void setStencilFunction(int function, int refValue, int compareMask)(Code) | | Sets the stencil function, reference value, and comparison mask
for this RenderingAttributes object to the specified parameters.
Parameters: function - the stencil test function, used to compare thestencil reference value with the stored per-pixelstencil value in the frame buffer. If the testpasses, the pixel is written, otherwise the pixel is notwritten. The stencil function is one of:ALWAYS, NEVER, EQUAL, NOT_EQUAL, LESS, LESS_OR_EQUAL, GREATER,or GREATER_OR_EQUAL. Parameters: refValue - the stencil reference value that is tested againstthe stored per-pixel stencil value Parameters: compareMask - a mask that limits which bits are compared; it isbitwise-ANDed with both the stencil reference value and the storedper-pixel stencil value before doing the comparison. exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph since: Java 3D 1.4 |
setStencilFunction | public void setStencilFunction(int[] params)(Code) | | Sets the stencil function, reference value, and comparison mask
for this RenderingAttributes object to the specified parameters.
Parameters: params - an array of three integers that specifies the newstencil function, reference value, and comparison mask.Element 0 of the array specifies thestencil function, element 1 specifies thereference value, and element 2 specifies thecomparison mask. exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph See Also: RenderingAttributes.setStencilFunction(int,int,int) since: Java 3D 1.4 |
setStencilOp | public void setStencilOp(int failOp, int zFailOp, int zPassOp)(Code) | | Sets the stencil operations for this RenderingAttributes object to the
specified parameters.
Parameters: failOp - operation performed when the stencil test fails, one of:STENCIL_KEEP, STENCIL_ZERO, STENCIL_REPLACE, STENCIL_INCR, STENCIL_DECR,or STENCIL_INVERT. Parameters: zFailOp - operation performed when the stencil test passes and thedepth test fails, one of:STENCIL_KEEP, STENCIL_ZERO, STENCIL_REPLACE, STENCIL_INCR, STENCIL_DECR,or STENCIL_INVERT. Parameters: zPassOp - operation performed when both the stencil test and thedepth test pass, one of:STENCIL_KEEP, STENCIL_ZERO, STENCIL_REPLACE, STENCIL_INCR, STENCIL_DECR,or STENCIL_INVERT. exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph since: Java 3D 1.4 |
setStencilOp | public void setStencilOp(int[] stencilOps)(Code) | | Sets the stencil operations for this RenderingAttributes object to the
specified parameters.
Parameters: stencilOps - an array of three integers that specifies the newset of stencil operations. Element 0 of the array specifies thefailOp parameter, element 1 specifies thezFailOp parameter, and element 2 specifies thezPassOp parameter. exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph See Also: RenderingAttributes.setStencilOp(int,int,int) since: Java 3D 1.4 |
setStencilWriteMask | public void setStencilWriteMask(int mask)(Code) | | Sets the stencil write mask for this RenderingAttributes
object. This mask controls which bits of the
stencil buffer are written.
The default value is ~0 (all ones).
Parameters: mask - the new stencil write mask. exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph since: Java 3D 1.4 |
setVisible | public void setVisible(boolean visible)(Code) | | Sets the visibility flag for this RenderingAttributes
component object. Invisible objects are not rendered (subject to
the visibility policy for the current view), but they can be picked
or collided with. The default value is true.
Parameters: visible - true or false to enable or disable visibility exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph See Also: View.setVisibilityPolicy since: Java 3D 1.2 |
Fields inherited from javax.media.j3d.NodeComponent | boolean forceDuplicate(Code)(Java Doc)
|
|
|