Coin3D is Free Software, published under the BSD 3-clause license. |
https://bitbucket.org/Coin3D/ http://www.kongsberg.com/kogt/ |
The SoReplacedElement class is an abstract element superclass. More...
#include <Inventor/elements/SoReplacedElement.h>
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 |
Public Member Functions inherited from SoElement | |
const SoType | getTypeId (void) const |
int | getStackIndex (void) const |
virtual void | push (SoState *state) |
virtual void | pop (SoState *state, const SoElement *prevTopElement) |
void | setDepth (const int depth) |
int | getDepth (void) const |
virtual | ~SoElement () |
Static Public Member Functions | |
static SoType | getClassTypeId (void) |
static int | getClassStackIndex (void) |
static void | initClass (void) |
Static Public Member Functions inherited from SoElement | |
static void | initClass (void) |
static SoType | getClassTypeId (void) |
static int | getClassStackIndex (void) |
static void | initElements (void) |
static int | getNumStackIndices (void) |
static SoType | getIdFromStackIndex (const int stackIndex) |
Protected Member Functions | |
virtual | ~SoReplacedElement () |
Protected Member Functions inherited from SoElement | |
SoElement (void) | |
void | capture (SoState *const state) const |
virtual void | captureThis (SoState *state) const |
void | setTypeId (const SoType typeId) |
void | setStackIndex (const int index) |
SoElement * | getNextInStack (void) const |
SoElement * | getNextFree (void) const |
Static Protected Member Functions | |
static SoElement * | getElement (SoState *const state, const int stackIndex, SoNode *const node) |
Static Protected Member Functions inherited from SoElement | |
static SoElement * | getElement (SoState *const state, const int stackIndex) |
static const SoElement * | getConstElement (SoState *const state, const int stackIndex) |
static int | createStackIndex (const SoType id) |
Protected Attributes | |
SbUniqueId | nodeId |
Protected Attributes inherited from SoElement | |
SoType | typeId |
int | stackIndex |
int | depth |
Additional Inherited Members | |
Static Protected Attributes inherited from SoElement | |
static int | classStackIndex |
static SoTypeList * | stackToType |
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 scenegraph 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 scenegraph caches.
|
protectedvirtual |
Destructor.
|
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 SoEnvironmentElement, SoProfileCoordinateElement, SoPolygonOffsetElement, SoBumpMapElement, SoGeoElement, SoDiffuseColorElement, SoAmbientColorElement, SoCoordinateElement, SoEmissiveColorElement, SoGLColorIndexElement, SoNormalElement, SoSpecularColorElement, SoBumpMapCoordinateElement, SoFontNameElement, SoLightAttenuationElement, SoListenerDopplerElement, SoListenerOrientationElement, SoListenerPositionElement, SoProjectionMatrixElement, SoTransparencyElement, SoViewVolumeElement, SoViewingMatrixElement, SoGLEnvironmentElement, SoGLNormalElement, SoGLPolygonOffsetElement, SoGLShaderProgramElement, SoGLViewingMatrixElement, SoShininessElement, and SoSoundElement.
|
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 SoGLShaderProgramElement, SoFontNameElement, and SoLightAttenuationElement.
|
virtual |
This function creates a copy of the element that contains enough information to enable the matches() function to work.
Used to help with scenegraph traversal caching operations.
Implements SoElement.
Reimplemented in SoGLShaderProgramElement, SoFontNameElement, and SoLightAttenuationElement.
SbUniqueId SoReplacedElement::getNodeId | ( | void | ) | const |
Returns the node identifier for the node that previously updated the SoReplacedElement.
|
virtual |
This function is for printing element information, and is used mostly for debugging purposes.
Reimplemented from SoElement.
Reimplemented in SoEnvironmentElement, SoSoundElement, SoCoordinateElement, SoFontNameElement, SoLightAttenuationElement, SoListenerDopplerElement, SoListenerOrientationElement, and SoListenerPositionElement.
|
staticprotected |
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 scenegraph 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 scenegraph caches.
|
protected |
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.