public class SoInteractiveSwitch extends SoSwitch
SoSwitch node for its inherited whichChild field.
It has the additional feature of (optionally) traversing a different (or no) child during an "interaction". This allows the application to provide higher performance during an interaction by switching to a less complex version of a geomtry or not rendering the geometry at all. Interaction includes moving the camera (navigating around the scene) and interacting with a dragger (see SoDragger), for example dragging a slice through a volume data set.
The whichInteractiveChild field specifies the index of the child to traverse (where the first child has index 0), when a user interaction, for example moving the camera, is in progress. This means that while the camera is moving, the traversed children will be the children defined by the whichInteractiveChild field, and when interaction is stopped, the standard SoSwitchwhichChild field value will again be used as the index to traverse.
NOTES:
SoGroup, NOT an SoSeparator, and therefore does not provide render caching. Generally if the children contain geometry, it is good practice to make each child an SoSeparator to make render caching more effective.
File format/default:
InteractiveSwitch {
| whichChild | -1 |
| whichInteractiveChild | -1 |
Action behavior:
inherited from SoSwitch. While interacting, traverses the chosen (from whichInteractiveChild) child or children. Sets: SoInteractiveSwitchElement. While not interacting, traverses the chosen (from whichChild) child or children. Sets: SoSwitchElement.
See also:
SoArray, SoLevelOfDetail, SoMultiPathSwitch, SoMultipleCopy, SoPathSwitch, SoSwitch
SoSwitch.WhichChildInventor.ConstructorCommand| Modifier and Type | Field and Description |
|---|---|
SoSFInt32 |
whichInteractiveChild
Index of the child to traverse during interaction, (or one of SO_SWITCH_NONE, SO_SWITCH_INHERIT, or SO_SWITCH_ALL).
|
SO_SWITCH_ALL, SO_SWITCH_INHERIT, SO_SWITCH_NONE, whichChildboundingBoxIgnoringVERBOSE_LEVEL, ZeroHandle| Constructor and Description |
|---|
SoInteractiveSwitch()
Creates an interactive-switch node with default settings.
|
SoInteractiveSwitch(int nChildren)
Constructor that takes approximate number of children.
|
addChild, findChild, getChild, getNumChildren, insertChild, removeAllChildren, removeChild, removeChild, replaceChild, replaceChildaffectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, writecopyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaultsdispose, getEXTERNPROTO, getName, getPROTO, isDisposable, isSynchronizable, setName, setSynchronizablegetAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreadspublic final SoSFInt32 whichInteractiveChild
Generated on July 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com