|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jme.scene.Spatial
com.jme.scene.Node
com.jme.scene.SwitchNode
SwitchNode defines a node that maintains a single active child
at a time. This allows the instantanious switching of children depending on
any number of factors. For example, multiple levels of detail models can be
loaded into the switch node and the active model can be set depending on the
distance from the camera.
| Field Summary | |
static int |
SN_INVALID_CHILD
defines an inactive or invalid child. |
| Fields inherited from class com.jme.scene.Node |
children |
| Fields inherited from class com.jme.scene.Spatial |
currentStates, defaultStateList, forceCull, forceView, frustrumIntersects, geometricalControllers, lightCombineMode, localRotation, localScale, localTranslation, name, parent, queueDistance, renderQueueMode, renderStateList, textureCombineMode, worldBound, worldRotation, worldScale, worldTranslation, zOrder |
| Constructor Summary | |
SwitchNode(java.lang.String name)
Constructor instantiates a new SwitchNode object. |
|
| Method Summary | |
void |
disableAllChildren()
Marks the node to render nothing on a draw. |
void |
draw(Renderer r)
If a valid active child is set, that child is rendered and none others. |
int |
getActiveChild()
Returns the index of the currently rendered child for this Node. |
void |
setActiveChild(int child)
Sets the index of the child of this Node that will be rendered. |
| Methods inherited from class com.jme.scene.Node |
applyRenderState, attachChild, detachAllChildren, detachChild, detachChildAt, detachChildNamed, drawBounds, findCollisions, findPick, getChild, getChild, getChildren, getQuantity, hasChild, hasCollision, putClone, setChild, setForceView, updateCollisionTree, updateWorldBound, updateWorldData |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int SN_INVALID_CHILD
| Constructor Detail |
public SwitchNode(java.lang.String name)
SwitchNode object. The name
of the node is provided during construction.
name - the name of the node.| Method Detail |
public int getActiveChild()
public void setActiveChild(int child)
child - The child index of this node it should render.public void disableAllChildren()
public void draw(Renderer r)
draw in class Noder - The render system to draw the child.Spatial.draw(com.jme.renderer.Renderer)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||