SoReplacedElement(3)

NAME
SoReplacedElement - The SoReplacedElement class is an abstract element superclass.

SYNOPSIS

#include <Inventor/elements/SoReplacedElement.h>

Inherits SoElement.

Inherited by SoAmbientColorElement, SoBumpMapCoordinateElement, SoBumpMapElement, SoCoordinateElement, SoDiffuseColorElement, SoEmissiveColorElement, SoEnvironmentElement, SoFontNameElement, SoGeoElement, SoGLColorIndexElement, SoGLShaderProgramElement, SoLightAttenuationElement, SoListenerDopplerElement, SoListenerOrientationElement, SoListenerPositionElement, SoNormalElement, SoPolygonOffsetElement, SoProfileCoordinateElement, SoProjectionMatrixElement, SoShininessElement, SoSoundElement, SoSpecularColorElement, SoTransparencyElement, SoViewingMatrixElement, and SoViewVolumeElement.

  Public Member Functions
virtual void init (SoState *state)
virtual SbBool matches (const SoElement *element) const
virtual SoElement * copyMatchInfo () const
SbUniqueId getNodeId () const
virtual void print (FILE *file) const

  Static Public Member Functions
static SoType getClassTypeId (void)
static int getClassStackIndex (void)
static void initClass (void)

  Protected Member Functions
virtual ~SoReplacedElement ()

  Static Protected Member Functions
static SoElement * getElement (SoState *const state, const int stackIndex, SoNode *const node)

  Protected Attributes
SbUniqueId nodeId

  Additional Inherited Members

Detailed Description

The SoReplacedElement class is an abstract element superclass. This is the superclass of all elements where the new element data replaces the old data, and where the data the element stores is not just a simple float or integer value.

Apart from this conceptual difference from its superclass, the SoReplacedElement class also overloads the default getElement() method to include a node reference. This reference is used to fetch the unique node identification number of the node that last changed the element.

The identifier values of nodes in the scene graph is updated upon any kind of change to a node, so this technique plays an important role in the construction, validation and destruction of internal scene graph caches.

See also
    SoAccumulatedElement

Constructor & Destructor Documentation

  SoReplacedElement::~SoReplacedElement (void) [protected], [virtual]
Destructor.

Member Function Documentation

  SoType SoReplacedElement::getClassTypeId (void) [static]
This static method returns the SoType object associated with objects of this class.

  int SoReplacedElement::getClassStackIndex (void) [static]
This static method returns the state stack index for the class.

  void SoReplacedElement::initClass (void) [static]
Initialize relevant common data for all instances, like the type system.

  void SoReplacedElement::init (SoState * state) [virtual]
This function initializes the element type in the given SoState. It is called for the first element of each enabled element type in SoState objects.

Reimplemented from SoElement.

Reimplemented in SoViewVolumeElement, SoViewingMatrixElement, SoTransparencyElement, SoSpecularColorElement, SoSoundElement, SoShininessElement, SoProjectionMatrixElement, SoProfileCoordinateElement, SoPolygonOffsetElement, SoNormalElement, SoListenerPositionElement, SoListenerOrientationElement, SoListenerDopplerElement, SoLightAttenuationElement, SoGLViewingMatrixElement, SoGLShaderProgramElement, SoGLPolygonOffsetElement, SoGLNormalElement, SoGLEnvironmentElement, SoGLColorIndexElement, SoGeoElement, SoFontNameElement, SoEnvironmentElement, SoEmissiveColorElement, SoDiffuseColorElement, SoCoordinateElement, SoBumpMapElement, SoBumpMapCoordinateElement, and SoAmbientColorElement.

  SbBool SoReplacedElement::matches (const SoElement * element) const [virtual]
This function returns TRUE is the element matches another element (of the same class), with respect to cache validity.

If the application programmer's extension element has a matches() function, it should also have a copyMatchInfo() function.

Implements SoElement.

Reimplemented in SoLightAttenuationElement, SoGLShaderProgramElement, and SoFontNameElement.

  SoElement * SoReplacedElement::copyMatchInfo (void) const [virtual]
This function creates a copy of the element that contains enough information to enable the matches() function to work.

Used to help with scene graph traversal caching operations.

Implements SoElement.

Reimplemented in SoLightAttenuationElement, SoFontNameElement, and SoGLShaderProgramElement.

  SbUniqueId SoReplacedElement::getNodeId (void) const
Returns the node identifier for the node that previously updated the SoReplacedElement.

  void SoReplacedElement::print (FILE * file) const [virtual]
This function is for printing element information, and is used mostly for debugging purposes.

Reimplemented from SoElement.

Reimplemented in SoSoundElement, SoListenerPositionElement, SoListenerOrientationElement, SoListenerDopplerElement, SoLightAttenuationElement, SoFontNameElement, SoEnvironmentElement, and SoCoordinateElement.

  SoElement * SoReplacedElement::getElement (SoState *const state, const int stackIndex, SoNode *const node) [static], [protected]
This function overloads SoElement::getElement() with an extra node parameter, to let us set the SoReplacedElement::nodeId in the element instance before returning.

SoReplacedElement subclasses should use this method to get writable instances.

The identifier values of nodes in the scene graph is updated upon any kind of change to a node, so this technique plays an important role in the construction, validation and destruction of internal scene graph caches.

See also
    SoElement::getElement()

Member Data Documentation

  uint32_t SoReplacedElement::nodeId [protected]
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.

Author

Generated automatically by Doxygen for Coin from the source code.