|
j3d.org Aviatrix3D | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.j3d.aviatrix3d.SceneGraphObject
org.j3d.aviatrix3d.NodeComponent
org.j3d.aviatrix3d.TextureUnit
Describes a texture stage and its associated texture and attributes.
Field Summary |
Fields inherited from class org.j3d.aviatrix3d.NodeComponent |
liveCount |
Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject |
alive, updateHandler, WRITE_TIMING_MSG |
Constructor Summary | |
TextureUnit()
Constructs a Texture Unit with default values. |
|
TextureUnit(Texture t,
TextureAttributes attrs,
TexCoordGeneration tcg)
Construct a Texture Unit with the specified texture, attributes and coordinate generation. |
Method Summary | |
protected void |
checkForCyclicChild(SceneGraphObject parent)
Check to see if this node is the same reference as the passed node that is a parent of this node. |
TexCoordGeneration |
getTexCoordGeneration()
Get the currently set texture. |
Texture |
getTexture()
Get the currently set texture. |
TextureAttributes |
getTextureAttributes()
Get the currently set texture attributes. |
void |
getTextureTransform(javax.vecmath.Matrix4f mat)
Get the current local texture transformation maxtix. |
void |
renderState(net.java.games.jogl.GL gl,
net.java.games.jogl.GLU glu)
Issue ogl commands needed for this component |
void |
restoreState(net.java.games.jogl.GL gl,
net.java.games.jogl.GLU glu)
Restore all openGL state to the given drawable. |
protected void |
setLive(boolean state)
Notification that this object is live now. |
void |
setTexCoordGeneration(TexCoordGeneration tcg)
Set the texture coordinate generation for this stage. |
void |
setTexture(Texture tex)
Set the texture for this stage. |
void |
setTextureAttributes(TextureAttributes attrs)
Set the texture attributes for this stage. |
void |
setTextureTransform(javax.vecmath.Matrix4f mat)
Set the current texture transform matrix. |
protected void |
setUpdateHandler(NodeUpdateHandler handler)
Set the scenegraph update handler for this node. |
Methods inherited from class org.j3d.aviatrix3d.NodeComponent |
addParent, getParents, hasChanged, numParents, removeParent |
Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject |
checkForCyclicParent, dataChanged, getUserData, isLive, setUserData |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TextureUnit()
public TextureUnit(Texture t, TextureAttributes attrs, TexCoordGeneration tcg)
t
- The texture instance to useattrs
- Attributes used to control the visual appearancetcg
- Automated texture coordinate generation, if neededMethod Detail |
protected void checkForCyclicChild(SceneGraphObject parent) throws CyclicSceneGraphStructureException
checkForCyclicChild
in class SceneGraphObject
parent
- The reference to check against this class
CyclicSceneGraphStructureException
- Equal parent and childprotected void setUpdateHandler(NodeUpdateHandler handler)
setUpdateHandler
in class SceneGraphObject
handler
- The instance to use as a handlerpublic void renderState(net.java.games.jogl.GL gl, net.java.games.jogl.GLU glu)
renderState
in class NodeComponent
gl
- The gl context to draw withglu
- The utility context to draw withpublic void restoreState(net.java.games.jogl.GL gl, net.java.games.jogl.GLU glu)
restoreState
in class NodeComponent
gl
- The gl context to draw withglu
- The utility context to draw withprotected void setLive(boolean state)
setLive
in class SceneGraphObject
state
- true if this should be marked as live nowpublic void setTexture(Texture tex) throws InvalidWriteTimingException
tex
- The texture to be used or null
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic Texture getTexture()
public void setTextureAttributes(TextureAttributes attrs) throws InvalidWriteTimingException
attrs
- The texture attributes. Null clears.
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic TextureAttributes getTextureAttributes()
public void setTexCoordGeneration(TexCoordGeneration tcg) throws InvalidWriteTimingException
tcg
- The texture coordinate generation. Null clears.
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic TexCoordGeneration getTexCoordGeneration()
public void setTextureTransform(javax.vecmath.Matrix4f mat) throws InvalidWriteTimingException
mat
- The matrix to modify textures by, or null
InvalidWriteTimingException
public void getTextureTransform(javax.vecmath.Matrix4f mat)
mat
- The matrix to copy the current values into
|
j3d.org Aviatrix3D | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |