All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.media.j3d.RenderingAttributes

java.lang.Object
   |
   +----java.media.j3d.SceneGraphObject
           |
           +----java.media.j3d.NodeComponent
                   |
                   +----java.media.j3d.RenderingAttributes

public class RenderingAttributes
extends NodeComponent
The RenderingAttributes object defines all rendering state that can be set as a component object of a Shape3D node.


Variable Index

 o ALLOW_ALPHA_TEST_FUNCTION_READ
Specifies that this RenderingAttributes object allows reading its alpha test function component information.
 o ALLOW_ALPHA_TEST_FUNCTION_WRITE
Specifies that this RenderingAttributes object allows writing its alpha test function component information.
 o ALLOW_ALPHA_TEST_VALUE_READ
Specifies that this RenderingAttributes object allows reading its alpha test value component information.
 o ALLOW_ALPHA_TEST_VALUE_WRITE
Specifies that this RenderingAttributes object allows writing its alpha test value component information.
 o ALWAYS
Indicates pixels are always drawn irrespective of alpha value.
 o EQUAL
Indicates pixels are drawn if pixel alpha value is equal to alpha test value.
 o GREATER
Indicates pixels are drawn if pixel alpha value is greater than alpha test value.
 o GREATER_OR_EQUAL
Indicates pixels are drawn if pixel alpha value is greater than or equal to alpha test value.
 o LESS
Indicates pixels are drawn if pixel alpha value is less than alpha test value.
 o LESS_OR_EQUAL
Indicates pixels are drawn if pixel alpha value is less than or equal to alpha test value.
 o NEVER
Indicates pixels are never drawn irrespective of alpha value.
 o NOT_EQUAL
Indicates pixels are drawn if pixel alpha value is not equal to alpha test value.

Constructor Index

 o RenderingAttributes()
Constructs RenderingAttributes object with default values.
 o RenderingAttributes(boolean, boolean, float, int)
Constructs RenderingAttributes object with specified values.

Method Index

 o getAlphaTestFunction()
Retrieves current alpha test function.
 o getAlphaTestValue()
Retrieves the alpha test value.
 o getDepthBufferEnable()
Retrieves the state of zBuffer Enable flag
 o getDepthBufferWriteEnable()
Retrieves the state of Depth Buffer Write Enable flag
 o setAlphaTestFunction(int)
Set alpha test function.
 o setAlphaTestValue(float)
Set alpha test value used by alpha test function.
 o setDepthBufferEnable(boolean)
Enables or disables depth buffer mode for this RenderAttributes component object.
 o setDepthBufferWriteEnable(boolean)
Enables or disables writing the depth buffer for this object.

Variables

 o ALLOW_ALPHA_TEST_VALUE_READ
 public static final int ALLOW_ALPHA_TEST_VALUE_READ
Specifies that this RenderingAttributes object allows reading its alpha test value component information.

 o ALLOW_ALPHA_TEST_VALUE_WRITE
 public static final int ALLOW_ALPHA_TEST_VALUE_WRITE
Specifies that this RenderingAttributes object allows writing its alpha test value component information.

 o ALLOW_ALPHA_TEST_FUNCTION_READ
 public static final int ALLOW_ALPHA_TEST_FUNCTION_READ
Specifies that this RenderingAttributes object allows reading its alpha test function component information.

 o ALLOW_ALPHA_TEST_FUNCTION_WRITE
 public static final int ALLOW_ALPHA_TEST_FUNCTION_WRITE
Specifies that this RenderingAttributes object allows writing its alpha test function component information.

 o ALWAYS
 public static final int ALWAYS
Indicates pixels are always drawn irrespective of alpha value. This effectively disables alpha testing.

 o NEVER
 public static final int NEVER
Indicates pixels are never drawn irrespective of alpha value.

 o EQUAL
 public static final int EQUAL
Indicates pixels are drawn if pixel alpha value is equal to alpha test value.

 o NOT_EQUAL
 public static final int NOT_EQUAL
Indicates pixels are drawn if pixel alpha value is not equal to alpha test value.

 o LESS
 public static final int LESS
Indicates pixels are drawn if pixel alpha value is less than alpha test value.

 o LESS_OR_EQUAL
 public static final int LESS_OR_EQUAL
Indicates pixels are drawn if pixel alpha value is less than or equal to alpha test value.

 o GREATER
 public static final int GREATER
Indicates pixels are drawn if pixel alpha value is greater than alpha test value.

 o GREATER_OR_EQUAL
 public static final int GREATER_OR_EQUAL
Indicates pixels are drawn if pixel alpha value is greater than or equal to alpha test value.

Constructors

 o RenderingAttributes
 public RenderingAttributes()
Constructs RenderingAttributes object with default values.

 o RenderingAttributes
 public RenderingAttributes(boolean depthBufferEnable,
                            boolean depthBufferWriteEnable,
                            float alphaTestValue,
                            int alphaTestFunction)
Constructs RenderingAttributes object with specified values.

Parameters:
depthBufferEnable - a flag to turn depth buffer on/off.
depthBufferWriteEnable - a flag to to make depth buffer read/write or read only.
alphaTestValue - the alpha test reference value.
alphaTestFunction - the function for comparing alpha values.

Methods

 o setDepthBufferEnable
 public final void setDepthBufferEnable(boolean state)
Enables or disables depth buffer mode for this RenderAttributes component object.

Parameters:
state - true or false to enable or disable depth buffer mode
Throws: RestrictedAccessException
if the method is called when this object is part of live or compiled scene graph
 o getDepthBufferEnable
 public final boolean getDepthBufferEnable()
Retrieves the state of zBuffer Enable flag

Returns:
true if depth buffer mode is enabled, false if depth buffer mode is disabled
Throws: RestrictedAccessException
if the method is called when this object is part of live or compiled scene graph
 o setDepthBufferWriteEnable
 public final void setDepthBufferWriteEnable(boolean state)
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
Throws: RestrictedAccessException
if the method is called when this object is part of live or compiled scene graph
See Also:
setDepthBufferFreezeTransparent
 o getDepthBufferWriteEnable
 public final boolean getDepthBufferWriteEnable()
Retrieves the state of Depth Buffer Write Enable flag

Returns:
true if depth buffer is writable, false if depth buffer is read-only
Throws: RestrictedAccessException
if the method is called when this object is part of live or compiled scene graph
 o setAlphaTestValue
 public final void setAlphaTestValue(float value)
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 value
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o getAlphaTestValue
 public final float getAlphaTestValue()
Retrieves the alpha test value.

Returns:
the alpha test value.
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o setAlphaTestFunction
 public final void setAlphaTestFunction(int function)
Set alpha test function. This function is used to compare the alpha test value with each per-pixel alpha value. If the test passes, then the pixel is written otherwise the pixel is not written.

Parameters:
function - the new alpha test function. One of: ALWAYS, NEVER, EQUAL, NOT_EQUAL, LESS, LESS_OR_EQUAL, GREATER, GREATER_OR_EQUAL.
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o getAlphaTestFunction
 public final int getAlphaTestFunction()
Retrieves current alpha test function.

Returns:
the current alpha test function
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph

All Packages  Class Hierarchy  This Package  Previous  Next  Index