Class SoInteractiveSwitch
- java.lang.Object
-
- All Implemented Interfaces:
SafeDisposable
public class SoInteractiveSwitch extends SoSwitch
Group node that traverses one chosen child depending on scene interaction. This group node has the same base behavior as theSoSwitch
node for its inheritedwhichChild
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 thewhichInteractiveChild
field, and when interaction is stopped, the standardSoSwitch
whichChild
field value will again be used as the index to traverse.NOTES:
- Remember that the default value for both whichChild and whichInteractiveChild is SO_SWITCH_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:
InteractiveSwitch {
whichChild -1 whichInteractiveChild -1 Action behavior:
inherited from
SoSwitch
. While interacting, traverses the chosen (fromwhichInteractiveChild
) child or children. Sets:SoInteractiveSwitchElement
. While not interacting, traverses the chosen (fromwhichChild
) child or children. Sets:SoSwitchElement
.- See Also:
SoArray
,SoLevelOfDetail
,SoMultiPathSwitch
,SoMultipleCopy
,SoPathSwitch
,SoSwitch
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoSwitch
SoSwitch.WhichChild
-
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 SoSFInt32
whichInteractiveChild
Index of the child to traverse during interaction, (or one of SO_SWITCH_NONE, SO_SWITCH_INHERIT, or SO_SWITCH_ALL).-
Fields inherited from class com.openinventor.inventor.nodes.SoSwitch
SO_SWITCH_ALL, SO_SWITCH_INHERIT, SO_SWITCH_NONE, whichChild
-
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 SoInteractiveSwitch()
Creates an interactive-switch node with default settings.SoInteractiveSwitch(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
-
whichInteractiveChild
public final SoSFInt32 whichInteractiveChild
Index of the child to traverse during interaction, (or one of SO_SWITCH_NONE, SO_SWITCH_INHERIT, or SO_SWITCH_ALL).
-
-