SoReplacedElement(3)
π 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 amatches()function, it should also have acopyMatchInfo()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
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.fc44 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.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