1SoIndexedShape(3IV)() SoIndexedShape(3IV)()
2
3
4
6 SoIndexedShape — abstract base class for all indexed vertex-based
7 shapes
8
10 SoBase > SoFieldContainer > SoNode > SoShape > SoVertexShape > SoIn‐
11 dexedShape
12
14 #include <Inventor/nodes/SoIndexedShape.h>
15
16 Fields from class SoIndexedShape:
17
18 SoMFInt32 coordIndex
19 SoMFInt32 materialIndex
20 SoMFInt32 normalIndex
21 SoMFInt32 textureCoordIndex
22
23 Fields from class SoVertexShape:
24
25 SoSFNode vertexProperty
26
27 Methods from class SoIndexedShape:
28
29 static SoType getClassTypeId()
30
31 Methods from class SoNode:
32
33 void setOverride(SbBool state)
34 SbBool isOverride() const
35 SoNode * copy(SbBool copyConnections = FALSE) const
36 virtual SbBool affectsState() const
37 static SoNode * getByName(const SbName &name)
38 static int getByName(const SbName &name, SoNodeList &list)
39
40 Methods from class SoFieldContainer:
41
42 void setToDefaults()
43 SbBool hasDefaultValues() const
44 SbBool fieldsAreEqual(const SoFieldContainer *fc) const
45 void copyFieldValues(const SoFieldContainer *fc, SbBool
46 copyConnections = FALSE)
47 SbBool set(const char *fieldDataString)
48 void get(SbString &fieldDataString)
49 virtual int getFields(SoFieldList &resultList) const
50 virtual SoField * getField(const SbName &fieldName) const
51 SbBool getFieldName(const SoField *field, SbName &fieldName)
52 const
53 SbBool isNotifyEnabled() const
54 SbBool enableNotify(SbBool flag)
55
56 Methods from class SoBase:
57
58 void ref()
59 void unref() const
60 void unrefNoDelete() const
61 void touch()
62 virtual SoType getTypeId() const
63 SbBool isOfType(SoType type) const
64 virtual void setName(const SbName &name)
65 virtual SbName getName() const
66
67
69 This node is the abstract base class for all vertex-based shapes that
70 are constructed from indices, including SoIndexedFaceSet, SoIndexedTri‐
71 angleStripSet, and SoIndexedLineSet. SoIndexedShape defines fields that
72 are used in all of its subclasses.
73
74 All subclasses of SoNonIndexedShape construct objects by using the
75 coordinates specified by the vertexProperty field (from SoVertexShape),
76 or the current inherited coordinates. The coordIndex field defined by
77 this class contains the indices into the current coordinates of the
78 vertices of the shape. These indices are also used for materials, nor‐
79 mals, or texture coordinates when the appropriate binding is PER_VER‐
80 TEX_INDEXED.
81
82 Material and normal bindings are interpreted as follows for each sub‐
83 class:
84
85 OVERALL One material for the entire shape.
86 PER_PART Specific to the subclass.
87 PER_PART_INDEXED Same as PER_PART, using indices from the
88 materialIndex or normalIndex field.
89 PER_FACE Specific to the subclass.
90 PER_FACE_INDEXED Same as PER_FACE, using indices from the
91 materialIndex or normalIndex field.
92 PER_VERTEX One material per vertex.
93 PER_VERTEX_INDEXED One material per vertex, using indices from the
94 materialIndex or normalIndex field.
95
96
97
98 When any _INDEXED binding is used for materials or normals, the materi‐
99 alIndex or normalIndex field is used to determine the indices for the
100 materials or normals. If this field contains a single value of -1 (the
101 default), the coordinate indices from the coordIndex field are used as
102 well for materials or normals. When the binding is PER_VERTEX_INDEXED,
103 indices in these fields that correspond to negative indices in coordIndex
104 are skipped; for other index bindings all the values in the fields are
105 used, in order.
106
107 Explicit texture coordinates (as defined by SoTextureCoordinate2) may be
108 bound to vertices of an indexed shape consecutively (if the texture coor‐
109 dinate binding is PER_VERTEX) or by using the indices in the textureCo‐
110 ordIndex field (if the binding is PER_VERTEX_INDEXED). As with all ver‐
111 tex-based shapes, if there is a current texture but no texture coordi‐
112 nates are specified, a default texture coordinate mapping is calculated
113 using the bounding box of the shape.
114
115 Be sure that the indices contained in the coordIndex, materialIndex, nor‐
116 malIndex, and textureCoordIndex fields are valid with respect to the cur‐
117 rent state, or errors will occur.
118
120 SoMFInt32 coordIndex
121 The indices of the coordinates that the shape uses as its vertices.
122 The coordinates connect to form faces, lines, or other shapes. Each
123 subclass defines special negative indices to use to indicate separa‐
124 tion between faces, lines, and so on.
125
126 SoMFInt32 materialIndex
127 SoMFInt32 normalIndex
128 SoMFInt32 textureCoordIndex
129 The indices of the materials, normals, and texture coordinates that
130 are used for the shape. These fields are used only when the appro‐
131 priate binding is one of the _INDEXED bindings. By default, the val‐
132 ues of these fields indicate that the coordinate indices should be
133 used for materials, normals, or texture coordinates as well.
134
135
137 static SoType getClassTypeId()
138 Returns type identifier for this class.
139
140
142 This is an abstract class. See the reference page of a derived class
143 for the format and default values.
144
146 SoIndexedFaceSet, SoIndexedLineSet, SoIndexedTriangleStripSet, SoMate‐
147 rialBinding, SoNonIndexedShape, SoNormalBinding, SoShapeHints, SoTex‐
148 tureCoordinateBinding
149
150
151
152
153 SoIndexedShape(3IV)()