| java.lang.Object javax.media.j3d.SceneGraphObject javax.media.j3d.NodeComponent javax.media.j3d.TextureUnitState
TextureUnitState | public class TextureUnitState extends NodeComponent (Code) | | The TextureUnitState object defines all texture mapping state for a
single texture unit. An appearance object contains an array of
texture unit state objects to define the state for multiple texture
mapping units. The texture unit state consists of the
following:
- Texture - defines the texture image and filtering
parameters used when texture mapping is enabled. These attributes
are defined in a Texture object.
- Texture attributes - defines the attributes that apply to
texture mapping, such as the texture mode, texture transform,
blend color, and perspective correction mode. These attributes
are defined in a TextureAttributes object.
- Texture coordinate generation - defines the attributes
that apply to texture coordinate generation, such as whether
texture coordinate generation is enabled, coordinate format
(2D or 3D coordinates), coordinate generation mode (object
linear, eye linear, or spherical reflection mapping), and the
R, S, and T coordinate plane equations. These attributes
are defined in a TexCoordGeneration object.
See Also: Appearance See Also: Texture See Also: TextureAttributes See Also: TexCoordGeneration since: Java 3D 1.2 |
Field Summary | |
final public static int | ALLOW_STATE_READ Specifies that this TextureUnitState object allows reading its
texture, texture attribute, or texture coordinate generation
component information. | final public static int | ALLOW_STATE_WRITE Specifies that this TextureUnitState object allows writing its
texture, texture attribute, or texture coordinate generation
component information. |
ALLOW_STATE_READ | final public static int ALLOW_STATE_READ(Code) | | Specifies that this TextureUnitState object allows reading its
texture, texture attribute, or texture coordinate generation
component information.
|
ALLOW_STATE_WRITE | final public static int ALLOW_STATE_WRITE(Code) | | Specifies that this TextureUnitState object allows writing its
texture, texture attribute, or texture coordinate generation
component information.
|
TextureUnitState | public TextureUnitState()(Code) | | Constructs a TextureUnitState component object using defaults for all
state variables. All component object references are initialized
to null.
|
TextureUnitState | public TextureUnitState(Texture texture, TextureAttributes textureAttributes, TexCoordGeneration texCoordGeneration)(Code) | | Constructs a TextureUnitState component object using the specified
component objects.
Parameters: texture - object that specifies the desired texturemap and texture parameters Parameters: textureAttributes - object that specifies the desiredtexture attributes Parameters: texCoordGeneration - object that specifies the texture coordinategeneration parameters |
createRetained | void createRetained()(Code) | | Creates the retained mode TextureUnitStateRetained object that this
TextureUnitState component object will point to.
|
duplicateAttributes | void duplicateAttributes(NodeComponent originalNodeComponent, boolean forceDuplicate)(Code) | | Copies all TextureUnitState information from
originalNodeComponent into
the current node. This method is called from the
cloneNode method which is, in turn, called by the
cloneTree method.
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. exception: RestrictedAccessException - if this object is part of a liveor compiled scenegraph. See Also: Node.cloneTree See Also: NodeComponent.setDuplicateOnCloneTree |
duplicateChild | boolean duplicateChild()(Code) | | This function is called from getNodeComponent() to see if any of
the sub-NodeComponents duplicateOnCloneTree flag is true.
If it is the case, current NodeComponent needs to
duplicate also even though current duplicateOnCloneTree flag is false.
This should be overwrite by NodeComponent which contains sub-NodeComponent.
|
duplicateNodeComponent | public void duplicateNodeComponent(NodeComponent originalNodeComponent)(Code) | | NOTE: Applications should not call this method directly.
It should only be called by the cloneNode method.
|
getTexCoordGeneration | public TexCoordGeneration getTexCoordGeneration()(Code) | | Retrieves the current texCoordGeneration object.
the texCoordGeneration object exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph |
getTexture | public Texture getTexture()(Code) | | Retrieves the current texture object.
the texture object exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph |
getTextureAttributes | public TextureAttributes getTextureAttributes()(Code) | | Retrieves the current textureAttributes object.
the textureAttributes object exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph |
set | public void set(Texture texture, TextureAttributes textureAttributes, TexCoordGeneration texCoordGeneration)(Code) | | Sets the texture, texture attributes, and texture coordinate
generation components in this TextureUnitState object to the
specified component objects.
Parameters: texture - object that specifies the desired texturemap and texture parameters Parameters: textureAttributes - object that specifies the desiredtexture attributes Parameters: texCoordGeneration - object that specifies the texture coordinategeneration parameters exception: IllegalSharingException - if this TextureUnitState is live andthe specified texture refers to an ImageComponent2D that is being usedby a Canvas3D as an off-screen buffer. exception: IllegalSharingException - if this TextureUnitState isbeing used by an immediate mode context andthe specified texture refers to an ImageComponent2D that is being usedby a Canvas3D as an off-screen buffer. |
setTexCoordGeneration | public void setTexCoordGeneration(TexCoordGeneration texCoordGeneration)(Code) | | Sets the texCoordGeneration object to the specified object.
Setting it to null disables texture coordinate generation for the
texture unit corresponding to this TextureUnitState object.
Parameters: texCoordGeneration - object that specifies the texture coordinategeneration parameters exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph |
setTexture | public void setTexture(Texture texture)(Code) | | Sets the texture object to the specified object.
Setting it to null disables texture mapping for the
texture unit corresponding to this TextureUnitState object.
Parameters: texture - object that specifies the desired texturemap and texture parameters exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph exception: IllegalSharingException - if this TextureUnitState is live andthe specified texture refers to an ImageComponent2D that is being usedby a Canvas3D as an off-screen buffer. exception: IllegalSharingException - if this TextureUnitState isbeing used by an immediate mode context andthe specified texture refers to an ImageComponent2D that is being usedby a Canvas3D as an off-screen buffer. |
setTextureAttributes | public void setTextureAttributes(TextureAttributes textureAttributes)(Code) | | Sets the textureAttributes object to the specified object.
Setting it to null will result in default attribute usage for the.
texture unit corresponding to this TextureUnitState object.
Parameters: textureAttributes - object that specifies the desiredtexture attributes exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph |
Fields inherited from javax.media.j3d.NodeComponent | boolean forceDuplicate(Code)(Java Doc)
|
|
|