SoSwitch(3IV)

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

As shipped in IRIX 6.5.22. Added in IRIX 6.5.22.

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

INHERITS FROM
     SoBase > SoFieldContainer > SoNode > SoGroup > SoSwitch

SYNOPSIS
     #include <Inventor_c/nodes/SoSwitch.h>

          Fields from class SoSwitch:

     SoSFInt32           whichChild

          Functions from class SoSwitch:

     SoSwitch *          SoSwitchCreate()
     SoSwitch *          SoSwitchCreateN(int nChildren)
     SoType              SoSwitchGetClassTypeId()

          Functions from class SoGroup:

     void                SoSwitchAddChild(SoSwitch *this, SoNode *child)
     void                SoSwitchInsertChild(SoSwitch *this, SoNode *child,
                              int newChildIndex)
     SoNode *            SoSwitchGetChild(const SoSwitch *this, int index)
     int                 SoSwitchFindChild(const SoSwitch *this, const SoNode
                              *child)
     int                 SoSwitchGetNumChildren(const SoSwitch *this)
     void                SoSwitchRemoveChild(SoSwitch *this, int index)
     void                SoSwitchRemoveChildNode(SoSwitch *this, SoNode
                              *child)
     void                SoSwitchRemoveAllChildren(SoSwitch *this)
     void                SoSwitchReplaceChild(SoSwitch *this, int index,
                              SoNode *newChild)
     void                SoSwitchReplaceChildNode(SoSwitch *this, SoNode
                              *oldChild, SoNode *newChild)

          Functions from class SoNode:

     void                SoSwitchSetOverride(SoSwitch *this, SbBool state)
     SbBool              SoSwitchIsOverride(const SoSwitch *this)
     SoNode *            SoSwitchCopy(const SoSwitch *this, SbBool
                              copyConnections = FALSE)
     SbBool              SoSwitchAffectsState(const SoSwitch *this)
     SoNode *            SoSwitchGetByName(const char *name)
     int                 SoSwitchGetByNameList(const char *name, SoNodeList
                              *list)

          Functions from class SoFieldContainer:

     void                SoSwitchSetToDflts(SoSwitch *this)
     SbBool              SoSwitchHasDfltVals(const SoSwitch *this)
     SbBool              SoSwitchFldsAreEq(const SoSwitch *this, const
                              SoFieldContainer *fc)
     void                SoSwitchCopyFieldVals(SoSwitch *this, const
                              SoFieldContainer *fc, SbBool copyConnections =
                              FALSE)
     SbBool              SoSwitchSet(SoSwitch *this, const char
                              *fieldDataString)
     void                SoSwitchGet(SoSwitch *this, SbString
                              *fieldDataString)
     int                 SoSwitchGetFields(const SoSwitch *this, SoFieldList
                              *resultList)
     SoField *           SoSwitchGetField(const SoSwitch *this, const char
                              *fieldName)
     SbBool              SoSwitchGetFieldName(const SoSwitch *this, const
                              SoField *field, SbName *fieldName)
     SbBool              SoSwitchIsNotifyEnabled(const SoSwitch *this)
     SbBool              SoSwitchEnableNotify(SoSwitch *this, SbBool flag)

          Functions from class SoBase:

     void                SoSwitchRef(SoSwitch *this)
     void                SoSwitchUnref(const SoSwitch *this)
     void                SoSwitchUnrefNoDelete(const SoSwitch *this)
     void                SoSwitchTouch(SoSwitch *this)
     SoType              SoSwitchGetTypeId(const SoSwitch *this)
     SbBool              SoSwitchIsOfType(const SoSwitch *this, SoType type)
     void                SoSwitchSetName(SoSwitch *this, const char *name)
     SbName              SoSwitchGetName(const SoSwitch *this)


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
     SoSFInt32           whichChild
          Index of the child to traverse, or one of SO_SWITCH_NONE,
          SO_SWITCH_INHERIT, or SO_SWITCH_ALL.
FUNCTIONS
     SoSwitch *          SoSwitchCreate()
          Creates a switch node with default settings.

     SoSwitch *          SoSwitchCreateN(int nChildren)
          Constructor that takes approximate number of children.

     SoType              SoSwitchGetClassTypeId()
          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