Open Inventor Reference
|
Indexed polygonal face shape node. More...
#include <Inventor/nodes/SoIndexedFaceSet.h>
Public Types | |
enum | Binding { OVERALL, PER_FACE, PER_FACE_INDEXED, PER_VERTEX, PER_VERTEX_INDEXED } |
This enum is used to indicate the current material or normal binding. More... | |
typedef void(SoIndexedFaceSet::* | PMFS )(SoGLRenderAction *) |
Typedef of pointer to method on IndexedFaceSet; This will be used to simplify declaration and initialization. | |
Public Member Functions | |
SoIndexedFaceSet () | |
Creates an indexed face set node with default settings. | |
virtual void | GLRender (SoGLRenderAction *action) |
Implements actions. | |
virtual SbBool | generateDefaultNormals (SoState *state, SoNormalBundle *nb) |
Generates default normals using the given normal bundle. | |
Static Public Member Functions | |
static void | initClass () |
Initializes base node class. | |
Protected Member Functions | |
virtual void | generatePrimitives (SoAction *action) |
Generates triangles representing faces. | |
virtual SoDetail * | createTriangleDetail (SoRayPickAction *action, const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2, const SoPrimitiveVertex *v3, SoPickedPoint *pp) |
Overrides standard method to create an SoFaceDetail instance. | |
~SoIndexedFaceSet () |
This node represents a 3D shape formed by constructing faces (polygons) from vertices located at the coordinates specified in the vertexProperty field (from SoVertexShape), or the current inherited state. For optimal performance, the vertexProperty field is recommended.
SoIndexedFaceSet uses the indices in the coordIndex field (from SoIndexedShape) to specify the polygonal faces. An index of SO_END_FACE_INDEX
(-1) indicates that the current face has ended and the next one begins. For improved performance, arrange all the faces with only 3 vertices at beginning of the list, then all faces with 4 vertices, and finally all other faces.
The vertices of the faces are transformed by the current transformation matrix. The faces are drawn with the current light model and drawing style.
Treatment of the current material and normal binding is as follows: The PER_PART
and PER_FACE
bindings specify a material or normal for each face. PER_VERTEX
specifies a material or normal for each vertex. The corresponding _INDEXED
bindings are the same, but use the materialIndex or normalIndex indices (see SoIndexedShape). The default material binding is OVERALL
. The default normal binding is PER_VERTEX_INDEXED
.
If any normals (or materials) are specified, Inventor assumes you provide the correct number of them, as indicated by the binding. You will see unexpected results if you specify fewer normals (or materials) than the shape requires. If no normals are specified, they will be generated automatically.
Textures are applied as described for the SoIndexedShape class.
IndexedFaceSet { coordIndex 0 materialIndex -1 normalIndex -1 textureCoordIndex -1 }
Definition at line 149 of file SoIndexedFaceSet.h.
typedef void(SoIndexedFaceSet::* SoIndexedFaceSet::PMFS)(SoGLRenderAction *) |
Definition at line 169 of file SoIndexedFaceSet.h.
Definition at line 175 of file SoIndexedFaceSet.h.
SoIndexedFaceSet::SoIndexedFaceSet | ( | ) |
SoIndexedFaceSet::~SoIndexedFaceSet | ( | ) | [protected] |
virtual SoDetail* SoIndexedFaceSet::createTriangleDetail | ( | SoRayPickAction * | action, |
const SoPrimitiveVertex * | v1, | ||
const SoPrimitiveVertex * | v2, | ||
const SoPrimitiveVertex * | v3, | ||
SoPickedPoint * | pp | ||
) | [protected, virtual] |
Reimplemented from SoShape.
virtual SbBool SoIndexedFaceSet::generateDefaultNormals | ( | SoState * | state, |
SoNormalBundle * | nb | ||
) | [virtual] |
Returns TRUE.
Reimplemented from SoVertexShape.
virtual void SoIndexedFaceSet::generatePrimitives | ( | SoAction * | action | ) | [protected, virtual] |
Implements SoShape.
virtual void SoIndexedFaceSet::GLRender | ( | SoGLRenderAction * | action | ) | [virtual] |
Reimplemented from SoShape.
static void SoIndexedFaceSet::initClass | ( | ) | [static] |
Reimplemented from SoIndexedShape.