1SoArray(3IV)()                                                  SoArray(3IV)()
2
3
4

NAME

6       SoArray  —  group  node that creates a regular IxJxK array of copies of
7       its children
8

INHERITS FROM

10       SoBase > SoFieldContainer > SoNode > SoGroup > SoArray
11

SYNOPSIS

13       #include <Inventor/nodes/SoArray.h>
14
15     enum Origin {
16          SoArray::FIRST      First copy is rendered at the current local ori‐
17                                   gin; all other copies are distributed rela‐
18                                   tive to it
19          SoArray::CENTER     Copies are distributed relative to the center of
20                                   the array
21          SoArray::LAST       Last  copy is rendered at the current local ori‐
22                                   gin; all other copies are distributed rela‐
23                                   tive to it
24     }
25
26          Fields from class SoArray:
27
28     SoSFShort           numElements1
29     SoSFShort           numElements2
30     SoSFShort           numElements3
31     SoSFVec3f           separation1
32     SoSFVec3f           separation2
33     SoSFVec3f           separation3
34     SoSFEnum            origin
35
36          Methods from class SoArray:
37
38                         SoArray()
39     static SoType       getClassTypeId()
40
41          Methods from class SoGroup:
42
43     void                addChild(SoNode *child)
44     void                insertChild(SoNode *child, int newChildIndex)
45     SoNode *            getChild(int index) const
46     int                 findChild(const SoNode *child) const
47     int                 getNumChildren() const
48     void                removeChild(int index)
49     void                removeChild(SoNode *child)
50     void                removeAllChildren()
51     void                replaceChild(int index, SoNode *newChild)
52     void                replaceChild(SoNode *oldChild, SoNode *newChild)
53
54          Methods from class SoNode:
55
56     void                setOverride(SbBool state)
57     SbBool              isOverride() const
58     SoNode *            copy(SbBool copyConnections = FALSE) const
59     virtual SbBool      affectsState() const
60     static SoNode *     getByName(const SbName &name)
61     static int          getByName(const SbName &name, SoNodeList &list)
62
63          Methods from class SoFieldContainer:
64
65     void                setToDefaults()
66     SbBool              hasDefaultValues() const
67     SbBool              fieldsAreEqual(const SoFieldContainer *fc) const
68     void                copyFieldValues(const  SoFieldContainer  *fc,  SbBool
69                              copyConnections = FALSE)
70     SbBool              set(const char *fieldDataString)
71     void                get(SbString &fieldDataString)
72     virtual int         getFields(SoFieldList &resultList) const
73     virtual SoField *   getField(const SbName &fieldName) const
74     SbBool              getFieldName(const SoField *field, SbName &fieldName)
75                              const
76     SbBool              isNotifyEnabled() const
77     SbBool              enableNotify(SbBool flag)
78
79          Methods from class SoBase:
80
81     void                ref()
82     void                unref() const
83     void                unrefNoDelete() const
84     void                touch()
85     virtual SoType      getTypeId() const
86     SbBool              isOfType(SoType type) const
87     virtual void        setName(const SbName &name)
88     virtual SbName      getName() const
89
90

DESCRIPTION

92       This group node traverses its children, in order, several times, creat‐
93       ing a regular 3D array of copies of them. The number of copies in  each
94       of the three directions is specified by fields, as are the vectors used
95       to separate the copies in each of the three dimensions.
96
97       For example, an SoArray node can be used to create  a  2x3x4  array  of
98       copies  of  its children, where the separation vectors between adjacent
99       copies in the three  array  dimensions  are  (1,2,3),  (-4,-5,-6),  and
100       (7,8,9), respectively. The base point of the array can be set to one of
101       several values, as described in the origin field.
102
103       Copies are traversed so that the first dimension cycles  most  quickly,
104       followed  by  the  second,  and then the third. This order is important
105       because SoArray sets the current switch value to  N  before  traversing
106       the  children  for the Nth time (for use with inherited switch values -
107       see SoSwitch).
108

FIELDS

110     SoSFShort           numElements1
111     SoSFShort           numElements2
112     SoSFShort           numElements3
113          Number of elements in each of the three array dimensions.
114
115     SoSFVec3f           separation1
116     SoSFVec3f           separation2
117     SoSFVec3f           separation3
118          Separation vector in each of the three array dimensions.
119
120     SoSFEnum            origin
121          Defines the base point from which copies are distributed.
122
123

METHODS

125                         SoArray()
126          Creates an array node with default settings.
127
128     static SoType       getClassTypeId()
129          Returns type identifier for this class.
130
131

ACTION BEHAVIOR

133       SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction,  SoRayPick‐
134       Action
135          Traverses  all children for each array element, saving and restoring
136          state before and after each traversal.
137
138     SoSearchAction
139          Traverses all children once, setting the inherited switch  value  to
140          SO_SWITCH_ALL first.
141
142

FILE FORMAT/DEFAULTS

144       Array {
145          numElements1  1
146          numElements2  1
147          numElements3  1
148          separation1   1 0 0
149          separation2   0 1 0
150          separation3   0 0 1
151          origin        FIRST
152     }
153

SEE ALSO

155       SoMultipleCopy, SoSwitch
156
157
158
159
160                                                                SoArray(3IV)()
Impressum