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
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 the
SoSwitch node.
The whichChildren field specifies a list of children (by index) to traverse, where the first child has index 0. The traversalMode 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
traversalModeis 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 anSoSeparatorto 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.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumInheritance Mode enumerated values.static enumTraversal Mode enumerated values.Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModesNested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand -
Field Summary
FieldsModifier and TypeFieldDescriptionDefines the way this node inherit values from the state.Defines the way the children list must be managed.final SoMFInt32Indices of the children to traverse.Fields inherited from class com.openinventor.inventor.nodes.SoGroup
boundingBoxIgnoringFields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle -
Constructor Summary
ConstructorsConstructorDescriptionCreates 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, replaceChildMethods 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, writeMethods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaultsMethods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizableMethods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
Field Details
-
whichChildren
Indices of the children to traverse. Default is empty. -
traversalMode
Defines the way the children list must be managed. . Default is NONE. -
inheritMode
Defines the way this node inherit values from the state. . Default is NO.
-
-
Constructor Details
-
SoMultiSwitch
public SoMultiSwitch(int nChildren) Constructor that takes approximate number of children. -
SoMultiSwitch
public SoMultiSwitch()Creates a multi-switch node with default settings.
-