Open Inventor Reference
SoIndexedTriangleStripSet Class Reference

Indexed triangle strip set shape node. More...

#include <Inventor/nodes/SoIndexedTriangleStripSet.h>

Inheritance diagram for SoIndexedTriangleStripSet:
SoIndexedShape SoVertexShape SoShape SoNode SoFieldContainer SoBase

List of all members.

Public Types

enum  Binding {
  OVERALL, PER_STRIP, PER_STRIP_INDEXED, PER_TRIANGLE,
  PER_TRIANGLE_INDEXED, PER_VERTEX, PER_VERTEX_INDEXED
}
 This enum is used to indicate the current material or normal binding. More...
typedef void(SoIndexedTriangleStripSet::* PMTSS )(SoGLRenderAction *)
 Typedef of pointer to method on IndexedTriangleStripSet; This will be used to simplify declaration and initialization.

Public Member Functions

 SoIndexedTriangleStripSet ()
 Creates an indexed triangle strip 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 strips.
virtual SoDetailcreateTriangleDetail (SoRayPickAction *action, const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2, const SoPrimitiveVertex *v3, SoPickedPoint *pp)
 Overrides standard method to create an SoFaceDetail instance.
 ~SoIndexedTriangleStripSet ()

Detailed Description

This shape node constructs triangle strips out of vertices located at the coordinates specified in the vertexProperty field (from SoVertexShape), or the current inherited coordinates. For optimal performance, the vertexProperty field is recommended.

SoIndexedTriangleStripSet uses the indices in the coordIndex field (from SoIndexedShape) to specify the vertices of the triangle strips. An index of SO_END_STRIP_INDEX (-1) indicates that the current strip has ended and the next one begins.

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: PER_PART specifies a material or normal per strip. PER_FACE binding specifies a material or normal for each triangle. 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.

File Format/Default
IndexedTriangleStripSet {
  coordIndex 0
  materialIndex -1
  normalIndex -1
  textureCoordIndex -1
}
Action Behavior
SoGLRenderAction
Draws a strip set based on the current coordinates, normals, materials, drawing style, and so on.
SoRayPickAction
Picks on the strip set based on the current coordinates and transformation. Details about the intersection are returned in an SoFaceDetail.
SoGetBoundingBoxAction
Computes the bounding box that encloses all vertices of the strip set with the current transformation applied to them. Sets the center to the average of the coordinates of all vertices.
SoCallbackAction
If any triangle callbacks are registered with the action, they will be invoked for each successive triangle forming the strips of the set.
See Also
SoIndexedTriangleSet, SoCoordinate3, SoDrawStyle, SoFaceDetail, SoIndexedFaceSet, SoTriangleStripSet, SoVertexProperty

Definition at line 143 of file SoIndexedTriangleStripSet.h.


Member Typedef Documentation

typedef void(SoIndexedTriangleStripSet::* SoIndexedTriangleStripSet::PMTSS)(SoGLRenderAction *)

Definition at line 163 of file SoIndexedTriangleStripSet.h.


Member Enumeration Documentation

Enumerator:
OVERALL 
PER_STRIP 
PER_STRIP_INDEXED 
PER_TRIANGLE 
PER_TRIANGLE_INDEXED 
PER_VERTEX 
PER_VERTEX_INDEXED 

Definition at line 169 of file SoIndexedTriangleStripSet.h.


Constructor & Destructor Documentation

SoIndexedTriangleStripSet::SoIndexedTriangleStripSet ( )
SoIndexedTriangleStripSet::~SoIndexedTriangleStripSet ( ) [protected]

Member Function Documentation

virtual SoDetail* SoIndexedTriangleStripSet::createTriangleDetail ( SoRayPickAction action,
const SoPrimitiveVertex v1,
const SoPrimitiveVertex v2,
const SoPrimitiveVertex v3,
SoPickedPoint pp 
) [protected, virtual]

Reimplemented from SoShape.

virtual SbBool SoIndexedTriangleStripSet::generateDefaultNormals ( SoState state,
SoNormalBundle nb 
) [virtual]

Returns TRUE.

Reimplemented from SoVertexShape.

virtual void SoIndexedTriangleStripSet::generatePrimitives ( SoAction action) [protected, virtual]

Implements SoShape.

virtual void SoIndexedTriangleStripSet::GLRender ( SoGLRenderAction action) [virtual]

Reimplemented from SoShape.

static void SoIndexedTriangleStripSet::initClass ( ) [static]

Reimplemented from SoIndexedShape.


The documentation for this class was generated from the following file: