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.
-
ALLOW_ALPHA_TEST_FUNCTION_READ
- Specifies that this RenderingAttributes object
allows reading its alpha test function component information.
-
ALLOW_ALPHA_TEST_FUNCTION_WRITE
- Specifies that this RenderingAttributes object
allows writing its alpha test function component information.
-
ALLOW_ALPHA_TEST_VALUE_READ
- Specifies that this RenderingAttributes object
allows reading its alpha test value component information.
-
ALLOW_ALPHA_TEST_VALUE_WRITE
- Specifies that this RenderingAttributes object
allows writing its alpha test value component information.
-
ALWAYS
- Indicates pixels are always drawn irrespective of alpha value.
-
EQUAL
- Indicates pixels are drawn if pixel alpha value is equal
to alpha test value.
-
GREATER
- Indicates pixels are drawn if pixel alpha value is greater
than alpha test value.
-
GREATER_OR_EQUAL
- Indicates pixels are drawn if pixel alpha value is greater
than or equal to alpha test value.
-
LESS
- Indicates pixels are drawn if pixel alpha value is less
than alpha test value.
-
LESS_OR_EQUAL
- Indicates pixels are drawn if pixel alpha value is less
than or equal to alpha test value.
-
NEVER
- Indicates pixels are never drawn irrespective of alpha value.
-
NOT_EQUAL
- Indicates pixels are drawn if pixel alpha value is not equal
to alpha test value.
-
RenderingAttributes()
- Constructs RenderingAttributes object with default values.
-
RenderingAttributes(boolean, boolean, float, int)
- Constructs RenderingAttributes object with specified values.
-
getAlphaTestFunction()
- Retrieves current alpha test function.
-
getAlphaTestValue()
- Retrieves the alpha test value.
-
getDepthBufferEnable()
- Retrieves the state of zBuffer Enable flag
-
getDepthBufferWriteEnable()
- Retrieves the state of Depth Buffer Write Enable flag
-
setAlphaTestFunction(int)
- Set alpha test function.
-
setAlphaTestValue(float)
- Set alpha test value used by alpha test function.
-
setDepthBufferEnable(boolean)
- Enables or disables depth buffer mode for this RenderAttributes
component object.
-
setDepthBufferWriteEnable(boolean)
- Enables or disables writing the depth buffer for this object.
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.
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.
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.
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.
ALWAYS
public static final int ALWAYS
- Indicates pixels are always drawn irrespective of alpha value.
This effectively disables alpha testing.
NEVER
public static final int NEVER
- Indicates pixels are never drawn irrespective of alpha value.
EQUAL
public static final int EQUAL
- Indicates pixels are drawn if pixel alpha value is equal
to alpha test value.
NOT_EQUAL
public static final int NOT_EQUAL
- Indicates pixels are drawn if pixel alpha value is not equal
to alpha test value.
LESS
public static final int LESS
- Indicates pixels are drawn if pixel alpha value is less
than alpha test value.
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.
GREATER
public static final int GREATER
- Indicates pixels are drawn if pixel alpha value is greater
than alpha test value.
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.
RenderingAttributes
public RenderingAttributes()
- Constructs RenderingAttributes object with default values.
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.
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
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
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
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
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
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
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
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