SoReplacedElement(3)

πŸ“¦ version 3.1.3, in fedora 43, fedora 44

πŸ’– SoReplacedElement πŸ’–

okay so bestie, we're reading the SoReplacedElement(3) page, straight out of the Library Functions Manual, and honestly? she's giving abstract-element-superclass realness. no cap. let's get into it 🫢


🌸 NAME 🌸

SoReplacedElement β€” the abstract element superclass. that's the whole name section, she's mysterious, she's abstract, she said "figure me out through my subclasses" πŸ’…


✨ SYNOPSIS ✨

#include <Inventor/elements/SoReplacedElement.h>

Inherits SoElement. (family tree matters, iykyk 🌳)

Inherited by SoAmbientColorElement, SoBumpMapCoordinateElement, , SoCoordinateElement, SoDiffuseColorElement, SoEmissiveColorElement, SoEnvironmentElement, SoFontNameElement, SoGLColorIndexElement, , SoGeoElement, SoLightAttenuationElement, SoListenerDopplerElement, SoListenerOrientationElement, SoListenerPositionElement, SoNormalElement, SoPolygonOffsetElement, SoProfileCoordinateElement, , SoShininessElement, SoSoundElement, SoSpecularColorElement, SoTextureCoordinateElement, and SoTextureImageElement. (yes the weird double commas are in the original, we do not touch the sacred text πŸ•―οΈ)

πŸ‘‘ 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 πŸ’œ

The SoReplacedElement class is an abstract element superclass. she's the blueprint, the blueprint's blueprint, we love her πŸŽ€

so like, this is the superclass of all the elements where the new element data replaces the old data β€” and where the data the element stores isn't just some little simple float or integer value. it's giving real data, not snack-sized data, you know? 😌

apart from that conceptual difference from her superclass, SoReplacedElement also overloads the default getElement() method so it can take a node reference too. that reference is what gets used to fetch the unique node identification number of the node that last changed the element. so the element literally remembers who changed it. main character behavior fr fr πŸ’…

and the way that node identifier values in the scenegraph get updated upon any kind of change to a node?? that's the whole reason this technique plays such an important role in the construction, validation and destruction of internal scenegraph caches. it's load-bearing, bestie πŸ—οΈβœ¨

See also

  • SoAccumulatedElement

πŸ› οΈ Constructor & Destructor Documentation πŸ› οΈ

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

Destructor. she's leaving the group chat, say bye πŸ₯²


πŸ“š Member Function Documentation πŸ“š

void SoReplacedElement::init (SoState * state) [virtual]

this one initializes the element type inside the given SoState. it gets called for the first element of each enabled element type in SoState objects. first one in, lights on, everyone else can arrive πŸ’‘

Reimplemented from SoElement.

Reimplemented in SoAmbientColorElement, SoBumpMapCoordinateElement, SoCoordinateElement, SoDiffuseColorElement, SoEmissiveColorElement, SoEnvironmentElement, SoFontNameElement, SoGeoElement, SoGLColorIndexElement, SoGLEnvironmentElement, SoGLNormalElement, SoGLPolygonOffsetElement, SoGLTextureCoordinateElement, SoGLTextureImageElement, SoGLViewingMatrixElement, SoLightAttenuationElement, SoListenerDopplerElement, SoListenerOrientationElement, SoListenerPositionElement, SoNormalElement, SoPolygonOffsetElement, SoProfileCoordinateElement, SoShininessElement, SoSoundElement, SoSpecularColorElement, SoTextureCoordinateElement, SoTextureImageElement, SoTransparencyElement, SoViewingMatrixElement, and SoViewVolumeElement. (that's a LOT of children, she's a proud mom πŸ˜­πŸ’–)

SbBool SoReplacedElement::matches (const SoElement * element) const [virtual]

returns TRUE if the element matches another element (of the same class) β€” specifically with respect to cache validity. it's the compatibility check, the vibe check, if you will ✨

heads up: if your application programmer's extension element has a matches() function, it should also have a copyMatchInfo() function. they're a package deal, no separating them 🫢

Implements SoElement.

Reimplemented in SoFontNameElement, and SoLightAttenuationElement.

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

this makes a copy of the element that carries enough information to let the matches() function actually do its job. it's like packing a little to-go bag so the comparison works later πŸŽ’

used to help with scenegraph traversal caching operations.

Implements SoElement.

Reimplemented in SoFontNameElement, and SoLightAttenuationElement.

uint32_t SoReplacedElement::getNodeId (void ) const

returns the node identifier for the node that previously updated the SoReplacedElement. receipts, basically 🧾

void SoReplacedElement::print (FILE * file) const [virtual]

this function is for printing element information, and it's used mostly for debugging purposes. it's the "wait, what is this element actually holding" function πŸ›πŸ”

Reimplemented from SoElement.

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

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

this overloads SoElement::getElement() with an extra node parameter, so we can set SoReplacedElement::nodeId on the element instance before returning it. sneak it in before the handoff, iconic 🀝

SoReplacedElement subclasses should use this method to get writable instances. yes, writable. go off ✍️

and again β€” the identifier values of nodes in the scenegraph get 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. (she really said "let me say it twice so you remember" πŸ˜­πŸ’€)

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. so like, bestie, respectfully, this one's not for you πŸ™ˆ (but we still documented it because completeness is the moment)

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for Coin from the source code. so nobody hand-wrote this, the machine did it, and the machine ate πŸ”₯


aaaand that's the whole page, bestie!! 🌈✨ this was Coin, Version 3.1.3, and you just read SoReplacedElement(3) all the way to the end β€” not me being proud of you or anything πŸ₯ΉπŸ’– mwah, go forth and replace some elements πŸ’…πŸŽ€

πŸ“¦ where this page comes from