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.
-
ALLOW_BLEND_COLOR_READ
- Specifies that this TextureAttributes object allows
reading its texture blend color component
information.
-
ALLOW_BLEND_COLOR_WRITE
- Specifies that this TextureAttributes object allows
writing its texture blend color component
information.
-
ALLOW_MODE_READ
- Specifies that this TextureAttributes object allows
reading its texture mode component
information and perspective correction mode.
-
ALLOW_MODE_WRITE
- Specifies that this TextureAttributes object allows
writing its texture mode component
information and perspective correction mode.
-
ALLOW_TRANSFORM_READ
- Specifies that this TextureAttributes object allows
reading its texture transform component
information.
-
ALLOW_TRANSFORM_WRITE
- Specifies that this TextureAttributes object allows
writing its texture transform component
information.
-
BLEND
- Blend the texture blend color with the object color.
-
DECAL
- Apply the texture color to the object as a decal.
-
FASTEST
- Use the fastest available method for perspective correction.
-
MODULATE
- Modulate the object color with the texture color.
-
NICEST
- Use the nicest (highest quality) available method for texture
mapping perspective correction.
-
REPLACE
- Replace the object color with the texture color.
-
TextureAttributes()
- Construct a TextureAttributes with default values.
-
TextureAttributes(int, Transform3D, Color4f, int)
- Construct a TextureAttributes with specified values.
-
getPerspectiveCorrectionMode()
- Gets perspective correction mode value.
-
getTextureBlendColor(Color4f)
- Gets the texture blend color for this
appearance component object.
-
getTextureMode()
- Gets the texture mode parameter for this
appearance component object.
-
getTextureTransform(Transform3D)
- Retrieves a copy of the texture transform object.
-
setPerspectiveCorrectionMode(int)
- Sets perspective correction mode to be used for color
and/or texture coordinate interpolation.
-
setTextureBlendColor(Color4f)
- Sets the texture blend color for this
appearance component object.
-
setTextureBlendColor(float, float, float, float)
- Sets the texture blend color for this
appearance component object.
-
setTextureMode(int)
- Sets the texture mode parameter for this
appearance component object.
-
setTextureTransform(Transform3D)
- Sets the texture transform object used to transform texture
coordinates.
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.
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.
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.
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.
ALLOW_TRANSFORM_READ
public static final int ALLOW_TRANSFORM_READ
- Specifies that this TextureAttributes object allows
reading its texture transform component
information.
ALLOW_TRANSFORM_WRITE
public static final int ALLOW_TRANSFORM_WRITE
- Specifies that this TextureAttributes object allows
writing its texture transform component
information.
FASTEST
public static final int FASTEST
- Use the fastest available method for perspective correction.
NICEST
public static final int NICEST
- Use the nicest (highest quality) available method for texture
mapping perspective correction.
MODULATE
public static final int MODULATE
- Modulate the object color with the texture color.
DECAL
public static final int DECAL
- Apply the texture color to the object as a decal.
BLEND
public static final int BLEND
- Blend the texture blend color with the object color.
REPLACE
public static final int REPLACE
- Replace the object color with the texture color.
TextureAttributes
public TextureAttributes()
- Construct a TextureAttributes with default values.
TextureAttributes
public TextureAttributes(int textureMode,
Transform3D transform,
Color4f textureBlendColor,
int perspCorrectionMode)
- Construct a TextureAttributes with specified values.
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
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
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
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
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
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.
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.
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.
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