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

SoVRMLIndexedLineSet Class Reference
[VRML97 classes]

The SoVRMLIndexedLineSet class is used to represent a generic 3D line shape.

The detailed class documentation is taken verbatim from the VRML97 standard (ISO/IEC 14772-1:1997). It is copyright The Web3D Consortium, and is used by permission of the Consortium:. More...

#include <Inventor/VRMLnodes/SoVRMLIndexedLineSet.h>

Inheritance diagram for SoVRMLIndexedLineSet:

SoVRMLIndexedLine SoVRMLVertexLine SoVRMLGeometry SoShape SoNode SoFieldContainer SoBase

List of all members.

Public Member Functions

virtual SoType getTypeId (void) const
virtual void GLRender (SoGLRenderAction *action)
virtual void getPrimitiveCount (SoGetPrimitiveCountAction *action)
virtual void getBoundingBox (SoGetBoundingBoxAction *action)

Static Public Member Functions

static SoType getClassTypeId (void)
static void initClass (void)

Protected Member Functions

virtual const SoFieldDatagetFieldData (void) const
virtual void generatePrimitives (SoAction *action)

Static Protected Member Functions

static const SoFieldData ** getFieldDataPtr (void)


Detailed Description

The SoVRMLIndexedLineSet class is used to represent a generic 3D line shape.

The detailed class documentation is taken verbatim from the VRML97 standard (ISO/IEC 14772-1:1997). It is copyright The Web3D Consortium, and is used by permission of the Consortium:.

  IndexedLineSet {
    eventIn       MFInt32 set_colorIndex
    eventIn       MFInt32 set_coordIndex
    exposedField  SFNode  color             NULL
    exposedField  SFNode  coord             NULL
    field         MFInt32 colorIndex        []     # [-1, inf)
    field         SFBool  colorPerVertex    TRUE
    field         MFInt32 coordIndex        []     # [-1, inf)
  }
  

The IndexedLineSet node represents a 3D geometry formed by constructing polylines from 3D vertices specified in the coord field. IndexedLineSet uses the indices in its coordIndex field to specify the polylines by connecting vertices from the coord field. An index of "- 1" indicates that the current polyline has ended and the next one begins. The last polyline may be (but does not have to be) followed by a "- 1". IndexedLineSet is specified in the local coordinate system and is affected by the transformations of its ancestors.

The coord field specifies the 3D vertices of the line set and contains a Coordinate node. Lines are not lit, are not texture-mapped, and do not participate in collision detection. The width of lines is implementation dependent and each line segment is solid (i.e., not dashed). If the color field is not NULL, it shall contain a Color node. The colours are applied to the line(s) as follows:

If the color field is NULL and there is a Material defined for the Appearance affecting this IndexedLineSet, the emissiveColor of the Material shall be used to draw the lines. Details on lighting equations as they affect IndexedLineSet nodes are described in 4.14, Lighting model (<http://www.web3d.org/x3d/specifications/vrml/ISO-IEC-14772-VRML97/part1/concepts.html#4.14>).


Member Function Documentation

SoType SoVRMLIndexedLineSet::getClassTypeId ( void   )  [static]

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

Reimplemented from SoVRMLIndexedLine.

Referenced by SoReorganizeAction::apply().

SoType SoVRMLIndexedLineSet::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
    }
    else if (node->getTypeId().isOfType(SoGroup::getClassTypeId())) {
      SoGroup * group = (SoGroup *)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 SoVRMLIndexedLine.

const SoFieldData ** SoVRMLIndexedLineSet::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 SoVRMLIndexedLine.

const SoFieldData * SoVRMLIndexedLineSet::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 SoVRMLIndexedLine.

void SoVRMLIndexedLineSet::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 SoVRMLIndexedLine.

void SoVRMLIndexedLineSet::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 SoVRMLVertexLine.

References SoVRMLVertexLine::color, SoShape::finishVertexArray(), SoFieldContainer::get(), SoGLRenderAction::getCacheContext(), SoNode::getNodeId(), SoMField::getNum(), SbColor::getPackedValue(), SoAction::getState(), SoSFNode::getValue(), SoMFInt32::getValues(), SoState::pop(), SoState::push(), SoFieldContainer::set(), SoVRMLVertexLine::shouldGLRender(), and SoShape::startVertexArray().

void SoVRMLIndexedLineSet::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.

References SoGetPrimitiveCountAction::addNumLines(), SoGetPrimitiveCountAction::canApproximateCount(), SoMField::getNum(), SoMFInt32::getValues(), and SoShape::shouldPrimitiveCount().

void SoVRMLIndexedLineSet::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 SoVRMLVertexLine.

References SoVRMLVertexLine::getBoundingBox(), and SoAction::getState().

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


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

Copyright © 1998-2007 by Systems in Motion AS. All rights reserved.

Generated on Mon Feb 23 16:34:08 2009 for Coin by Doxygen. 1.5.8