SoIndexedPointSet

Langue: en

Autres versions - même langue

Version: 349389 (ubuntu - 24/10/10)

Section: 3 (Bibliothèques de fonctions)

Sommaire

NAME

SoIndexedPointSet -

The SoIndexedPointSet class is used to display a set of 3D points.

This node either uses the coordinates currently on the state (typically set up by a leading SoCoordinate3 node in the scenegraph) or from a SoVertexProperty node attached to this node to render a set of 3D points.

SYNOPSIS


#include <Inventor/nodes/SoIndexedPointSet.h>

Inherits SoIndexedShape.

Inherited by SoIndexedMarkerSet.

Public Member Functions


SoIndexedPointSet (void)

virtual void GLRender (SoGLRenderAction *action)

virtual void getBoundingBox (SoGetBoundingBoxAction *action)

virtual void getPrimitiveCount (SoGetPrimitiveCountAction *action)

virtual void notify (SoNotList *list)

Static Public Member Functions


static void initClass (void)

Protected Types


enum Binding { OVERALL, PER_VERTEX, PER_VERTEX_INDEXED }

Protected Member Functions


virtual ~SoIndexedPointSet ()

virtual void generatePrimitives (SoAction *action)

virtual SbBool generateDefaultNormals (SoState *, SoNormalCache *nc)

virtual SbBool generateDefaultNormals (SoState *state, SoNormalBundle *bundle)

Binding findNormalBinding (SoState *const state) const

Binding findMaterialBinding (SoState *const state) const

Binding findTextureBinding (SoState *const state) const

Protected Attributes


SoVertexArrayIndexer * vaindexer

Detailed Description

The SoIndexedPointSet class is used to display a set of 3D points.

This node either uses the coordinates currently on the state (typically set up by a leading SoCoordinate3 node in the scenegraph) or from a SoVertexProperty node attached to this node to render a set of 3D points.

Here's a simple usage example of SoIndexedPointSet in a scenegraph:

 
   #Inventor V2.1 ascii
 
   Separator {
      Material {
         diffuseColor [
          1 0 0, 0 1 0, 0 0 1, 1 1 0, 1 0 1, 1 1 1, 1 0.8 0.6, 0.6 0.8 1
         ]
      }
      MaterialBinding { value PER_VERTEX_INDEXED }
 
      Normal {
         vector [
          0 0 1, 1 0 0
         ]
      }
      NormalBinding { value PER_VERTEX_INDEXED }
 
      Coordinate3 {
         point [
          -1 1 0, -1 -1 0, 1 -1 0, 1 1 0, 0 2 -1, -2 0 -1, 0 -2 -1, 2 0 -1
         ]
      }
 
      DrawStyle { pointSize 5 }
 
      IndexedPointSet { 
         coordIndex [0, 1, 2, 3, 4, 5, 6, 7]
         normalIndex [0, 1, 0, 1, 0, 1, 0, 1]
      }
   }
 
   .fi
 
 
 FILE FORMAT/DEFAULTS: 
 
   IndexedPointSet { 
     vertexProperty      NULL 
     coordIndex  0 
     materialIndex       -1 
     normalIndex         -1 
     textureCoordIndex   -1 
   }
 
 

Since:

TGS Inventor 6.0, Coin 3.1

Constructor & Destructor Documentation

SoIndexedPointSet::SoIndexedPointSet (void)Constructor.

SoIndexedPointSet::~SoIndexedPointSet () [protected, virtual]Destructor.

Member Function Documentation

void SoIndexedPointSet::initClass (void) [static]Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system.

Reimplemented from SoIndexedShape.

Reimplemented in SoIndexedMarkerSet.

void SoIndexedPointSet::GLRender (SoGLRenderAction * action) [virtual]Action method for the SoGLRenderAction.

This is called during rendering traversals. Nodes influencing the rendering state in any way or who wants to throw geometry primitives at OpenGL overrides this method.

Reimplemented from SoShape.

Reimplemented in SoIndexedMarkerSet.

void SoIndexedPointSet::getBoundingBox (SoGetBoundingBoxAction * action) [virtual]Action method for the SoGetBoundingBoxAction.

Calculates bounding box and center coordinates for node and modifies the values of the action to encompass the bounding box for this node and to shift the center point for the scene more towards the one for this node.

Nodes influencing how geometry nodes calculates their bounding box also overrides this method to change the relevant state variables.

Reimplemented from SoShape.

void SoIndexedPointSet::getPrimitiveCount (SoGetPrimitiveCountAction * action) [virtual]Action method for the SoGetPrimitiveCountAction.

Calculates the number of triangle, line segment and point primitives for the node and adds these to the counters of the action.

Nodes influencing how geometry nodes calculates their primitive count also overrides this method to change the relevant state variables.

Reimplemented from SoShape.

void SoIndexedPointSet::notify (SoNotList * l) [virtual]Notifies all auditors for this instance when changes are made.

Reimplemented from SoVertexShape.

Reimplemented in SoIndexedMarkerSet.

void SoIndexedPointSet::generatePrimitives (SoAction * action) [protected, virtual]The method implements action behavior for shape nodes for SoCallbackAction. It is invoked from SoShape::callback(). (Subclasses should not override SoNode::callback().)

The subclass implementations uses the convenience methods SoShape::beginShape(), SoShape::shapeVertex(), and SoShape::endShape(), with SoDetail instances, to pass the primitives making up the shape back to the caller.

Implements SoShape.

SbBool SoIndexedPointSet::generateDefaultNormals (SoState * state, SoNormalCache * cache) [protected, virtual]This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.

Subclasses should override this method to generate default normals using the SoNormalCache class. This is more effective than using SoNormalGenerator. Return TRUE if normals were generated, FALSE otherwise.

Default method just returns FALSE.

This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API.

Reimplemented from SoVertexShape.

SbBool SoIndexedPointSet::generateDefaultNormals (SoState * state, SoNormalBundle * bundle) [protected, virtual]This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.

Subclasses should override this method to generate default normals using the SoNormalBundle class. TRUE should be returned if normals were generated, FALSE otherwise.

Default method returns FALSE.

This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API.

Reimplemented from SoVertexShape.

Author

Generated automatically by Doxygen for Coin from the source code.