|
Aviatrix3D 1.0 | ||||||||||
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.Appearance
Describes the appearance of an object.
Attribute classes are used to control various visual details about the object being rendered. Although a single instance of this class can take all the attribute types at once, you'll need to consider what this object is being used for. Most of the time you should only ever need to use one of Point/Line/Polygon attributes.
Note: If you have semi-transparent objects that need blending, you
do not need provide an instance of
BlendAttributes
. Aviatrix3D will
internally handle the correct settings that you need, so there is no need
to provide your own. Only use it when you want to blend objects with
something different than the standard blending setup for non-transparent
and transparent objects as it will remove this object from the normal
transparency sorting processing and into a separate state.
Field Summary |
Fields inherited from class org.j3d.aviatrix3d.NodeComponent |
lastParent, liveCount, parentList |
Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject |
alive, LISTENER_SET_NOT_LIVE_MESSAGE, updateHandler, WRITE_TIMING_MSG |
Constructor Summary | |
Appearance()
The default constructor. |
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. |
BlendAttributes |
getBlendAttributes()
Get the current blend rendering attributes in use. |
LineAttributes |
getLineAttributes()
Get the current line rendering attributes in use. |
Material |
getMaterial()
Get the current material in use. |
PointAttributes |
getPointAttributes()
Get the current pointgon rendering attributes in use. |
PolygonAttributes |
getPolygonAttributes()
Get the current polygon rendering attributes in use. |
Shader |
getShader()
Get the current shader in use. |
void |
getTextureUnits(TextureUnit[] texUnits)
Get the texture units used by the material. |
boolean |
isVisible()
Check to see if this appearance is making the geometry visible or not. |
int |
numTextureUnits()
Get the current number of texture units that are valid |
void |
postRender(net.java.games.jogl.GL gl,
net.java.games.jogl.GLU glu)
Restore all openGL state. |
void |
render(net.java.games.jogl.GL gl,
net.java.games.jogl.GLU glu)
Issue ogl commands needed for this component. |
void |
setBlendAttributes(BlendAttributes attr)
Set the blend rendering attributes to use. |
void |
setLineAttributes(LineAttributes attr)
Set the line rendering attributes to use. |
protected void |
setLive(boolean state)
Notification that this object is live now. |
void |
setMaterial(Material mat)
Set the material to use. |
void |
setPointAttributes(PointAttributes attr)
Set the point rendering attributes to use. |
void |
setPolygonAttributes(PolygonAttributes attr)
Set the polygon rendering attributes to use. |
void |
setShader(Shader s)
Set the shader to use. |
void |
setTextureUnits(TextureUnit[] texUnits,
int num)
Set the texture units to use. |
protected void |
setUpdateHandler(NodeUpdateHandler handler)
Set the scenegraph update handler for this node. |
void |
setVisible(boolean state)
Set the visibility state of any geometry associated with this instance. |
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 Appearance()
Method Detail |
protected void setUpdateHandler(NodeUpdateHandler handler)
setUpdateHandler
in class SceneGraphObject
handler
- The instance to use as a handlerprotected void setLive(boolean state)
setLive
in class SceneGraphObject
state
- true if this should be marked as live nowprotected void checkForCyclicChild(SceneGraphObject parent) throws CyclicSceneGraphStructureException
checkForCyclicChild
in class SceneGraphObject
parent
- The reference to check against this class
CyclicSceneGraphStructureException
- Equal parent and childpublic void render(net.java.games.jogl.GL gl, net.java.games.jogl.GLU glu)
render
in interface RenderableObject
gl
- The gl context to draw withglu
- The utility context to draw withpublic void postRender(net.java.games.jogl.GL gl, net.java.games.jogl.GLU glu)
postRender
in interface RenderableObject
gl
- The gl context to draw withglu
- The utility context to draw withpublic void setVisible(boolean state)
state
- true to make the object visible
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic boolean isVisible()
public void setMaterial(Material mat) throws InvalidWriteTimingException
mat
- The new material
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic Material getMaterial()
public void setPolygonAttributes(PolygonAttributes attr) throws InvalidWriteTimingException
attr
- The new attributes or null
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic PolygonAttributes getPolygonAttributes()
public void setLineAttributes(LineAttributes attr) throws InvalidWriteTimingException
attr
- The new attributes or null
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic LineAttributes getLineAttributes()
public void setPointAttributes(PointAttributes attr) throws InvalidWriteTimingException
attr
- The new attributes or null
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic PointAttributes getPointAttributes()
public void setBlendAttributes(BlendAttributes attr) throws InvalidWriteTimingException
attr
- The new attributes or null
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic BlendAttributes getBlendAttributes()
public void setShader(Shader s) throws InvalidWriteTimingException
s
- The new shader instance to use or null
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic Shader getShader()
public void setTextureUnits(TextureUnit[] texUnits, int num) throws InvalidWriteTimingException
texUnits
- The new Texture lists to setnum
- The number of valid entries in the array
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic int numTextureUnits()
public void getTextureUnits(TextureUnit[] texUnits)
texUnits
- An array to copy the texture units into
java.lang.IllegalArgumentException
- The provided array is not big enough
to hold all the texture units
|
Aviatrix3D 1.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |