SoReplacedElement(3)
π NAME π
SoReplacedElement β it's the abstract element superclass, bestie. That's the whole name, no notes. (This is the page for SoReplacedElement(3) from the Library Functions Manual, mwah π)
β¨ SYNOPSIS β¨
#include <Inventor/elements/SoReplacedElement.h>
Inherits SoElement.
Inherited by SoGLColorIndexElement, SoListenerDopplerElement, SoListenerOrientationElement, and SoListenerPositionElement. Not me having a whole little family tree π«Ά
πΈ Public Member Functions πΈ
virtual void init (SoState *state)
virtual SbBool matches (const SoElement *element) const
virtual SoElement * copyMatchInfo () const
uint32_t 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 π
uint32_t 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
π Detailed Description π
SoReplacedElement is the abstract element superclass. Periodt.
It's the superclass of all the 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. Like, it's giving "big girl data storage" energy, not "one lil number" energy, yk?
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. Iconic behaviour honestly.
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. No cap, this is the load-bearing part π₯
π See also
SoAccumulatedElement
π Constructor & Destructor Documentation π
SoReplacedElement::~SoReplacedElement (void ) [protected], [virtual]
Destructor. It destructs. Slay π (it's protected, so bestie, you can't just call it from anywhere, iykyk)
π Member Function Documentation π
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. First one in gets the glow-up β¨
Reimplemented from SoElement.
Reimplemented in SoGLColorIndexElement, SoListenerDopplerElement, SoListenerOrientationElement, and SoListenerPositionElement.
References SoElement::init(), and nodeId.
Referenced by SoListenerDopplerElement::init(), SoListenerOrientationElement::init(), and SoListenerPositionElement::init().
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. (Yes, the original says "is", we're keeping it, it's part of the charm π)
If the application programmer's extension element has a matches() function, it should also have a copyMatchInfo() function. They're a package deal, like us π«Ά
Implements SoElement.
References nodeId, and SoElement::SoElement().
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. It's literally handing matches() its homework answers.
Used to help with scenegraph traversal caching operations.
Implements SoElement.
References SoElement::getTypeId(), and nodeId.
uint32_t SoReplacedElement::getNodeId (void ) const
Returns the node identifier for the node that previously updated the SoReplacedElement. Like a little name tag for whoever touched it last π·οΈ
References nodeId.
void SoReplacedElement::print (FILE * file) const [virtual]
This function is for printing element information, and is used mostly for debugging purposes. It's the "wait let me see what's going on in here" function.
Reimplemented from SoElement.
Reimplemented in SoListenerDopplerElement, SoListenerOrientationElement, and SoListenerPositionElement.
References SoType::getName(), SbName::getString(), and SoElement::getTypeId().
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. Extra arg, extra power π
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. (Yes it says it again. It's important. Let it cook.)
π See also
SoElement::getElement()
References SoElement::getElement(), SoNode::getNodeId(), nodeId, and SoElement::stackIndex.
πΈ 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. So likeβ¦ bestie, don't touch, it's not for you, it's for the library's own business π
Referenced by copyMatchInfo(), getElement(), getNodeId(), init(), and matches().
π Author π
Generated automatically by Doxygen for Coin from the source code. (Not a human, just a lil robot doing its best π«Ά)
Okay that's the whole page, you ate that fr fr. Go forth and write your own replaced elements, main character.
This has been SoReplacedElement(3) from the Library Functions Manual, brought to you by Coin, Version 2.5.0 β that's the source and the version, bestie, sign-off complete, mwah πβ¨π
π¦ where this page comes from
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms