man SoSwitch () - group node that traverse one chosen child

NAME

SoSwitch - group node that traverse one chosen child

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoGroup > SoSwitch

SYNOPSIS

#include <Inventor/nodes/SoSwitch.h> Fields from class SoSwitch: c } c } whichChild Methods from class SoSwitch: c } c } SoSwitch()

c } c } SoSwitch(int nChildren)

c } c } getClassTypeId() Methods from class SoGroup: c } c } addChild(SoNode *child)

c } c } insertChild(SoNode *child, int newChildIndex)

c } c } getChild(int index) const

c } c } findChild(const SoNode *child) const

c } c } getNumChildren() const

c } c } removeChild(int index)

c } c } removeChild(SoNode *child)

c } c } removeAllChildren()

c } c } replaceChild(int index, SoNode *newChild)

c } c } replaceChild(SoNode *oldChild, SoNode *newChild) Methods from class SoNode: c } c } setOverride(SbBool state)

c } c } isOverride() const

c } c } copy(SbBool copyConnections = FALSE) const

c } c } affectsState() const

c } c } getByName(const SbName &name)

c } c } getByName(const SbName &name, SoNodeList &list) Methods from class SoFieldContainer: c } c } setToDefaults()

c } c } hasDefaultValues() const

c } c } fieldsAreEqual(const SoFieldContainer *fc) const

c } c } copyFieldValues(const SoFieldContainer *fc, SbBool copyConnections = FALSE)

c } c } set(const char *fieldDataString)

c } c } get(SbString &fieldDataString)

c } c } getFields(SoFieldList &resultList) const

c } c } getField(const SbName &fieldName) const

c } c } getFieldName(const SoField *field, SbName &fieldName) const

c } c } isNotifyEnabled() const

c } c } enableNotify(SbBool flag) Methods from class SoBase: c } c } ref()

c } c } unref() const

c } c } unrefNoDelete() const

c } c } touch()

c } c } getTypeId() const

c } c } isOfType(SoType type) const

c } c } setName(const SbName &name)

c } c } getName() const

DESCRIPTION

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.

FIELDS

c } c } whichChild

Index of the child to traverse, or one of SO_SWITCH_NONE, SO_SWITCH_INHERIT, or SO_SWITCH_ALL.

METHODS

c } c } SoSwitch()

Creates a switch node with default settings. c } c } SoSwitch(int nChildren)

Constructor that takes approximate number of children. c } c } getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoGetMatrixAction, SoHandleEventAction, SoRayPickAction

Traverses the chosen child or children. SoSearchAction

If the action's Searching-All flag is set, always traverses all children. Otherwise, traverses just the chosen child or children.

FILE FORMAT/DEFAULTS

Switch {
whichChild	-1
}

SEE ALSO

SoArray, SoLevelOfDetail, SoMultipleCopy, SoPathSwitch