Class TextureAttributes
- 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.
-
C' = C Ct
- 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
-
C'a = Ca (1 - Cta) + Cba Cta
- REPLACE - replaces the incoming color with the texture color.
-
C' = Ct
- 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.
- Combine Mode - defines the combine operation when texture mode
specifies COMBINE. The combine mode includes the following:
- COMBINE_REPLACE
-
C' = C0
- COMBINE_MODULATE
-
C' = C0 C1
- COMBINE_ADD
-
C' = C0 + C1
- COMBINE_ADD_SIGNED
-
C' = C0 + C1 - 0.5
- COMBINE_SUBTRACT
-
C' = C0 - C1
- COMBINE_INTERPOLATE
-
C' = C0 C2 + C1 (1 - C2)
- 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.
- COMBINE_REPLACE
Cb = Texture blend color
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_OBJECT_COLOR - 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_SRC_COLOR - the color function is f = Crgb
- 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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intSpecifies that this TextureAttributes object allows reading its texture blend color component information.static final intSpecifies that this TextureAttributes object allows writing its texture blend color component information.static final intSpecifies that this TextureAttributes object allows reading its texture color table component information.static final intSpecifies that this TextureAttributes object allows writing its texture color table component information.static final intSpecifies that this TextureAttributes object allows reading its texture combine mode information.static final intSpecifies that this TextureAttributes object allows writing its texture combine mode information.static final intSpecifies that this TextureAttributes object allows reading its texture mode component information and perspective correction mode.static final intSpecifies that this TextureAttributes object allows writing its texture mode component information and perspective correction mode.static final intSpecifies that this TextureAttributes object allows reading its texture transform component information.static final intSpecifies that this TextureAttributes object allows writing its texture transform component information.static final intBlend the texture blend color with the object color.static final intCombine the object color with texture color as specified in the combine mode.static final intAdd two colors.static final intAdd two colors plus an implicit offset.static final intTexture blend color.static final intDot product of two colors.static final intInterpolate two colors with a factor.static final intModulates one color with another color.static final intObject color coming into the texturing state.static final intColor function is f = (1 - Ca)static final intColor function is f = (1 - Crgb)static final intColor from the previous texture unit state.static final intReplace the input color with the specified color.static final intColor function is f = Castatic final intColor function is f = Crgbstatic final intSubtract one color from another color.static final intTexture color of the corresponding texture unit state.static final intApply the texture color to the object as a decal.static final intUse the fastest available method for perspective correction.static final intModulate the object color with the texture color.static final intUse the nicest (highest quality) available method for texture mapping perspective correction.static final intReplace the object color with the texture color. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a TextureAttributes object with default parameters.TextureAttributes(int textureMode, Transform3D transform, javax.vecmath.Color4f textureBlendColor, int perspCorrectionMode) Constructs a TextureAttributes object with the specified values. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.replaced with cloneNodeComponent(boolean forceDuplicate)intgetCombineAlphaFunction(int index) Retrieves the function for the alpha component of the specified color operand for this object.intRetrieves the combine mode for the alpha component of the output color for this object.intRetrieves the scale factor for the alpha component of the output color for this object.intgetCombineAlphaSource(int index) Retrieves the source for the alpha component of the specified color operand for this object.intgetCombineRgbFunction(int index) Retrieves the function for the rgb components of the specified color operand for this object.intRetrieves the combine mode for the rgb components of the output color for this object.intRetrieves the scale factor for the rgb components of the output color for this object.intgetCombineRgbSource(int index) Retrieves the source for the rgb components of the specified color operand for this object.intRetrieves the number of color components in the current texture color table.intGets perspective correction mode value.voidgetTextureBlendColor(javax.vecmath.Color4f textureBlendColor) Gets the texture blend color for this appearance component object.voidgetTextureColorTable(int[][] table) Retrieves the texture color table and copies it into the specified array.intRetrieves the size of the current texture color table.intGets the texture mode parameter for this texture attributes object.voidgetTextureTransform(Transform3D transform) Retrieves a copy of the texture transform object.voidsetCombineAlphaFunction(int index, int function) Sets the function for the alpha component of the specified color operand for this object.voidsetCombineAlphaMode(int combineMode) Sets the combine mode for the alpha component of the output color for this object.voidsetCombineAlphaScale(int scale) Sets the scale factor for the alpha component of the output color for this object.voidsetCombineAlphaSource(int index, int src) Sets the source for the alpha component of the specified color operand for this object.voidsetCombineRgbFunction(int index, int function) Sets the function for the rgb components of the specified color operand for this object.voidsetCombineRgbMode(int combineMode) Sets the combine mode for the rgb components of the output color for this object.voidsetCombineRgbScale(int scale) Sets the scale factor for the rgb components of the output color for this object.voidsetCombineRgbSource(int index, int src) Sets the source for the rgb components of the specified color operand for this object.voidsetPerspectiveCorrectionMode(int mode) Sets perspective correction mode to be used for color and/or texture coordinate interpolation.voidsetTextureBlendColor(float r, float g, float b, float a) Sets the texture blend color for this appearance component object.voidsetTextureBlendColor(javax.vecmath.Color4f textureBlendColor) Sets the texture constant color for this texture attributes object.voidsetTextureColorTable(int[][] table) Sets the texture color table from the specified table.voidsetTextureMode(int textureMode) Sets the texture mode parameter for this appearance component object.voidsetTextureTransform(Transform3D transform) Sets the texture transform object used to transform texture coordinates.Methods inherited from class javax.media.j3d.NodeComponent
cloneNodeComponent, duplicateNodeComponent, duplicateNodeComponent, getDuplicateOnCloneTree, setDuplicateOnCloneTreeMethods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString, updateNodeReferences
-
Field Details
-
ALLOW_MODE_READ
public static final int ALLOW_MODE_READSpecifies that this TextureAttributes object allows reading its texture mode component information and perspective correction mode.- See Also:
-
ALLOW_MODE_WRITE
public static final int ALLOW_MODE_WRITESpecifies that this TextureAttributes object allows writing its texture mode component information and perspective correction mode.- See Also:
-
ALLOW_BLEND_COLOR_READ
public static final int ALLOW_BLEND_COLOR_READSpecifies that this TextureAttributes object allows reading its texture blend color component information.- See Also:
-
ALLOW_BLEND_COLOR_WRITE
public static final int ALLOW_BLEND_COLOR_WRITESpecifies that this TextureAttributes object allows writing its texture blend color component information.- See Also:
-
ALLOW_TRANSFORM_READ
public static final int ALLOW_TRANSFORM_READSpecifies that this TextureAttributes object allows reading its texture transform component information.- See Also:
-
ALLOW_TRANSFORM_WRITE
public static final int ALLOW_TRANSFORM_WRITESpecifies that this TextureAttributes object allows writing its texture transform component information.- See Also:
-
ALLOW_COLOR_TABLE_READ
public static final int ALLOW_COLOR_TABLE_READSpecifies that this TextureAttributes object allows reading its texture color table component information.- Since:
- Java 3D 1.2
- See Also:
-
ALLOW_COLOR_TABLE_WRITE
public static final int ALLOW_COLOR_TABLE_WRITESpecifies that this TextureAttributes object allows writing its texture color table component information.- Since:
- Java 3D 1.2
- See Also:
-
ALLOW_COMBINE_READ
public static final int ALLOW_COMBINE_READSpecifies 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
- See Also:
-
ALLOW_COMBINE_WRITE
public static final int ALLOW_COMBINE_WRITESpecifies 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
- See Also:
-
FASTEST
Use the fastest available method for perspective correction. -
NICEST
Use the nicest (highest quality) available method for texture mapping perspective correction. -
MODULATE
Modulate the object color with the texture color.- See Also:
-
DECAL
Apply the texture color to the object as a decal.- See Also:
-
BLEND
Blend the texture blend color with the object color.- See Also:
-
REPLACE
Replace the object color with the texture color.- See Also:
-
COMBINE
Combine the object color with texture color as specified in the combine mode.- Since:
- Java 3D 1.3
- See Also:
-
COMBINE_REPLACE
Replace the input color with the specified color.- Since:
- Java 3D 1.3
- See Also:
-
COMBINE_MODULATE
Modulates one color with another color.- Since:
- Java 3D 1.3
- See Also:
-
COMBINE_ADD
Add two colors.- Since:
- Java 3D 1.3
- See Also:
-
COMBINE_ADD_SIGNED
Add two colors plus an implicit offset.- Since:
- Java 3D 1.3
- See Also:
-
COMBINE_SUBTRACT
Subtract one color from another color.- Since:
- Java 3D 1.3
- See Also:
-
COMBINE_INTERPOLATE
Interpolate two colors with a factor.- Since:
- Java 3D 1.3
- See Also:
-
COMBINE_DOT3
Dot product of two colors.- Since:
- Java 3D 1.3
- See Also:
-
COMBINE_OBJECT_COLOR
Object color coming into the texturing state.- Since:
- Java 3D 1.3
- See Also:
-
COMBINE_TEXTURE_COLOR
Texture color of the corresponding texture unit state.- Since:
- Java 3D 1.3
- See Also:
-
COMBINE_CONSTANT_COLOR
Texture blend color.- Since:
- Java 3D 1.3
- See Also:
-
COMBINE_PREVIOUS_TEXTURE_UNIT_STATE
Color from the previous texture unit state.- Since:
- Java 3D 1.3
- See Also:
-
COMBINE_SRC_COLOR
Color function is f = Crgb- Since:
- Java 3D 1.3
- See Also:
-
COMBINE_ONE_MINUS_SRC_COLOR
Color function is f = (1 - Crgb)- Since:
- Java 3D 1.3
- See Also:
-
COMBINE_SRC_ALPHA
Color function is f = Ca- Since:
- Java 3D 1.3
- See Also:
-
COMBINE_ONE_MINUS_SRC_ALPHA
Color function is f = (1 - Ca)- Since:
- Java 3D 1.3
- See Also:
-
-
Constructor Details
-
TextureAttributes
public TextureAttributes()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
-
C0=COMBINE_TEXTURE_COLOR
C1=COMBINE_PREVIOUS_TEXTURE_UNIT_STATE
C2=COMBINE_CONSTANT_COLOR
combine alpha function : COMBINE_SRC_ALPHA
combine rgb scale : 1
combine alpha scale : 1
-
TextureAttributes
public TextureAttributes(int textureMode, Transform3D transform, javax.vecmath.Color4f textureBlendColor, int perspCorrectionMode) Constructs a TextureAttributes object with the specified values.- Parameters:
textureMode- the texture mode; one ofMODULATE,DECAL,BLEND,REPLACE, orCOMBINEtransform- the transform object, used to transform texture coordinatestextureBlendColor- the texture constant colorperspCorrectionMode- the perspective correction mode to be used for color and/or texture coordinate interpolation; one ofNICESTorFASTEST- Throws:
IllegalArgumentException- iftextureModeis a value other thanMODULATE,DECAL,BLEND,REPLACE, orCOMBINEIllegalArgumentException- if mode value is other thanFASTESTorNICEST.
-
-
Method Details
-
setTextureMode
public void setTextureMode(int textureMode) Sets the texture mode parameter for this appearance component object.- Parameters:
textureMode- the texture mode, one of:MODULATE,DECAL,BLEND,REPLACE, orCOMBINE- Throws:
IllegalArgumentException- iftextureModeis a value other thanMODULATE,DECAL,BLEND,REPLACE, orCOMBINE- See Also:
-
getTextureMode
public int getTextureMode()Gets the texture mode parameter for this texture attributes 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 void setTextureBlendColor(javax.vecmath.Color4f textureBlendColor) Sets the texture constant color for this texture attributes object.- Parameters:
textureBlendColor- the texture constant color- Throws:
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) Sets the texture blend color for this appearance component object.- Parameters:
r- the red component of the colorg- the green component of the colorb- the blue component of the colora- 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 void getTextureBlendColor(javax.vecmath.Color4f textureBlendColor) Gets the texture blend color for this appearance component object.- Parameters:
textureBlendColor- the vector that will receive the texture constant color- Throws:
CapabilityNotSetException- if appropriate capability is not set and this object is part of live or compiled scene graph
-
setTextureTransform
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
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 void setPerspectiveCorrectionMode(int mode) Sets perspective correction mode to be used for color and/or texture coordinate interpolation. A value ofNICESTindicates that perspective correction should be performed and that the highest quality method should be used. A value ofFASTESTindicates that the most efficient perspective correction method should be used.- Parameters:
mode- one ofNICESTorFASTESTThe default value isNICEST.- Throws:
CapabilityNotSetException- if appropriate capability is not set and this object is part of live or compiled scene graphIllegalArgumentException- if mode value is other thanFASTESTorNICEST.
-
getPerspectiveCorrectionMode
public 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
-
setTextureColorTable
public void setTextureColorTable(int[][] table) 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.lengthdefines the number of color components andtable[0].lengthdefines 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- Throws:
IllegalArgumentException- iftable.lengthis not 3 or 4, or if the arrays for each component are not all the same length, or if the texture color table size is not a power of 2CapabilityNotSetException- if appropriate capability is not set and this object is part of live or compiled scene graph- Since:
- Java 3D 1.2
- See Also:
-
getTextureColorTable
public void getTextureColorTable(int[][] table) 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 the texture color table from this TextureAttributes object. The array must be allocated by the caller and must be large enough to hold the entire table (that is,int[numTextureColorTableComponents][textureColorTableSize]).- Throws:
CapabilityNotSetException- if appropriate capability is not set and this object is part of live or compiled scene graph- Since:
- Java 3D 1.2
-
getNumTextureColorTableComponents
public int getNumTextureColorTableComponents()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.- Returns:
- the number of color components in the texture color table, or 0 if the table is null
- Since:
- Java 3D 1.2
-
getTextureColorTableSize
public int getTextureColorTableSize()Retrieves the size of the current texture color table. A value of 0 is returned if the texture color table is null.- Returns:
- the size of the texture color table, or 0 if the table is null
- Since:
- Java 3D 1.2
-
setCombineRgbMode
public void setCombineRgbMode(int combineMode) 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, orCOMBINE_DOT3- Throws:
IllegalArgumentException- ifcombineModeis a value other thanCOMBINE_REPLACE,COMBINE_MODULATE,COMBINE_ADD,COMBINE_ADD_SIGNED,COMBINE_SUBTRACT,COMBINE_INTERPOLATE, orCOMBINE_DOT3CapabilityNotSetException- if appropriate capability is not set and this object is part of live or compiled scene graph- Since:
- Java 3D 1.3
- See Also:
-
setCombineAlphaMode
public void setCombineAlphaMode(int combineMode) 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, orCOMBINE_DOT3- Throws:
IllegalArgumentException- ifcombineModeis a value other thanCOMBINE_REPLACE,COMBINE_MODULATE,COMBINE_ADD,COMBINE_ADD_SIGNED,COMBINE_SUBTRACT,COMBINE_INTERPOLATE, orCOMBINE_DOT3CapabilityNotSetException- if appropriate capability is not set and this object is part of live or compiled scene graph- Since:
- Java 3D 1.3
- See Also:
-
getCombineRgbMode
public int getCombineRgbMode()Retrieves the combine mode for the rgb components of the output color for this object.- Returns:
- the combine mode for the rgb components.
- Throws:
CapabilityNotSetException- if appropriate capability is not set and this object is part of live or compiled scene graph- Since:
- Java 3D 1.3
-
getCombineAlphaMode
public int getCombineAlphaMode()Retrieves the combine mode for the alpha component of the output color for this object.- Returns:
- the combine mode for the alpha component.
- Throws:
CapabilityNotSetException- if appropriate capability is not set and this object is part of live or compiled scene graph- Since:
- Java 3D 1.3
-
setCombineRgbSource
public void setCombineRgbSource(int index, int src) Sets the source for the rgb components of the specified color operand for this object.- Parameters:
index- color operand in the combine operationsrc- the color source, one of:COMBINE_OBJECT_COLOR,COMBINE_TEXTURE_COLOR,COMBINE_CONSTANT_COLOR, orCOMBINE_PREVIOUS_TEXTURE_UNIT_STATE- Throws:
IndexOutOfBoundsException- ifindex< 0 orindex> 2IllegalArgumentException- ifsrcis a value other thanCOMBINE_OBJECT_COLOR,COMBINE_TEXTURE_COLOR,COMBINE_CONSTANT_COLOR, orCOMBINE_PREVIOUS_TEXTURE_UNIT_STATECapabilityNotSetException- if appropriate capability is not set and this object is part of live or compiled scene graph- Since:
- Java 3D 1.3
- See Also:
-
setCombineAlphaSource
public void setCombineAlphaSource(int index, int src) Sets the source for the alpha component of the specified color operand for this object.- Parameters:
index- color operand in the combine operationsrc- the color source, one of:COMBINE_OBJECT_COLOR,COMBINE_TEXTURE_COLOR,COMBINE_CONSTANT_COLOR, orCOMBINE_PREVIOUS_TEXTURE_UNIT_STATE- Throws:
IndexOutOfBoundsException- ifindex< 0 orindex> 2IllegalArgumentException- ifsrcis a value other thanCOMBINE_OBJECT_COLOR,COMBINE_TEXTURE_COLOR,COMBINE_CONSTANT_COLOR, orCOMBINE_PREVIOUS_TEXTURE_UNIT_STATECapabilityNotSetException- if appropriate capability is not set and this object is part of live or compiled scene graph- Since:
- Java 3D 1.3
- See Also:
-
getCombineRgbSource
public int getCombineRgbSource(int index) Retrieves the source for the rgb components of the specified color operand for this object.- Parameters:
index- color operand in the combine operation- Returns:
- the source for the rgb components of the specified color operand for this object
- Throws:
IndexOutOfBoundsException- ifindex< 0 orindex> 2CapabilityNotSetException- if appropriate capability is not set and this object is part of live or compiled scene graph- Since:
- Java 3D 1.3
-
getCombineAlphaSource
public int getCombineAlphaSource(int index) Retrieves the source for the alpha component of the specified color operand for this object.- Parameters:
index- color operand in the combine operation- Returns:
- the source for the alpha component of the specified color operand for this object
- Throws:
IndexOutOfBoundsException- ifindex< 0 orindex> 2CapabilityNotSetException- if appropriate capability is not set and this object is part of live or compiled scene graph- Since:
- Java 3D 1.3
-
setCombineRgbFunction
public void setCombineRgbFunction(int index, int function) Sets the function for the rgb components of the specified color operand for this object.- Parameters:
index- color operand in the combine operationfunction- the color function, one of:COMBINE_SRC_COLOR,COMBINE_ONE_MINUS_SRC_COLOR,COMBINE_SRC_ALPHA, orCOMBINE_ONE_MINUS_SRC_ALPHA- Throws:
IndexOutOfBoundsException- ifindex< 0 orindex> 2IllegalArgumentException- iffunctionis a value other thanCOMBINE_SRC_COLOR,COMBINE_ONE_MINUS_SRC_COLOR,COMBINE_SRC_ALPHA, orCOMBINE_ONE_MINUS_SRC_ALPHACapabilityNotSetException- if appropriate capability is not set and this object is part of live or compiled scene graph- Since:
- Java 3D 1.3
- See Also:
-
setCombineAlphaFunction
public void setCombineAlphaFunction(int index, int function) Sets the function for the alpha component of the specified color operand for this object.- Parameters:
index- color operand in the combine operationfunction- the color function, one of:COMBINE_SRC_ALPHA, orCOMBINE_ONE_MINUS_SRC_ALPHA- Throws:
IndexOutOfBoundsException- ifindex< 0 orindex> 2IllegalArgumentException- iffunctionis a value other thanCOMBINE_SRC_ALPHAorCOMBINE_ONE_MINUS_SRC_ALPHACapabilityNotSetException- if appropriate capability is not set and this object is part of live or compiled scene graph- Since:
- Java 3D 1.3
- See Also:
-
getCombineRgbFunction
public int getCombineRgbFunction(int index) Retrieves the function for the rgb components of the specified color operand for this object.- Parameters:
index- color operand in the combine operation- Returns:
- the function for the rgb components of the specified color operand for this object.
- Throws:
IndexOutOfBoundsException- ifindex< 0 orindex> 2CapabilityNotSetException- if appropriate capability is not set and this object is part of live or compiled scene graph- Since:
- Java 3D 1.3
-
getCombineAlphaFunction
public int getCombineAlphaFunction(int index) Retrieves the function for the alpha component of the specified color operand for this object.- Parameters:
index- color operand in the combine operation- Returns:
- the function for the alpha component of the specified color operand for this object.
- Throws:
IndexOutOfBoundsException- ifindex< 0 orindex> 2CapabilityNotSetException- if appropriate capability is not set and this object is part of live or compiled scene graph- Since:
- Java 3D 1.3
-
setCombineRgbScale
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. It must be one of the following: 1, 2, or 4.- Throws:
IllegalArgumentException- ifscaleis a value other than 1, 2, or 4.CapabilityNotSetException- if appropriate capability is not set and this object is part of live or compiled scene graph- Since:
- Java 3D 1.3
- See Also:
-
setCombineAlphaScale
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. It must be one of the following: 1, 2, or 4.- Throws:
IllegalArgumentException- ifscaleis a value other than 1, 2, or 4.CapabilityNotSetException- if appropriate capability is not set and this object is part of live or compiled scene graph- Since:
- Java 3D 1.3
- See Also:
-
getCombineRgbScale
public int getCombineRgbScale()Retrieves the scale factor for the rgb components of the output color for this object.- Returns:
- the scale factor for the rgb components of the output color
- Throws:
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()Retrieves the scale factor for the alpha component of the output color for this object.- Returns:
- the scale factor for the alpha component of the output color
- Throws:
CapabilityNotSetException- if appropriate capability is not set and this object is part of live or compiled scene graph- Since:
- Java 3D 1.3
-
cloneNodeComponent
Deprecated.replaced with cloneNodeComponent(boolean forceDuplicate)- Overrides:
cloneNodeComponentin classNodeComponent
-