Group node that traverses one chosen child. More...
#include <Inventor/nodes/SoSwitch.h>
Public Member Functions | |
virtual SoType | getTypeId () const |
SoSwitch () | |
SoSwitch (int nChildren) | |
Static Public Member Functions | |
static SoType | getClassTypeId () |
Public Attributes | |
SoSFInt32 | whichChild |
Group node that traverses one chosen child.
This group node traverses exactly one, none or all of its children. It implements an operation similar to the switch statement in C. One can use this node to switch on and off the effects of some properties, to switch between different properties, to switch between different geometry or to control the visibility of geometry.
The whichChild field specifies the index of the child to traverse, where the first child has index 0. There are several special values that can be used:
There are several extended versions of this node with additional/different behavior:
NOTES:
whichChild | -1 |
SoSearchAction
If the action's Searching-All flag is set, always traverses all children. Otherwise, traverses just the chosen child or children.
SoArray, SoLevelOfDetail, SoMultipleCopy, SoPathSwitch, SoMultiSwitch, SoInteractiveSwitch
InteractiveSwitch, MultiPathSwitch, MultiSwitch, PathSwitch, Medical4DVolumeRendering, MedicalAnatomicalViews, TutorialCombineColorMapping
SoSwitch::SoSwitch | ( | ) |
Creates a switch node with default settings.
SoSwitch::SoSwitch | ( | int | nChildren | ) |
Constructor that takes approximate number of children.
static SoType SoSwitch::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from SoGroup.
Reimplemented in SoBlinker, and SoInteractiveSwitch.
virtual SoType SoSwitch::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from SoGroup.
Reimplemented in SoBlinker, and SoInteractiveSwitch.
Index of the child to traverse, or one of SO_SWITCH_NONE, SO_SWITCH_INHERIT, or SO_SWITCH_ALL.