1SoSwitch(3IV)()                                                SoSwitch(3IV)()
2
3
4

NAME

6       SoSwitch — group node that traverse one chosen child
7

INHERITS FROM

9       SoBase > SoFieldContainer > SoNode > SoGroup > SoSwitch
10

SYNOPSIS

12       #include <Inventor/nodes/SoSwitch.h>
13
14          Fields from class SoSwitch:
15
16     SoSFInt32           whichChild
17
18          Methods from class SoSwitch:
19
20                         SoSwitch()
21                         SoSwitch(int nChildren)
22     static SoType       getClassTypeId()
23
24          Methods from class SoGroup:
25
26     void                addChild(SoNode *child)
27     void                insertChild(SoNode *child, int newChildIndex)
28     SoNode *            getChild(int index) const
29     int                 findChild(const SoNode *child) const
30     int                 getNumChildren() const
31     void                removeChild(int index)
32     void                removeChild(SoNode *child)
33     void                removeAllChildren()
34     void                replaceChild(int index, SoNode *newChild)
35     void                replaceChild(SoNode *oldChild, SoNode *newChild)
36
37          Methods from class SoNode:
38
39     void                setOverride(SbBool state)
40     SbBool              isOverride() const
41     SoNode *            copy(SbBool copyConnections = FALSE) const
42     virtual SbBool      affectsState() const
43     static SoNode *     getByName(const SbName &name)
44     static int          getByName(const SbName &name, SoNodeList &list)
45
46          Methods from class SoFieldContainer:
47
48     void                setToDefaults()
49     SbBool              hasDefaultValues() const
50     SbBool              fieldsAreEqual(const SoFieldContainer *fc) const
51     void                copyFieldValues(const  SoFieldContainer  *fc,  SbBool
52                              copyConnections = FALSE)
53     SbBool              set(const char *fieldDataString)
54     void                get(SbString &fieldDataString)
55     virtual int         getFields(SoFieldList &resultList) const
56     virtual SoField *   getField(const SbName &fieldName) const
57     SbBool              getFieldName(const SoField *field, SbName &fieldName)
58                              const
59     SbBool              isNotifyEnabled() const
60     SbBool              enableNotify(SbBool flag)
61
62          Methods from class SoBase:
63
64     void                ref()
65     void                unref() const
66     void                unrefNoDelete() const
67     void                touch()
68     virtual SoType      getTypeId() const
69     SbBool              isOfType(SoType type) const
70     virtual void        setName(const SbName &name)
71     virtual SbName      getName() const
72
73

DESCRIPTION

75       This  group node usually traverses only one or none of its children. It
76       implements an operation similar to the switch statement in C.  One  can
77       use this node to switch on and off the effects of some properties or to
78       switch between different properties.
79
80       The whichChild field specifies the index  of  the  child  to  traverse,
81       where the first child has index 0.
82
83       A  value  of SO_SWITCH_NONE (-1, the default) means do not traverse any
84       children. A value of SO_SWITCH_INHERIT (-2)  allows  the  index  to  be
85       inherited  from  a previously-encountered SoSwitch node or from certain
86       other nodes (such as SoArray or SoMultipleCopy)  that  set  the  switch
87       value. A value of SO_SWITCH_ALL (-3) traverses all children, making the
88       switch behave exactly like a regular SoGroup.
89

FIELDS

91     SoSFInt32           whichChild
92          Index  of  the  child  to  traverse,  or  one   of   SO_SWITCH_NONE,
93          SO_SWITCH_INHERIT, or SO_SWITCH_ALL.
94
95

METHODS

97                         SoSwitch()
98          Creates a switch node with default settings.
99
100                         SoSwitch(int nChildren)
101          Constructor that takes approximate number of children.
102
103     static SoType       getClassTypeId()
104          Returns type identifier for this class.
105
106

ACTION BEHAVIOR

108       SoGLRenderAction,  SoCallbackAction,  SoGetBoundingBoxAction,  SoGetMa‐
109       trixAction, SoHandleEventAction, SoRayPickAction
110          Traverses the chosen child or children.
111
112     SoSearchAction
113          If the action's Searching-All flag  is  set,  always  traverses  all
114          children. Otherwise, traverses just the chosen child or children.
115
116

FILE FORMAT/DEFAULTS

118       Switch {
119          whichChild  -1
120     }
121

SEE ALSO

123       SoArray, SoLevelOfDetail, SoMultipleCopy, SoPathSwitch
124
125
126
127
128                                                               SoSwitch(3IV)()
Impressum