Open Inventor Reference
SoReplacedElement Class Reference

This is the abstract base class for each state element whose value is replaced whenever it is set. More...

#include <Inventor/elements/SoReplacedElement.h>

Inheritance diagram for SoReplacedElement:
SoElement SoCoordinateElement SoFontNameElement SoGLMaterialIndexElement SoLightAttenuationElement SoNormalElement SoPolygonOffsetElement SoProfileCoordinateElement SoProjectionMatrixElement SoTextureCoordinateElement SoTextureImageElement SoViewingMatrixElement SoViewVolumeElement

List of all members.

Public Member Functions

virtual void init (SoState *state)
 Initializes node id in element.
virtual SbBool matches (const SoElement *elt) const
 Returns TRUE if the element matches another element, based on node-id.
virtual void print (FILE *fp) const
 Prints element (for debugging)
virtual SoElementcopyMatchInfo () const
 Create and return a copy of this element.
uint32_t getNodeId () const
 Return nodeId.

Static Public Member Functions

static void initClass ()
 Initializes the SoReplacedElement class.

Protected Member Functions

virtual ~SoReplacedElement ()
 Destructor.

Static Protected Member Functions

static SoElementgetElement (SoState *state, int stackIndex, SoNode *node)
 Overrides SoElement::getElement() to set the nodeId in the element instance before returning it.

Protected Attributes

uint32_t nodeId

Detailed Description

(Most state elements fall into this category, so most are derived from this class.)

This class overrides the SoElement::getElement() method to store the node-id of the node that is about to set the value in the element (i.e., the node that is passed to getElement()). This class also defines the SoElement::matches() method to return TRUE if the node-id's of the two elements match. Subclasses can change this behavior by defining matches() differently, if they wish. For example, they can compare the elements' values, instead.

Definition at line 82 of file SoReplacedElement.h.


Constructor & Destructor Documentation

virtual SoReplacedElement::~SoReplacedElement ( ) [protected, virtual]

Member Function Documentation

virtual SoElement* SoReplacedElement::copyMatchInfo ( ) const [virtual]

The only operation supported by the copy is matches() (the copy will be unitialized except for the nodeId).

Implements SoElement.

Reimplemented in SoFontNameElement, SoGLMaterialIndexElement, and SoLightAttenuationElement.

static SoElement* SoReplacedElement::getElement ( SoState state,
int  stackIndex,
SoNode node 
) [static, protected]
uint32_t SoReplacedElement::getNodeId ( ) const [inline]

This was added so the SoTransformSeparator class can figure out whether or not it contains a camera:

Definition at line 107 of file SoReplacedElement.h.

virtual SbBool SoReplacedElement::matches ( const SoElement elt) const [virtual]

Member Data Documentation

Definition at line 110 of file SoReplacedElement.h.


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