Coin Logo http://www.sim.no/
http://www.coin3d.org/

SoIndexedPointSet Class Reference
[Node Classes]

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. More...

#include <Inventor/nodes/SoIndexedPointSet.h>

Inheritance diagram for SoIndexedPointSet:

SoIndexedShape SoVertexShape SoShape SoNode SoFieldContainer SoBase SoIndexedMarkerSet

List of all members.

Public Member Functions

virtual SoType getTypeId (void) const
 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 SoType getClassTypeId (void)
static void initClass (void)

Protected Types

enum  Binding { OVERALL, PER_VERTEX, PER_VERTEX_INDEXED }

Protected Member Functions

virtual const SoFieldDatagetFieldData (void) const
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

Static Protected Member Functions

static const SoFieldData ** getFieldDataPtr (void)

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]
     }
  }

  

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

SoType SoIndexedPointSet::getClassTypeId ( void   )  [static]

This static method returns the SoType object associated with objects of this class.

Reimplemented from SoIndexedShape.

Reimplemented in SoIndexedMarkerSet.

SoType SoIndexedPointSet::getTypeId ( void   )  const [virtual]

Returns the type identification of an object derived from a class inheriting SoBase. This is used for run-time type checking and "downward" casting.

Usage example:

  void foo(SoNode * node)
  {
    if (node->getTypeId() == SoFile::getClassTypeId()) {
      SoFile * filenode = (SoFile *)node;  // safe downward cast, knows the type
    }
  }

For application programmers wanting to extend the library with new nodes, engines, nodekits, draggers or others: this method needs to be overridden in all subclasses. This is typically done as part of setting up the full type system for extension classes, which is usually accomplished by using the pre-defined macros available through for instance Inventor/nodes/SoSubNode.h (SO_NODE_INIT_CLASS and SO_NODE_CONSTRUCTOR for node classes), Inventor/engines/SoSubEngine.h (for engine classes) and so on.

For more information on writing Coin extensions, see the class documentation of the toplevel superclasses for the various class groups.

Reimplemented from SoIndexedShape.

Reimplemented in SoIndexedMarkerSet.

const SoFieldData ** SoIndexedPointSet::getFieldDataPtr ( void   )  [static, protected]

This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.

Reimplemented from SoIndexedShape.

Reimplemented in SoIndexedMarkerSet.

const SoFieldData * SoIndexedPointSet::getFieldData ( void   )  const [protected, virtual]

Returns a pointer to the class-wide field data storage object for this instance. If no fields are present, returns NULL.

Reimplemented from SoIndexedShape.

Reimplemented in SoIndexedMarkerSet.

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.


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

Copyright © 1998-2009 by Kongsberg SIM. All rights reserved.

Generated on Mon Jun 15 11:58:35 2009 for Coin by Doxygen 1.5.9.