public class SoState extends Inventor
SoState
collects and holds state while traversing a scene graph. A state is composed of a variety of elements, each of which holds some specific information, such as coordinates or diffuse color of the surface material.
Each element is stored in its own stack so that save and restore can be implemented as push and pop. These stack operations are performed lazily, so that pushing of a value occurs only when the value would be overwritten, for efficiency.
Inventor.ConstructorCommand
VERBOSE_LEVEL, ZeroHandle
Modifier and Type | Method and Description |
---|---|
void |
enableSendToGL(boolean enable)
Enables or disables sendToGL in SoElements affected by the GLRenderAction.
|
SoAction |
getAction()
Returns the action instance the state is part of.
|
SoElement |
getConstElement(java.lang.Class<? extends Inventor> type,
int stackIndex)
Returns the top (read-only) instance of the given element stack.
|
SoElement |
getConstElement(int stackIndex)
Deprecated.
As of Open Inventor 9000 Use the type safe templated version instead.
|
SoElement |
getElement(java.lang.Class<? extends Inventor> type,
int stackIndex)
Returns a writable instance of the element on the top of the stack with the given index and type.
|
SoElement |
getElement(int stackIndex)
Deprecated.
As of Open Inventor 9000 Use the templated version instead.
|
boolean |
isSendToGLEnabled()
Gets sendToGL activation flag.
|
void |
pop()
Pops the state, restoring the state to just before the last
push() . |
void |
push()
Pushes (saves) the current state until a
pop() restores it. |
dispose, getNativeResourceHandle
@Deprecated public SoElement getElement(int stackIndex)
public SoAction getAction()
public SoElement getElement(java.lang.Class<? extends Inventor> type, int stackIndex)
@Deprecated public SoElement getConstElement(int stackIndex)
public void pop()
push()
.public void push()
pop()
restores it.
The push is done lazily: this just increments the depth in the state. When an element is accessed with getElement() and its depth is less than the current depth, it is then pushed individually.public boolean isSendToGLEnabled()
enableSendToGL()
public SoElement getConstElement(java.lang.Class<? extends Inventor> type, int stackIndex)
public void enableSendToGL(boolean enable)
Generated on July 31, 2019, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com