1SoVertexProperty(3IV)()                                SoVertexProperty(3IV)()
2
3
4

NAME

6       SoVertexProperty — vertex property node
7

INHERITS FROM

9       SoBase > SoFieldContainer > SoNode > SoVertexProperty
10

SYNOPSIS

12       #include <Inventor/nodes/SoVertexProperty.h>
13
14     enum Binding {
15          SoVertexProperty::OVERALL   Whole object has same material/normal
16          SoVertexProperty::PER_PART  One  material/normal  for  each  part of
17                                           object
18          SoVertexProperty::PER_PART_INDEXED
19                                      One  material/normal  for   each   part,
20                                           indexed
21          SoVertexProperty::PER_FACE  One  material/normal  for  each  face of
22                                           object
23          SoVertexProperty::PER_FACE_INDEXED
24                                      One  material/normal  for   each   face,
25                                           indexed
26          SoVertexProperty::PER_VERTEX
27                                      One  material/normal  for each vertex of
28                                           object
29          SoVertexProperty::PER_VERTEX_INDEXED
30                                      One  material/normal  for  each  vertex,
31                                           indexed
32     }
33
34          Fields from class SoVertexProperty:
35
36     SoMFVec3f           vertex
37     SoMFVec3f           normal
38     SoMFUInt32          orderedRGBA
39     SoMFVec2f           texCoord
40     SoSFEnum            normalBinding
41     SoSFEnum            materialBinding
42
43          Methods from class SoVertexProperty:
44
45                         SoVertexProperty()
46
47          Methods from class SoNode:
48
49     void                setOverride(SbBool state)
50     SbBool              isOverride() const
51     SoNode *            copy(SbBool copyConnections = FALSE) const
52     virtual SbBool      affectsState() const
53     static SoNode *     getByName(const SbName &name)
54     static int          getByName(const SbName &name, SoNodeList &list)
55     static SoType       getClassTypeId()
56
57          Methods from class SoFieldContainer:
58
59     void                setToDefaults()
60     SbBool              hasDefaultValues() const
61     SbBool              fieldsAreEqual(const SoFieldContainer *fc) const
62     void                copyFieldValues(const  SoFieldContainer  *fc,  SbBool
63                              copyConnections = FALSE)
64     SbBool              set(const char *fieldDataString)
65     void                get(SbString &fieldDataString)
66     virtual int         getFields(SoFieldList &resultList) const
67     virtual SoField *   getField(const SbName &fieldName) const
68     SbBool              getFieldName(const SoField *field, SbName &fieldName)
69                              const
70     SbBool              isNotifyEnabled() const
71     SbBool              enableNotify(SbBool flag)
72
73          Methods from class SoBase:
74
75     void                ref()
76     void                unref() const
77     void                unrefNoDelete() const
78     void                touch()
79     virtual SoType      getTypeId() const
80     SbBool              isOfType(SoType type) const
81     virtual void        setName(const SbName &name)
82     virtual SbName      getName() const
83
84

DESCRIPTION

86       This property node may be used to efficiently specify coordinates, nor‐
87       mals, texture coordinates, colors, transparency values, material  bind‐
88       ing  and  normal binding for vertex-based shapes, i.e., shapes of class
89       SoVertexShape. An SoVertexProperty node can be used as  a  child  of  a
90       group  node in a scene graph, in which case the properties it specifies
91       are inherited by subsequent shape nodes in the graph. It  can  also  be
92       directly  referenced  as the VertexProperty SoSFField of a vertex-based
93       shape, bypassing scene graph inheritance.
94
95       When directly referenced by a VertexProperty  SoSFField  of  a  vertex-
96       based  shape,  the  SoVertexProperty  node is the most efficient way of
97       specifying vertex-based shapes. Use of the directly referenced  SoVert‐
98       exProperty  node  results  in significantly faster scene rendering than
99       scene graph inheritance of vertex  properties,  provided  all  required
100       vertex properties are specified in the SoVertexProperty node.
101
102       Because  the  class  SoVertexProperty  is derived from SoNode, a vertex
103       property node can be inserted as a child node in a  scene  graph.  When
104       inserted  as a node in a scene graph, the SoVertexProperty node is tra‐
105       versed as any other property node and the properties it  specifies  are
106       inherited  by  subsequent  shape nodes in the scene graph. It specifies
107       the current material and normal bindings, and can be  used  to  specify
108       the  current  3D  coordinates, the current normals, the current texture
109       coordinates, the current diffuse colors, and  the  current  transparen‐
110       cies.
111
112       All  multiple-valued  fields in the SoVertexProperty node are optional.
113       If a field is not present (i.e.  if it has 0 values), then shapes  that
114       require the missing information are required to obtain it from the cur‐
115       rent traversal state. However, users are cautioned  that,  for  optimal
116       performance, the vertex property node should be referenced as the Vert‐
117       exProperty field of an SoVertexShape, and should specify in its  fields
118       all values required to render that shape.
119
120       The  various  fields  in a vertex property node can be used in place of
121       corresponding fields in other property nodes, as  follows:  The  vertex
122       field  contains  3D  coordinates, as in the point field of an SoCoordi‐
123       nate3 node. The normal field contains normal vectors, as in the  vector
124       field  of the SoNormal node. The orderedRGBA field contains packed col‐
125       ors in the hexadecimal format 0xrrggbbaa, where rr  is  the  red  value
126       (between  00  and  0xFF hex) gg is the green value (between 00 and 0xFF
127       hex) bb is the blue value (between 00 and 0xFF hex)  aa  is  the  alpha
128       value  (between  00 = transparent and 0xFF = opaque). The packed colors
129       are equivalent to an SoPackedColor node, and provide  values  for  both
130       diffuse  color  and transparency. The texCoord field replaces the point
131       field of the SoTextureCoordinate2 node.
132
133       If the transparency type  is  SoGLRenderAction::SCREEN_DOOR,  only  the
134       first  transparency  value will be used. With other transparency types,
135       multiple transparencies will be used.
136
137       The materialBinding field replaces the value field of  the  SoMaterial‐
138       Binding node. The materialBinding field in a directly referenced SoVer‐
139       texProperty node has no effect unless there is a  nonempty  orderedRGBA
140       field,  in  which case the material binding specifies the assignment of
141       diffuse colors and alpha values  to  the  shape.   The  materialBinding
142       field  can  take  as  value  any  of the material bindings supported by
143       Inventor.
144
145       The normalBinding field replaces the value field of the SoNormalBinding
146       node. The normalBinding field of a directly referenced SoVertexProperty
147       node has no effect unless there is a nonempty normal  field,  in  which
148       case  the  normal binding specifies the assignment of normal vectors to
149       the shape. The value of the normalBinding field can be any of the  nor‐
150       mal bindings supported by Inventor.
151

FIELDS

153     SoMFVec3f           vertex
154          vertex coordinate(s).
155
156     SoMFVec3f           normal
157          normal vector(s).
158
159     SoMFUInt32          orderedRGBA
160          packed color(s), including transparencies.
161
162     SoMFVec2f           texCoord
163          texture coordinate(s).
164
165     SoSFEnum            normalBinding
166          normal binding.
167
168     SoSFEnum            materialBinding
169          material binding.
170
171

METHODS

173                         SoVertexProperty()
174          Creates an SoVertexProperty node with default settings.
175
176

ACTION BEHAVIOR

178       SoGLRenderAction, SoCallbackAction, SoPickAction
179          When  traversed in a scene graph, sets coordinates, normals, texture
180          coordinates, diffuse colors, transparency, normal binding and  mate‐
181          rial  binding  in  current traversal state. If not traversed, has no
182          effect on current traversal state associated with action.  The  nor‐
183          malBinding  field has no effect if there are no normals. The materi‐
184          alBinding has no effect if there are no packed colors.
185
186     SoGetBoundingBoxAction
187          When traversed in a scene graph, sets coordinates in current traver‐
188          sal  state.  If  not  traversed,  has no effect on current traversal
189          state associated with action.
190
191

FILE FORMAT/DEFAULTS

193       VertexProperty {
194          vertex           [  ]
195          normal           [  ]
196          texCoord         [  ]
197          orderedRGBA      [  ]
198          materialBinding  OVERALL
199          normalBinding    PER_VERTEX_INDEXED
200     }
201

SEE ALSO

203       SoIndexedTriangleStripSet  SoIndexedFaceSet  SoIndexedLineSet  SoTrian‐
204       gleStripSet  SoLineSet  SoFaceSet  SoPointSet  SoQuadMesh SoVertexShape
205       SoIndexedShape SoNonindexedShape
206
207
208
209
210                                                       SoVertexProperty(3IV)()
Impressum