All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.media.j3d.TextureAttributes

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

public class TextureAttributes
extends NodeComponent
The TextureAttributes object defines attributes that apply to to texture mapping.


Variable Index

 o ALLOW_BLEND_COLOR_READ
Specifies that this TextureAttributes object allows reading its texture blend color component information.
 o ALLOW_BLEND_COLOR_WRITE
Specifies that this TextureAttributes object allows writing its texture blend color component information.
 o ALLOW_MODE_READ
Specifies that this TextureAttributes object allows reading its texture mode component information and perspective correction mode.
 o ALLOW_MODE_WRITE
Specifies that this TextureAttributes object allows writing its texture mode component information and perspective correction mode.
 o ALLOW_TRANSFORM_READ
Specifies that this TextureAttributes object allows reading its texture transform component information.
 o ALLOW_TRANSFORM_WRITE
Specifies that this TextureAttributes object allows writing its texture transform component information.
 o BLEND
Blend the texture blend color with the object color.
 o DECAL
Apply the texture color to the object as a decal.
 o FASTEST
Use the fastest available method for perspective correction.
 o MODULATE
Modulate the object color with the texture color.
 o NICEST
Use the nicest (highest quality) available method for texture mapping perspective correction.
 o REPLACE
Replace the object color with the texture color.

Constructor Index

 o TextureAttributes()
Construct a TextureAttributes with default values.
 o TextureAttributes(int, Transform3D, Color4f, int)
Construct a TextureAttributes with specified values.

Method Index

 o getPerspectiveCorrectionMode()
Gets perspective correction mode value.
 o getTextureBlendColor(Color4f)
Gets the texture blend color for this appearance component object.
 o getTextureMode()
Gets the texture mode parameter for this appearance component object.
 o getTextureTransform(Transform3D)
Retrieves a copy of the texture transform object.
 o setPerspectiveCorrectionMode(int)
Sets perspective correction mode to be used for color and/or texture coordinate interpolation.
 o setTextureBlendColor(Color4f)
Sets the texture blend color for this appearance component object.
 o setTextureBlendColor(float, float, float, float)
Sets the texture blend color for this appearance component object.
 o setTextureMode(int)
Sets the texture mode parameter for this appearance component object.
 o setTextureTransform(Transform3D)
Sets the texture transform object used to transform texture coordinates.

Variables

 o ALLOW_MODE_READ
 public static final int ALLOW_MODE_READ
Specifies that this TextureAttributes object allows reading its texture mode component information and perspective correction mode.

 o ALLOW_MODE_WRITE
 public static final int ALLOW_MODE_WRITE
Specifies that this TextureAttributes object allows writing its texture mode component information and perspective correction mode.

 o ALLOW_BLEND_COLOR_READ
 public static final int ALLOW_BLEND_COLOR_READ
Specifies that this TextureAttributes object allows reading its texture blend color component information.

 o ALLOW_BLEND_COLOR_WRITE
 public static final int ALLOW_BLEND_COLOR_WRITE
Specifies that this TextureAttributes object allows writing its texture blend color component information.

 o ALLOW_TRANSFORM_READ
 public static final int ALLOW_TRANSFORM_READ
Specifies that this TextureAttributes object allows reading its texture transform component information.

 o ALLOW_TRANSFORM_WRITE
 public static final int ALLOW_TRANSFORM_WRITE
Specifies that this TextureAttributes object allows writing its texture transform component information.

 o FASTEST
 public static final int FASTEST
Use the fastest available method for perspective correction.

 o NICEST
 public static final int NICEST
Use the nicest (highest quality) available method for texture mapping perspective correction.

 o MODULATE
 public static final int MODULATE
Modulate the object color with the texture color.

 o DECAL
 public static final int DECAL
Apply the texture color to the object as a decal.

 o BLEND
 public static final int BLEND
Blend the texture blend color with the object color.

 o REPLACE
 public static final int REPLACE
Replace the object color with the texture color.

Constructors

 o TextureAttributes
 public TextureAttributes()
Construct a TextureAttributes with default values.

 o TextureAttributes
 public TextureAttributes(int textureMode,
                          Transform3D transform,
                          Color4f textureBlendColor,
                          int perspCorrectionMode)
Construct a TextureAttributes with specified values.

Methods

 o setTextureMode
 public final void setTextureMode(int textureMode)
Sets the texture mode parameter for this appearance component object.

Parameters:
textureMode - the texture mode, one of: MODULATE, DECAL, BLEND, or REPLACE
 o getTextureMode
 public final int getTextureMode()
Gets the texture mode parameter for this appearance component object.

Returns:
textureMode the texture mode
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o setTextureBlendColor
 public final void setTextureBlendColor(Color4f textureBlendColor)
Sets the texture blend color for this appearance component object.

Parameters:
textureBlendColor - the texture blend color used when the mode is BLEND
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o setTextureBlendColor
 public final void setTextureBlendColor(float r,
                                        float g,
                                        float b,
                                        float a)
Sets the texture blend color for this appearance component object. This color is used when the mode is BLEND.

Parameters:
r - the red component of the color
g - the green component of the color
b - the blue component of the color
a - the alpha component of the color
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o getTextureBlendColor
 public final void getTextureBlendColor(Color4f textureBlendColor)
Gets the texture blend color for this appearance component object.

Parameters:
textureBlendColor - the vector that will receive the texture blend color used when the mode is BLEND
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o setTextureTransform
 public final void setTextureTransform(Transform3D transform)
Sets the texture transform object used to transform texture coordinates. A copy of the specified Transform3D object is stored in this TextureAttributes object.

Parameters:
transform - the new transform object
Throws: CapabilityNotSetException
if the method is called when this object is part of live or compiled scene graph.
 o getTextureTransform
 public final void getTextureTransform(Transform3D transform)
Retrieves a copy of the texture transform object.

Parameters:
transform - the transform object that will receive the current texture transform.
Throws: CapabilityNotSetException
if the method is called when this object is part of live or compiled scene graph.
 o setPerspectiveCorrectionMode
 public final void setPerspectiveCorrectionMode(int mode)
Sets perspective correction mode to be used for color and/or texture coordinate interpolation. A value of NICEST indicates that perspective correction should be performed and that the highest quality method should be used. A value of FASTEST indicates that the most efficient perspective correction method should be used.

Parameters:
mode - one of NICEST or FASTEST. The default value is NICEST.
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
Throws: IllegalArgumentException
if mode value is other than FASTEST or NICEST.
 o getPerspectiveCorrectionMode
 public final int getPerspectiveCorrectionMode()
Gets perspective correction mode value.

Returns:
mode the value of perspective correction mode.
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