|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.media.j3d.SceneGraphObject
javax.media.j3d.NodeComponent
javax.media.j3d.TextureUnitState
public class TextureUnitState
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:
Appearance
,
Texture
,
TextureAttributes
,
TexCoordGeneration
Field Summary | |
---|---|
static int |
ALLOW_STATE_READ
Specifies that this TextureUnitState object allows reading its texture, texture attribute, or texture coordinate generation component information. |
static int |
ALLOW_STATE_WRITE
Specifies that this TextureUnitState object allows writing its texture, texture attribute, or texture coordinate generation component information. |
private static int[] |
readCapabilities
|
Fields inherited from class javax.media.j3d.NodeComponent |
---|
forceDuplicate |
Fields inherited from class javax.media.j3d.SceneGraphObject |
---|
nodeHashtable, retained |
Constructor Summary | |
---|---|
TextureUnitState()
Constructs a TextureUnitState component object using defaults for all state variables. |
|
TextureUnitState(Texture texture,
TextureAttributes textureAttributes,
TexCoordGeneration texCoordGeneration)
Constructs a TextureUnitState component object using the specified component objects. |
Method Summary | |
---|---|
NodeComponent |
cloneNodeComponent()
Deprecated. replaced with cloneNodeComponent(boolean forceDuplicate) |
(package private) void |
createRetained()
Creates the retained mode TextureUnitStateRetained object that this TextureUnitState component object will point to. |
(package private) void |
duplicateAttributes(NodeComponent originalNodeComponent,
boolean forceDuplicate)
Copies all TextureUnitState information from originalNodeComponent into
the current node. |
(package private) boolean |
duplicateChild()
This function is called from getNodeComponent() to see if any of the sub-NodeComponents duplicateOnCloneTree flag is true. |
void |
duplicateNodeComponent(NodeComponent originalNodeComponent)
Deprecated. replaced with duplicateNodeComponent( NodeComponent originalNodeComponent, boolean forceDuplicate) |
TexCoordGeneration |
getTexCoordGeneration()
Retrieves the current texCoordGeneration object. |
Texture |
getTexture()
Retrieves the current texture object. |
TextureAttributes |
getTextureAttributes()
Retrieves the current textureAttributes object. |
void |
set(Texture texture,
TextureAttributes textureAttributes,
TexCoordGeneration texCoordGeneration)
Sets the texture, texture attributes, and texture coordinate generation components in this TextureUnitState object to the specified component objects. |
void |
setTexCoordGeneration(TexCoordGeneration texCoordGeneration)
Sets the texCoordGeneration object to the specified object. |
void |
setTexture(Texture texture)
Sets the texture object to the specified object. |
void |
setTextureAttributes(TextureAttributes textureAttributes)
Sets the textureAttributes object to the specified object. |
Methods inherited from class javax.media.j3d.NodeComponent |
---|
checkDuplicateNodeComponent, cloneNodeComponent, duplicateNodeComponent, getDuplicateOnCloneTree, setDuplicateOnCloneTree, validateImageIllegalSharing |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int ALLOW_STATE_READ
public static final int ALLOW_STATE_WRITE
private static final int[] readCapabilities
Constructor Detail |
---|
public TextureUnitState()
public TextureUnitState(Texture texture, TextureAttributes textureAttributes, TexCoordGeneration texCoordGeneration)
texture
- object that specifies the desired texture
map and texture parameterstextureAttributes
- object that specifies the desired
texture attributestexCoordGeneration
- object that specifies the texture coordinate
generation parametersMethod Detail |
---|
void createRetained()
createRetained
in class NodeComponent
public void set(Texture texture, TextureAttributes textureAttributes, TexCoordGeneration texCoordGeneration)
texture
- object that specifies the desired texture
map and texture parameterstextureAttributes
- object that specifies the desired
texture attributestexCoordGeneration
- object that specifies the texture coordinate
generation parameters
IllegalSharingException
- if this TextureUnitState is live and
the specified texture refers to an ImageComponent2D that is being used
by a Canvas3D as an off-screen buffer.
IllegalSharingException
- if this TextureUnitState is
being used by an immediate mode context and
the specified texture refers to an ImageComponent2D that is being used
by a Canvas3D as an off-screen buffer.public void setTexture(Texture texture)
texture
- object that specifies the desired texture
map and texture parameters
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graph
IllegalSharingException
- if this TextureUnitState is live and
the specified texture refers to an ImageComponent2D that is being used
by a Canvas3D as an off-screen buffer.
IllegalSharingException
- if this TextureUnitState is
being used by an immediate mode context and
the specified texture refers to an ImageComponent2D that is being used
by a Canvas3D as an off-screen buffer.public Texture getTexture()
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic void setTextureAttributes(TextureAttributes textureAttributes)
textureAttributes
- object that specifies the desired
texture attributes
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic TextureAttributes getTextureAttributes()
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic void setTexCoordGeneration(TexCoordGeneration texCoordGeneration)
texCoordGeneration
- object that specifies the texture coordinate
generation parameters
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic TexCoordGeneration getTexCoordGeneration()
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic NodeComponent cloneNodeComponent()
cloneNodeComponent
in class NodeComponent
public void duplicateNodeComponent(NodeComponent originalNodeComponent)
duplicateNodeComponent
in class NodeComponent
void duplicateAttributes(NodeComponent originalNodeComponent, boolean forceDuplicate)
originalNodeComponent
into
the current node. This method is called from the
cloneNode
method which is, in turn, called by the
cloneTree
method.
duplicateAttributes
in class NodeComponent
originalNodeComponent
- the original node to duplicate.forceDuplicate
- when set to true
, causes the
duplicateOnCloneTree
flag to be ignored. When
false
, the value of each node's
duplicateOnCloneTree
variable determines whether
NodeComponent data is duplicated or copied.
RestrictedAccessException
- if this object is part of a live
or compiled scenegraph.Node.cloneTree()
,
NodeComponent.setDuplicateOnCloneTree(boolean)
boolean duplicateChild()
duplicateChild
in class NodeComponent
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |