Vertex property node. More...
#include <Inventor/nodes/SoVertexProperty.h>
Public Types | |
enum | Binding { OVERALL = SoMaterialBindingElement::OVERALL, PER_PART = SoMaterialBindingElement::PER_PART, PER_PART_INDEXED = SoMaterialBindingElement::PER_PART_INDEXED, PER_FACE = SoMaterialBindingElement::PER_FACE, PER_FACE_INDEXED = SoMaterialBindingElement::PER_FACE_INDEXED, PER_VERTEX = SoMaterialBindingElement::PER_VERTEX, PER_VERTEX_INDEXED = SoMaterialBindingElement::PER_VERTEX_INDEXED } |
Public Member Functions | |
virtual SoType | getTypeId () const |
SoVertexProperty () | |
virtual void | setOverride (const SbBool state) |
virtual SbBool | isOverride () const |
Static Public Member Functions | |
static SoType | getClassTypeId () |
Public Attributes | |
SoMFVec3f | vertex |
SoMFVec2f | texCoord |
SoMFVec3f | texCoord3 |
SoSFBool | forceSending |
SoMFVec3f | normal |
SoSFEnum | normalBinding |
SoMFUInt32 | orderedRGBA |
SoSFEnum | materialBinding |
Vertex property node.
This property node may be used to efficiently specify coordinates, normals, texture coordinates, colors, transparency values, material binding and normal binding for vertex-based shapes, i.e., shapes of class SoVertexShape. An SoVertexProperty node can be used as a child of a group node in a scene graph, in which case the properties it specifies are inherited by subsequent shape nodes in the graph. It can also be directly referenced as the VertexProperty SoSFField of a vertex-based shape, bypassing scene graph inheritance.
When directly referenced by a VertexProperty SoSFField of a vertex-based shape, the SoVertexProperty node is the most efficient way of specifying vertex-based shapes. Use of the directly referenced SoVertexProperty node results in significantly faster scene rendering than scene graph inheritance of vertex properties, provided all required vertex properties are specified in the SoVertexProperty node.
Because the class SoVertexProperty is derived from SoNode, a vertex property node can be inserted as a child node in a scene graph. When inserted as a node in a scene graph, the SoVertexProperty node is traversed as any other property node and the properties it specifies are inherited by subsequent shape nodes in the scene graph. It specifies the current material and normal bindings, and can be used to specify the current 3D coordinates, the current normals, the current texture coordinates, the current diffuse colors, and the current transparencies.
All multiple-valued fields in the SoVertexProperty node are optional. If a field is not present (i.e. if it has 0 values), then shapes that require the missing information are required to obtain it from the current traversal state. However, users are cautioned that, for optimal performance, the vertex property node should be referenced as the VertexProperty field of an SoVertexShape, and should specify in its fields all values required to render that shape.
Fields:
Color:
Transparency:
Material binding:
Normal binding:
vertex | [ ] |
normal | [ ] |
texCoord | [ ] |
texCoord3 | [ ] |
orderedRGBA | [ ] |
materialBinding | OVERALL |
normalBinding | PER_VERTEX_INDEXED |
forceSending | FALSE |
SoGetBoundingBoxAction
When traversed in a scene graph, sets coordinates in current traversal state. If not traversed, has no effect on current traversal state associated with action. Sets: SoCoordinateElement
SoIndexedTriangleStripSet, SoIndexedFaceSet, SoIndexedLineSet, SoTriangleStripSet, SoLineSet, SoFaceSet, SoPointSet, SoQuadMesh, SoVertexShape, SoIndexedShape, SoNonIndexedShape
Binding.
SoVertexProperty::SoVertexProperty | ( | ) |
Creates an SoVertexProperty node with default settings.
static SoType SoVertexProperty::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from SoNode.
virtual SoType SoVertexProperty::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from SoNode.
virtual SbBool SoVertexProperty::isOverride | ( | ) | const [inline, virtual] |
Returns the state of the override field.
Reimplemented from SoNode.
virtual void SoVertexProperty::setOverride | ( | const SbBool | state | ) | [inline, virtual] |
Forces the texture coordinates to be sent to OpenGL even if no texture is bound.
Material binding.
Use enum Binding. Default is OVERALL.
Normal vector(s).
Normal binding.
Use enum Binding. Default is PER_VERTEX_INDEXED.
Packed color(s), including transparencies.
2D texture coordinate(s).
3D texture coordinate(s).
Vertex coordinate(s).