SoFloatElement(3)
π SoFloatElement(3) π
Library Functions Manual β yes bestie, we're in the Library Functions section, third volume, and today's main character is SoFloatElement. Grab a snack π, this one's cute and short but there's a LOT of inherited lore.
β¨ NAME β¨
SoFloatElement β it's an abstract base class for elements that consist of a single float value. That's it. That's the whole vibe. One float. Living its best life. π«Ά
πΈ SYNOPSIS πΈ
#include <Inventor/elements/SoFloatElement.h>
Inherits SoElement.
Inherited by SoLineWidthElement, SoListenerGainElement, and SoPointSizeElement. (Look at her, already a mom to three iconic subclasses π
)
π Public Member Functions
virtual void init (SoState *state)virtual SbBool matches (const SoElement *element) constvirtual SoElement * copyMatchInfo (void) constvirtual void print (FILE *file) constvirtual void setElt (float value)
Public Member Functions inherited from SoElement
const SoType getTypeId (void) constint getStackIndex (void) constvirtual void push (SoState *state)virtual void pop (SoState *state, const SoElement *prevTopElement)void setDepth (const int depth)int getDepth (void) constvirtual ~SoElement ()
β Static Public Member Functions
static SoType getClassTypeId (void)static int getClassStackIndex (void)static void initClass (void)static void set (const int stackIndex, SoState *const state, SoNode *const node, const float value)static void set (const int stackIndex, SoState *const state, const float value)static float get (const int stackIndex, SoState *const state)
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 ~SoFloatElement ()
Protected Member Functions inherited from SoElement
SoElement (void)void capture (SoState *const state) constvirtual void captureThis (SoState *state) constvoid setTypeId (const SoType typeId)void setStackIndex (const int index)SoElement * getNextInStack (void) constSoElement * getNextFree (void) const
π¦ Protected Attributes
float data
Protected Attributes inherited from SoElement
SoType typeIdint stackIndexint depth
π Additional Inherited Members
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)
Static Protected Attributes inherited from SoElement
static int classStackIndexstatic SoTypeList * stackToType
π Detailed Description π
Okay so. SoFloatElement is an abstract base class for elements that consists of a single float value. (Yes, the name says it twice, she's consistent β¨)
She's the superclass of elements where the new element data replaces the old data, and where the data the element stores is a simple single precision floating point value. No cap.
Think of her like a convenient, light-weight version of SoReplacedElement. The way she differs from SoReplacedElement is that the set() and get() methods are already implemented, since it is known that subclasses will still contain just a single float value. She did the homework so you don't have to. Ate. π₯
See also
SoReplacedElementSoInt32ElementSoAccumulatedElement
π§ Constructor & Destructor Documentation π§
SoFloatElement::~SoFloatElement (void ) [protected], [virtual]
Destructor. She's logging off. Bye bestie π
π Member Function Documentation π
void SoFloatElement::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. Like the first girl to arrive at the party, setting the tone. π
Reimplemented from SoElement.
Reimplemented in SoGLLineWidthElement, SoGLPointSizeElement, SoLineWidthElement, SoListenerGainElement, and SoPointSizeElement.
References data, and SoElement::init().
Referenced by SoLineWidthElement::init(), SoListenerGainElement::init(), and SoPointSizeElement::init().
SbBool SoFloatElement::matches (const SoElement * element) const [virtual]
This function returns TRUE if the element matches another element (of the same class), with respect to cache validity. It's the vibe check. Does she match? Only the cache knows. π
Heads up: if the application programmer's extension element has amatches()function, it should also have acopyMatchInfo()function. They're a package deal, fr fr.
Implements SoElement.
References data, SoElement::getTypeId(), and SoElement::SoElement().
SoElement * SoFloatElement::copyMatchInfo (void ) const [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. She's doing behind-the-scenes work for the whole traversal, lowkey iconic. π
Implements SoElement.
References SoType::createInstance(), data, and SoElement::getTypeId().
void SoFloatElement::print (FILE * file) const [virtual]
This function is for printing element information, and is used mostly for debugging purposes. She's journaling, let her live. π
Reimplemented from SoElement.
References data, and SoElement::getTypeId().
void SoFloatElement::set (const int index, SoState *const state, SoNode *const node, const float value) [static]
Static method for setting the value of an element in the given state at the given stack index.
References SoElement::getElement(), and setElt().
Referenced by set(), SoLineWidthElement::set(), SoListenerGainElement::set(), and SoPointSizeElement::set().
void SoFloatElement::set (const int stackIndex, SoState *const state, const float value) [static]
Static method for setting the value of an element in the given state at the given stackIndex.
References set(), and SoElement::stackIndex.
float SoFloatElement::get (const int index, SoState *const state) [static]
Static method to fetch the value of the element of this type from the given state at the given stack index. Go get her π«
References data, and SoElement::getConstElement().
Referenced by SoLineWidthElement::get(), SoListenerGainElement::get(), and SoPointSizeElement::get().
void SoFloatElement::setElt (float value) [virtual]
Set element value. Simple as that, bestie.
Reimplemented in SoGLLineWidthElement, and SoGLPointSizeElement.
References data.
Referenced by set().
π Member Data Documentation π
float SoFloatElement::data [protected]
The element's value. The one (1) float. The whole point of the whole class. Protect her at all costs β she's protected for a reason. π«Ά
Referenced by copyMatchInfo(), get(), init(), SoLineWidthElement::init(), SoListenerGainElement::init(), SoPointSizeElement::init(), matches(), SoGLLineWidthElement::pop(), SoGLPointSizeElement::pop(), print(), SoGLLineWidthElement::push(), SoGLPointSizeElement::push(), setElt(), SoGLLineWidthElement::setElt(), and SoGLPointSizeElement::setElt().
π Author π
Generated automatically by Doxygen for Coin from the source code. (Not a girlboss, just a robot. We respect the grind. π€)
That's the whole page, bestie! Coin, Version 2.5.0, and this was SoFloatElement(3). Go forth and float. Bye~ πβ¨π¦
π¦ 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