Package com.openinventor.inventor.nodes
Class SoMultiSwitch
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.misc.SoBase
-
- com.openinventor.inventor.fields.SoFieldContainer
-
- com.openinventor.inventor.nodes.SoNode
-
- com.openinventor.inventor.nodes.SoGroup
-
- com.openinventor.inventor.nodes.SoMultiSwitch
-
- All Implemented Interfaces:
SafeDisposable
public class SoMultiSwitch extends SoGroup
Group node that traverses a set of chosen children. This group node traverses none, all or a specified list of its children. Effectively it is an extended version of theSoSwitch
node.The
whichChildren
field specifies a list of children (by index) to traverse, where the first child has index 0. ThetraversalMode
field can specify to traverse none of the children, all of the children, the children in the list or all the children not in the list.NOTES:
- Remember that the default value for
traversalMode
is NONE, meaning that nothing is displayed by default. - Remember that this node is an
SoGroup
, NOT anSoSeparator
, and therefore does not provide render caching. Generally if the children contain geometry, it is good practice to make each child anSoSeparator
to make render caching more effective.
File format/default:
MultiSwitch {
whichChildren [ ] traversalMode NONE inherit NO Action behavior:
SoGLRenderAction
,SoCallbackAction
,SoGetBoundingBoxAction
,SoGetMatrixAction
,SoHandleEventAction
,SoRayPickAction
Traverses the chosen child or children. Sets:SoSwitchElement
SoSearchAction
If the action's Searching-All flag is set, always traverses all children. Otherwise, traverses just the chosen child or children.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SoMultiSwitch.InheritModes
Inheritance Mode enumerated values.static class
SoMultiSwitch.TraversalModes
Traversal Mode enumerated values.-
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModes
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
Fields Modifier and Type Field Description SoSFEnum<SoMultiSwitch.InheritModes>
inheritMode
Defines the way this node inherit values from the state.SoSFEnum<SoMultiSwitch.TraversalModes>
traversalMode
Defines the way the children list must be managed.SoMFInt32
whichChildren
Indices of the children to traverse.-
Fields inherited from class com.openinventor.inventor.nodes.SoGroup
boundingBoxIgnoring
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description SoMultiSwitch()
Creates a multi-switch node with default settings.SoMultiSwitch(int nChildren)
Constructor that takes approximate number of children.
-
Method Summary
-
Methods inherited from class com.openinventor.inventor.nodes.SoGroup
addChild, findChild, getChild, getNumChildren, insertChild, removeAllChildren, removeChild, removeChild, replaceChild, replaceChild
-
Methods inherited from class com.openinventor.inventor.nodes.SoNode
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderEngineMode, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
-
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
-
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
-
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
-
-
-
Field Detail
-
whichChildren
public final SoMFInt32 whichChildren
Indices of the children to traverse. Default is empty.
-
traversalMode
public final SoSFEnum<SoMultiSwitch.TraversalModes> traversalMode
Defines the way the children list must be managed. . Default is NONE.
-
inheritMode
public final SoSFEnum<SoMultiSwitch.InheritModes> inheritMode
Defines the way this node inherit values from the state. . Default is NO.
-
-