Open Inventor Reference
|
Group node that traverse one chosen child. More...
#include <Inventor/nodes/SoSwitch.h>
Public Member Functions | |
SoSwitch () | |
Creates a switch node with default settings. | |
SoSwitch (int nChildren) | |
Constructor that takes approximate number of children. | |
virtual SbBool | affectsState () const |
Overrides method in SoNode to return FALSE if there is no selected child or the selected child does not affect the state. | |
virtual void | doAction (SoAction *action) |
Implement actions. | |
virtual void | callback (SoCallbackAction *action) |
virtual void | GLRender (SoGLRenderAction *action) |
These virtual functions implement all of the actions for nodes, Most of the default implementations do nothing. | |
virtual void | pick (SoPickAction *action) |
virtual void | getBoundingBox (SoGetBoundingBoxAction *action) |
virtual void | handleEvent (SoHandleEventAction *action) |
virtual void | getMatrix (SoGetMatrixAction *action) |
virtual void | search (SoSearchAction *action) |
virtual void | write (SoWriteAction *action) |
Static Public Member Functions | |
static void | initClass () |
Initializes base node class. | |
Public Attributes | |
Fields | |
SoSFInt32 | whichChild |
Index of the child to traverse, or one of SO_SWITCH_NONE , SO_SWITCH_INHERIT , or SO_SWITCH_ALL . | |
Protected Member Functions | |
void | traverseChildren (SoAction *action) |
Generic traversal of children. | |
virtual | ~SoSwitch () |
This group node usually traverses only one or none 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 or to switch between different properties.
The whichChild field specifies the index of the child to traverse, where the first child has index 0.
A value of SO_SWITCH_NONE
(-1, the default) means do not traverse any children. A value of SO_SWITCH_INHERIT
(-2) allows the index to be inherited from a previously-encountered SoSwitch node or from certain other nodes (such as SoArray or SoMultipleCopy) that set the switch value. A value of SO_SWITCH_ALL
(-3) traverses all children, making the switch behave exactly like a regular SoGroup.
Switch { whichChild -1 }
Definition at line 111 of file SoSwitch.h.
SoSwitch::SoSwitch | ( | ) |
SoSwitch::SoSwitch | ( | int | nChildren | ) |
virtual SoSwitch::~SoSwitch | ( | ) | [protected, virtual] |
virtual void SoSwitch::callback | ( | SoCallbackAction * | action | ) | [virtual] |
Reimplemented from SoGroup.
virtual void SoSwitch::getBoundingBox | ( | SoGetBoundingBoxAction * | action | ) | [virtual] |
virtual void SoSwitch::getMatrix | ( | SoGetMatrixAction * | action | ) | [virtual] |
Reimplemented from SoGroup.
virtual void SoSwitch::GLRender | ( | SoGLRenderAction * | action | ) | [virtual] |
Reimplemented from SoGroup.
virtual void SoSwitch::handleEvent | ( | SoHandleEventAction * | action | ) | [virtual] |
Reimplemented from SoGroup.
static void SoSwitch::initClass | ( | ) | [static] |
virtual void SoSwitch::pick | ( | SoPickAction * | action | ) | [virtual] |
Reimplemented from SoGroup.
virtual void SoSwitch::search | ( | SoSearchAction * | action | ) | [virtual] |
Reimplemented from SoGroup.
void SoSwitch::traverseChildren | ( | SoAction * | action | ) | [protected] |
virtual void SoSwitch::write | ( | SoWriteAction * | action | ) | [virtual] |
Definition at line 121 of file SoSwitch.h.