| java.lang.Object javax.media.j3d.SceneGraphObject javax.media.j3d.NodeComponent javax.media.j3d.TextureAttributes
TextureAttributes | public class TextureAttributes extends NodeComponent (Code) | | The TextureAttributes object defines attributes that apply to
texture mapping.
The texture attributes include the following:
- Texture mode - defines how the object and texture colors
are blended. The mode may be one of the following:
- MODULATE - modulates the incoming color with the texture
color.
- DECAL - applies the texture color to the incoming color as a decal.
C'rgb = Crgb (1 - Cta) + Ctrgb Cta
C'a = Ca
- BLEND - blends the texture blend color with the incoming color.
C'rgb = Crgb (1 - Ctrgb) + Cbrgb Ctrgb
C'a = Ca Cta
Note that if the texture format is INTENSITY, alpha is computed identically
to red, green, and blue:
C'a = Ca (1 - Cta) + Cba Cta
- REPLACE - replaces the incoming color with the texture color.
- COMBINE - combines the object color with the texture color or texture
blend color according to the combine operation as specified in the
texture combine mode.
C = Incoming color to the texture unit state. For texture unit state 0, C is the object color
Ct = Texture color
Cb = Texture blend color
- Combine Mode - defines the combine operation when texture mode
specifies COMBINE. The combine mode includes the following:
- COMBINE_REPLACE
- COMBINE_MODULATE
- COMBINE_ADD
- COMBINE_ADD_SIGNED
- COMBINE_SUBTRACT
- COMBINE_INTERPOLATE
- COMBINE_DOT3
C' = 4 * (
(C0r - 0.5) * (C1r - 0.5) +
(C0g - 0.5) * (C1g - 0.5) +
(C0b - 0.5) * (C1b - 0.5))
where CNx is the x component of the Nth color operand
in the combine operation.
The value C' will be placed to the all three r,g,b components or the
a component of the output.
where C0, C1 and C2 are determined by
the color source, and the color operand.
- Combine Color Source - defines the source for a color operand in the
combine operation. The color source includes the following:
- COMBINE_OBJECT_COLOR - object color
- COMBINE_TEXTURE_COLOR - texture color
- COMBINE_CONSTANT_COLOR - texture blend color
- COMBINE_PREVIOUS_TEXTURE_UNIT_STATE - color from the previous texture
unit state. For texture unit state 0, this is equivalent to
COMBINE_OBJECT_COLOR.
- Combine Color Function - specifies the function for a color operand
in the combine operation. The valid values are:
- COMBINE_SRC_COLOR - the color function is f = Crgb
- COMBINE_ONE_MINUS_SRC_COLOR - the color function is f = (1 - Crgb)
- COMBINE_SRC_ALPHA - the color function is f = Ca
- COMBINE_ONE_MINUS_SRC_ALPHA - the color function is f = (1 - Ca)
- Combine scale factor - specifies the scale factor to be applied to
the output color of the combine operation. The valid values include:
1, 2, or 4.
- Transform - the texture transform object used to transform
texture coordinates. The texture transform can translate, scale,
or rotate the texture coordinates before the texture is applied
to the object.
- Blend color - the constant texture blend color
- Perspective correction - the perspective correction mode
used for color and texture coordinate interpolation. One of
the following:
- NICEST - uses the nicest (highest quality) available
method for texture mapping perspective correction.
- FASTEST - uses the fastest available method for texture
mapping perspective correction.
- Texture color table - defines a table that is used to look up
texture colors before applying the texture mode.
See Also: Appearance See Also: Canvas3D.queryProperties |
Field Summary | |
final public static int | ALLOW_BLEND_COLOR_READ Specifies that this TextureAttributes object allows
reading its texture blend color component
information. | final public static int | ALLOW_BLEND_COLOR_WRITE Specifies that this TextureAttributes object allows
writing its texture blend color component
information. | final public static int | ALLOW_COLOR_TABLE_READ Specifies that this TextureAttributes object allows
reading its texture color table component
information. | final public static int | ALLOW_COLOR_TABLE_WRITE Specifies that this TextureAttributes object allows
writing its texture color table component
information. | final public static int | ALLOW_COMBINE_READ Specifies that this TextureAttributes object allows
reading its texture combine mode information. | final public static int | ALLOW_COMBINE_WRITE Specifies that this TextureAttributes object allows
writing its texture combine mode information. | final public static int | ALLOW_MODE_READ Specifies that this TextureAttributes object allows
reading its texture mode component
information and perspective correction mode. | final public static int | ALLOW_MODE_WRITE Specifies that this TextureAttributes object allows
writing its texture mode component
information and perspective correction mode. | final public static int | ALLOW_TRANSFORM_READ Specifies that this TextureAttributes object allows
reading its texture transform component
information. | final public static int | ALLOW_TRANSFORM_WRITE Specifies that this TextureAttributes object allows
writing its texture transform component
information. | final public static int | BLEND Blend the texture blend color with the object color. | final public static int | COMBINE Combine the object color with texture color as specified in
the combine mode. | final public static int | COMBINE_ADD Add two colors. | final public static int | COMBINE_ADD_SIGNED Add two colors plus an implicit offset. | final public static int | COMBINE_CONSTANT_COLOR Texture blend color. | final public static int | COMBINE_DOT3 Dot product of two colors. | final public static int | COMBINE_INTERPOLATE Interpolate two colors with a factor. | final public static int | COMBINE_MODULATE Modulates one color with another color. | final public static int | COMBINE_OBJECT_COLOR Object color coming into the texturing state. | final public static int | COMBINE_ONE_MINUS_SRC_ALPHA | final public static int | COMBINE_ONE_MINUS_SRC_COLOR | final public static int | COMBINE_PREVIOUS_TEXTURE_UNIT_STATE Color from the previous texture unit state. | final public static int | COMBINE_REPLACE Replace the input color with the specified color. | final public static int | COMBINE_SRC_ALPHA | final public static int | COMBINE_SRC_COLOR | final public static int | COMBINE_SUBTRACT Subtract one color from another color. | final public static int | COMBINE_TEXTURE_COLOR Texture color of the corresponding texture unit state. | final public static int | DECAL Apply the texture color to the object as a decal. | final public static int | FASTEST Use the fastest available method for perspective correction. | final public static int | MODULATE Modulate the object color with the texture color. | final public static int | NICEST Use the nicest (highest quality) available method for texture
mapping perspective correction. | final public static int | REPLACE Replace the object color with the texture color. |
Constructor Summary | |
public | TextureAttributes() Constructs a TextureAttributes object with default parameters. | public | TextureAttributes(int textureMode, Transform3D transform, Color4f textureBlendColor, int perspCorrectionMode) Constructs a TextureAttributes object with the specified values. |
Method Summary | |
public NodeComponent | cloneNodeComponent() | void | createRetained() Creates a retained mode TextureAttributesRetained object that this
TextureAttributes component object will point to. | void | duplicateAttributes(NodeComponent originalNodeComponent, boolean forceDuplicate) Copies all node information from originalNodeComponent into
the current node. | public int | getCombineAlphaFunction(int index) Retrieves the function for the alpha component of the specified color
operand for this object. | public int | getCombineAlphaMode() Retrieves the combine mode for the alpha component of the output color
for this object. | public int | getCombineAlphaScale() Retrieves the scale factor for the alpha component of the output color
for this object. | public int | getCombineAlphaSource(int index) Retrieves the source for the alpha component of the specified
color operand for this object. | public int | getCombineRgbFunction(int index) Retrieves the function for the rgb components of the specified color
operand for this object. | public int | getCombineRgbMode() Retrieves the combine mode for the rgb components of the output color
for this object. | public int | getCombineRgbScale() Retrieves the scale factor for the rgb components of the output color
for this object. | public int | getCombineRgbSource(int index) Retrieves the source for the rgb components of the specified
color operand for this object. | public int | getNumTextureColorTableComponents() Retrieves the number of color components in the current texture
color table. | public int | getPerspectiveCorrectionMode() Gets perspective correction mode value. | public void | getTextureBlendColor(Color4f textureBlendColor) Gets the texture blend color for this
appearance component object. | public void | getTextureColorTable(int[][] table) Retrieves the texture color table and copies it into the
specified array. | public int | getTextureColorTableSize() Retrieves the size of the current texture color table. | public int | getTextureMode() Gets the texture mode parameter for this
texture attributes object. | public void | getTextureTransform(Transform3D transform) Retrieves a copy of the texture transform object. | public void | setCombineAlphaFunction(int index, int function) Sets the function for the alpha component of the specified color operand
for this object. | public void | setCombineAlphaMode(int combineMode) Sets the combine mode for the alpha component of the output color
for this object. | public void | setCombineAlphaScale(int scale) Sets the scale factor for the alpha component of the output color
for this object.
Parameters: scale - the scale factor for the alpha component of the output color. | public void | setCombineAlphaSource(int index, int src) Sets the source for the alpha component of the specified color operand
for this object. | public void | setCombineRgbFunction(int index, int function) Sets the function for the rgb components of the specified color operand
for this object. | public void | setCombineRgbMode(int combineMode) Sets the combine mode for the rgb components of the output color
for this object. | public void | setCombineRgbScale(int scale) Sets the scale factor for the rgb components of the output color
for this object.
Parameters: scale - the scale factor for the rgb components of the output color. | public void | setCombineRgbSource(int index, int src) Sets the source for the rgb components of the specified color operand
for this object. | public void | setPerspectiveCorrectionMode(int mode) Sets perspective correction mode to be used for color
and/or texture coordinate interpolation. | public void | setTextureBlendColor(Color4f textureBlendColor) Sets the texture constant color for this
texture attributes object. | public void | setTextureBlendColor(float r, float g, float b, float a) Sets the texture blend color for this
appearance component object. | public void | setTextureColorTable(int[][] table) Sets the texture color table from the specified table. | public void | setTextureMode(int textureMode) Sets the texture mode parameter for this
appearance component object. | public void | setTextureTransform(Transform3D transform) Sets the texture transform object used to transform texture
coordinates. |
ALLOW_BLEND_COLOR_READ | final public static int ALLOW_BLEND_COLOR_READ(Code) | | Specifies that this TextureAttributes object allows
reading its texture blend color component
information.
|
ALLOW_BLEND_COLOR_WRITE | final public static int ALLOW_BLEND_COLOR_WRITE(Code) | | Specifies that this TextureAttributes object allows
writing its texture blend color component
information.
|
ALLOW_COLOR_TABLE_READ | final public static int ALLOW_COLOR_TABLE_READ(Code) | | Specifies that this TextureAttributes object allows
reading its texture color table component
information.
since: Java 3D 1.2 |
ALLOW_COLOR_TABLE_WRITE | final public static int ALLOW_COLOR_TABLE_WRITE(Code) | | Specifies that this TextureAttributes object allows
writing its texture color table component
information.
since: Java 3D 1.2 |
ALLOW_COMBINE_READ | final public static int ALLOW_COMBINE_READ(Code) | | Specifies that this TextureAttributes object allows
reading its texture combine mode information. (e.g. combine mode,
combine color source, combine color function, combine scale factor)
since: Java 3D 1.3 |
ALLOW_COMBINE_WRITE | final public static int ALLOW_COMBINE_WRITE(Code) | | Specifies that this TextureAttributes object allows
writing its texture combine mode information. (e.g. combine mode,
combine color source, combine color function, combine scale factor)
since: Java 3D 1.3 |
ALLOW_MODE_READ | final public static int ALLOW_MODE_READ(Code) | | Specifies that this TextureAttributes object allows
reading its texture mode component
information and perspective correction mode.
|
ALLOW_MODE_WRITE | final public static int ALLOW_MODE_WRITE(Code) | | Specifies that this TextureAttributes object allows
writing its texture mode component
information and perspective correction mode.
|
ALLOW_TRANSFORM_READ | final public static int ALLOW_TRANSFORM_READ(Code) | | Specifies that this TextureAttributes object allows
reading its texture transform component
information.
|
ALLOW_TRANSFORM_WRITE | final public static int ALLOW_TRANSFORM_WRITE(Code) | | Specifies that this TextureAttributes object allows
writing its texture transform component
information.
|
TextureAttributes | public TextureAttributes()(Code) | | Constructs a TextureAttributes object with default parameters.
The default values are as follows:
texture mode : REPLACE
blend color : black (0,0,0,0)
transform : identity
perspective correction mode : NICEST
texture color table : null
combine rgb mode : COMBINE_MODULATE
combine alpha mode : COMBINE_MODULATE
combine rgb source :
C0=COMBINE_TEXTURE_COLOR
C1=COMBINE_PREVIOUS_TEXTURE_UNIT_STATE
C2=COMBINE_CONSTANT_COLOR
combine alpha source :
C0=COMBINE_TEXTURE_COLOR
C1=COMBINE_PREVIOUS_TEXTURE_UNIT_STATE
C2=COMBINE_CONSTANT_COLOR
combine rgb function : COMBINE_SRC_COLOR
combine alpha function : COMBINE_SRC_ALPHA
combine rgb scale : 1
combine alpha scale : 1
|
TextureAttributes | public TextureAttributes(int textureMode, Transform3D transform, Color4f textureBlendColor, int perspCorrectionMode)(Code) | | Constructs a TextureAttributes object with the specified values.
Parameters: textureMode - the texture mode; one of MODULATE , DECAL , BLEND , REPLACE , orCOMBINE Parameters: transform - the transform object, used to transform texturecoordinates Parameters: textureBlendColor - the texture constant color Parameters: perspCorrectionMode - the perspective correction mode to be used for color and/or texture coordinate interpolation;one of NICEST or FASTEST exception: IllegalArgumentException - if textureMode is a value other than MODULATE ,DECAL , BLEND , REPLACE , orCOMBINE exception: IllegalArgumentException - if mode value is otherthan FASTEST or NICEST . |
createRetained | void createRetained()(Code) | | Creates a retained mode TextureAttributesRetained object that this
TextureAttributes 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 |
getCombineAlphaFunction | public int getCombineAlphaFunction(int index)(Code) | | Retrieves the function for the alpha component of the specified color
operand for this object.
Parameters: index - color operand in the combine operation the function for the alpha component of the specified coloroperand for this object. exception: IndexOutOfBoundsException - if index < 0 or index > 2 exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph since: Java 3D 1.3 |
getCombineAlphaMode | public int getCombineAlphaMode()(Code) | | Retrieves the combine mode for the alpha component of the output color
for this object.
the combine mode for the alpha component. exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph since: Java 3D 1.3 |
getCombineAlphaScale | public int getCombineAlphaScale()(Code) | | Retrieves the scale factor for the alpha component of the output color
for this object.
the scale factor for the alpha component of the output color exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph since: Java 3D 1.3 |
getCombineAlphaSource | public int getCombineAlphaSource(int index)(Code) | | Retrieves the source for the alpha component of the specified
color operand for this object.
Parameters: index - color operand in the combine operation the source for the alpha component of the specified coloroperand for this object exception: IndexOutOfBoundsException - if index < 0 or index > 2 exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph since: Java 3D 1.3 |
getCombineRgbFunction | public int getCombineRgbFunction(int index)(Code) | | Retrieves the function for the rgb components of the specified color
operand for this object.
Parameters: index - color operand in the combine operation the function for the rgb components of the specified coloroperand for this object. exception: IndexOutOfBoundsException - if index < 0 or index > 2 exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph since: Java 3D 1.3 |
getCombineRgbMode | public int getCombineRgbMode()(Code) | | Retrieves the combine mode for the rgb components of the output color
for this object.
the combine mode for the rgb components. exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph since: Java 3D 1.3 |
getCombineRgbScale | public int getCombineRgbScale()(Code) | | Retrieves the scale factor for the rgb components of the output color
for this object.
the scale factor for the rgb components of the output color exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph since: Java 3D 1.3 |
getCombineRgbSource | public int getCombineRgbSource(int index)(Code) | | Retrieves the source for the rgb components of the specified
color operand for this object.
Parameters: index - color operand in the combine operation the source for the rgb components of the specified coloroperand for this object exception: IndexOutOfBoundsException - if index < 0 or index > 2 exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph since: Java 3D 1.3 |
getNumTextureColorTableComponents | public int getNumTextureColorTableComponents()(Code) | | Retrieves the number of color components in the current texture
color table. A value of 0 is returned if the texture color
table is null.
the number of color components in the texture colortable, or 0 if the table is null since: Java 3D 1.2 |
getPerspectiveCorrectionMode | public int getPerspectiveCorrectionMode()(Code) | | Gets perspective correction mode value.
mode the value of perspective correction mode exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph |
getTextureBlendColor | public void getTextureBlendColor(Color4f textureBlendColor)(Code) | | Gets the texture blend color for this
appearance component object.
Parameters: textureBlendColor - the vector that will receive the textureconstant color exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph |
getTextureColorTable | public void getTextureColorTable(int[][] table)(Code) | | Retrieves the texture color table and copies it into the
specified array. If the current texture color table is null,
no values are copied.
Parameters: table - the array that will receive a copy of thetexture color table from this TextureAttributes object.The array must be allocated by the caller and must be largeenough to hold the entire table (that is,int[numTextureColorTableComponents][textureColorTableSize] ). exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph since: Java 3D 1.2 |
getTextureColorTableSize | public int getTextureColorTableSize()(Code) | | Retrieves the size of the current texture color table. A value
of 0 is returned if the texture color table is null.
the size of the texture color table, or 0 if the tableis null since: Java 3D 1.2 |
getTextureMode | public int getTextureMode()(Code) | | Gets the texture mode parameter for this
texture attributes object.
textureMode the texture mode exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph |
getTextureTransform | public void getTextureTransform(Transform3D transform)(Code) | | Retrieves a copy of the texture transform object.
Parameters: transform - the transform object that will receive thecurrent texture transform exception: CapabilityNotSetException - if the method is calledwhen this object is part of live or compiled scene graph. |
setCombineAlphaFunction | public void setCombineAlphaFunction(int index, int function)(Code) | | Sets the function for the alpha component of the specified color operand
for this object.
Parameters: index - color operand in the combine operation Parameters: function - the color function, one of: COMBINE_SRC_ALPHA , orCOMBINE_ONE_MINUS_SRC_ALPHA exception: IndexOutOfBoundsException - if index < 0 or index > 2 exception: IllegalArgumentException - if function is a value other than COMBINE_SRC_ALPHA orCOMBINE_ONE_MINUS_SRC_ALPHA exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph See Also: Canvas3D.queryProperties since: Java 3D 1.3 |
setCombineAlphaMode | public void setCombineAlphaMode(int combineMode)(Code) | | Sets the combine mode for the alpha component of the output color
for this object.
Parameters: combineMode - the combine mode, one of: COMBINE_REPLACE ,COMBINE_MODULATE , COMBINE_ADD , COMBINE_ADD_SIGNED , COMBINE_SUBTRACT ,COMBINE_INTERPOLATE , or COMBINE_DOT3 exception: IllegalArgumentException - if combineMode is a value other than COMBINE_REPLACE ,COMBINE_MODULATE , COMBINE_ADD , COMBINE_ADD_SIGNED , COMBINE_SUBTRACT ,COMBINE_INTERPOLATE , or COMBINE_DOT3 exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph See Also: Canvas3D.queryProperties since: Java 3D 1.3 |
setCombineAlphaScale | public void setCombineAlphaScale(int scale)(Code) | | Sets the scale factor for the alpha component of the output color
for this object.
Parameters: scale - the scale factor for the alpha component of the output color. It must be one of the following: 1, 2, or 4. exception: IllegalArgumentException - if scale is avalue other than 1, 2, or 4. exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph See Also: Canvas3D.queryProperties since: Java 3D 1.3 |
setCombineAlphaSource | public void setCombineAlphaSource(int index, int src)(Code) | | Sets the source for the alpha component of the specified color operand
for this object.
Parameters: index - color operand in the combine operation Parameters: src - the color source, one of: COMBINE_OBJECT_COLOR ,COMBINE_TEXTURE_COLOR , COMBINE_CONSTANT_COLOR , orCOMBINE_PREVIOUS_TEXTURE_UNIT_STATE exception: IndexOutOfBoundsException - if index < 0 or index > 2 exception: IllegalArgumentException - if src is a value other than COMBINE_OBJECT_COLOR ,COMBINE_TEXTURE_COLOR , COMBINE_CONSTANT_COLOR , orCOMBINE_PREVIOUS_TEXTURE_UNIT_STATE exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph See Also: Canvas3D.queryProperties since: Java 3D 1.3 |
setCombineRgbFunction | public void setCombineRgbFunction(int index, int function)(Code) | | Sets the function for the rgb components of the specified color operand
for this object.
Parameters: index - color operand in the combine operation Parameters: function - the color function, one of: COMBINE_SRC_COLOR ,COMBINE_ONE_MINUS_SRC_COLOR , COMBINE_SRC_ALPHA , orCOMBINE_ONE_MINUS_SRC_ALPHA exception: IndexOutOfBoundsException - if index < 0 or index > 2 exception: IllegalArgumentException - if function is a value other than COMBINE_SRC_COLOR ,COMBINE_ONE_MINUS_SRC_COLOR , COMBINE_SRC_ALPHA , orCOMBINE_ONE_MINUS_SRC_ALPHA exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph See Also: Canvas3D.queryProperties since: Java 3D 1.3 |
setCombineRgbMode | public void setCombineRgbMode(int combineMode)(Code) | | Sets the combine mode for the rgb components of the output color
for this object.
Parameters: combineMode - the combine mode, one of: COMBINE_REPLACE ,COMBINE_MODULATE , COMBINE_ADD , COMBINE_ADD_SIGNED , COMBINE_SUBTRACT ,COMBINE_INTERPOLATE , or COMBINE_DOT3 exception: IllegalArgumentException - if combineMode is a value other than COMBINE_REPLACE ,COMBINE_MODULATE , COMBINE_ADD , COMBINE_ADD_SIGNED , COMBINE_SUBTRACT ,COMBINE_INTERPOLATE , or COMBINE_DOT3 exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph See Also: Canvas3D.queryProperties since: Java 3D 1.3 |
setCombineRgbScale | public void setCombineRgbScale(int scale)(Code) | | Sets the scale factor for the rgb components of the output color
for this object.
Parameters: scale - the scale factor for the rgb components of the output color. It must be one of the following: 1, 2, or 4. exception: IllegalArgumentException - if scale is avalue other than 1, 2, or 4. exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph See Also: Canvas3D.queryProperties since: Java 3D 1.3 |
setCombineRgbSource | public void setCombineRgbSource(int index, int src)(Code) | | Sets the source for the rgb components of the specified color operand
for this object.
Parameters: index - color operand in the combine operation Parameters: src - the color source, one of: COMBINE_OBJECT_COLOR ,COMBINE_TEXTURE_COLOR , COMBINE_CONSTANT_COLOR , orCOMBINE_PREVIOUS_TEXTURE_UNIT_STATE exception: IndexOutOfBoundsException - if index < 0 or index > 2 exception: IllegalArgumentException - if src is a value other than COMBINE_OBJECT_COLOR ,COMBINE_TEXTURE_COLOR , COMBINE_CONSTANT_COLOR , orCOMBINE_PREVIOUS_TEXTURE_UNIT_STATE exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph See Also: Canvas3D.queryProperties since: Java 3D 1.3 |
setPerspectiveCorrectionMode | public void setPerspectiveCorrectionMode(int mode)(Code) | | 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 . exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph exception: IllegalArgumentException - if mode value is otherthan FASTEST or NICEST . |
setTextureBlendColor | public void setTextureBlendColor(Color4f textureBlendColor)(Code) | | Sets the texture constant color for this
texture attributes object.
Parameters: textureBlendColor - the texture constant color exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph |
setTextureBlendColor | public void setTextureBlendColor(float r, float g, float b, float a)(Code) | | Sets the texture blend color for this
appearance component object.
Parameters: r - the red component of the color Parameters: g - the green component of the color Parameters: b - the blue component of the color Parameters: a - the alpha component of the color exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph |
setTextureColorTable | public void setTextureColorTable(int[][] table)(Code) | | Sets the texture color table from the specified table. The
individual integer array elements are copied. The array is
indexed first by color component (r, g, b,
and a, respectively) and then by color value;
table.length defines the number of color
components and table[0].length defines the texture
color table size. If the table is non-null, the number of
color components must either be 3, for rgb data, or 4,
for rgba data. The size of each array for each color
component must be the same and must be a power of 2. If table
is null or if the texture color table size is 0, the texture
color table is disabled. If the texture color table size is
greater than the device-dependent maximum texture color table
size for a particular Canvas3D, the texture color table is
ignored for that canvas.
When enabled, the texture color table is applied after the
texture filtering operation and before texture application.
Each of the r, g, b, and a
components are clamped to the range [0,1], multiplied by
textureColorTableSize-1 , and rounded to the
nearest integer. The resulting value for each component is
then used as an index into the respective table for that
component. If the texture color table contains 3 components,
alpha is passed through unmodified.
Parameters: table - the new texture color table exception: IllegalArgumentException - if table.length is not 3 or 4, or if the arrays for each component are not allthe same length, or if the texture color table sizeis not a power of 2 exception: CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph See Also: Canvas3D.queryProperties since: Java 3D 1.2 |
setTextureMode | public void setTextureMode(int textureMode)(Code) | | Sets the texture mode parameter for this
appearance component object.
Parameters: textureMode - the texture mode, one of: MODULATE ,DECAL , BLEND , REPLACE , orCOMBINE exception: IllegalArgumentException - if textureMode is a value other than MODULATE ,DECAL , BLEND , REPLACE , orCOMBINE See Also: Canvas3D.queryProperties |
setTextureTransform | public void setTextureTransform(Transform3D transform)(Code) | | 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 exception: CapabilityNotSetException - if the method is calledwhen this object is part of live or compiled scene graph. |
Fields inherited from javax.media.j3d.NodeComponent | boolean forceDuplicate(Code)(Java Doc)
|
|
|