Open Inventor 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>
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 SoElement * | copyMatchInfo () 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 SoElement * | getElement (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 |
(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.
virtual SoReplacedElement::~SoReplacedElement | ( | ) | [protected, virtual] |
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 void SoReplacedElement::init | ( | SoState * | state | ) | [virtual] |
Reimplemented from SoElement.
Reimplemented in SoCoordinateElement, SoFontNameElement, SoGLMaterialIndexElement, SoGLNormalElement, SoGLTextureCoordinateElement, SoGLTextureImageElement, SoGLViewingMatrixElement, SoLightAttenuationElement, SoNormalElement, SoProfileCoordinateElement, SoProjectionMatrixElement, SoTextureCoordinateElement, SoTextureImageElement, SoViewingMatrixElement, SoViewVolumeElement, SoGLPolygonOffsetElement, and SoPolygonOffsetElement.
static void SoReplacedElement::initClass | ( | ) | [static] |
Reimplemented from SoElement.
Reimplemented in SoCoordinateElement, SoFontNameElement, SoGLCoordinateElement, SoGLMaterialIndexElement, SoGLNormalElement, SoGLProjectionMatrixElement, SoGLTextureCoordinateElement, SoGLTextureImageElement, SoGLViewingMatrixElement, SoLightAttenuationElement, SoNormalElement, SoProfileCoordinateElement, SoProjectionMatrixElement, SoTextureCoordinateElement, SoTextureImageElement, SoViewingMatrixElement, SoViewVolumeElement, SoGLPolygonOffsetElement, and SoPolygonOffsetElement.
Implements SoElement.
Reimplemented in SoFontNameElement, SoGLMaterialIndexElement, and SoLightAttenuationElement.
virtual void SoReplacedElement::print | ( | FILE * | fp | ) | const [virtual] |
Reimplemented from SoElement.
Reimplemented in SoCoordinateElement, SoFontNameElement, SoGLMaterialIndexElement, SoLightAttenuationElement, SoNormalElement, SoProfileCoordinateElement, SoProjectionMatrixElement, SoTextureCoordinateElement, SoTextureImageElement, SoViewingMatrixElement, and SoViewVolumeElement.
uint32_t SoReplacedElement::nodeId [protected] |
Definition at line 110 of file SoReplacedElement.h.