Open Inventor Reference
|
Subclasses store a single float, int, or enum value. More...
#include <Inventor/elements/SoFloatElement.h>
Public Member Functions | |
virtual SbBool | matches (const SoElement *elt) const |
Comparison based on value of floats. | |
virtual SoElement * | copyMatchInfo () const |
Copy method, takes care copying the data. | |
virtual void | print (FILE *fp) const |
Prints element (for debugging) | |
Static Public Member Functions | |
static void | initClass () |
Initializes the SoFloatElement class. | |
Protected Member Functions | |
virtual void | setElt (float value) |
Virtual set that subclasses can override to implement side-effect behaviors. | |
virtual | ~SoFloatElement () |
Destructor. | |
Static Protected Member Functions | |
static void | set (int stackIndex, SoState *state, float value) |
Set value. | |
static float | get (int stackIndex, SoState *state) |
Get value. | |
Protected Attributes | |
float | data |
Storage for data. |
This class defines generic matches() and copy() methods.
Definition at line 76 of file SoFloatElement.h.
virtual SoFloatElement::~SoFloatElement | ( | ) | [protected, virtual] |
static float SoFloatElement::get | ( | int | stackIndex, |
SoState * | state | ||
) | [inline, static, protected] |
Derived classes have static inline methods to pass in the stackIndex and cast the returned value to the right type.
Definition at line 108 of file SoFloatElement.h.
References SoElement::getConstElement().
Referenced by SoTextureQualityElement::get(), SoPointSizeElement::get(), SoLineWidthElement::get(), SoFontSizeElement::get(), SoFocalDistanceElement::get(), SoCreaseAngleElement::get(), and SoComplexityElement::get().
static void SoFloatElement::initClass | ( | ) | [static] |
Reimplemented from SoElement.
Reimplemented in SoComplexityElement, SoCreaseAngleElement, SoFocalDistanceElement, SoFontSizeElement, SoGLLineWidthElement, SoGLPointSizeElement, SoLineWidthElement, SoPointSizeElement, and SoTextureQualityElement.
Implements SoElement.
virtual void SoFloatElement::print | ( | FILE * | fp | ) | const [virtual] |
Reimplemented from SoElement.
Reimplemented in SoCreaseAngleElement.
static void SoFloatElement::set | ( | int | stackIndex, |
SoState * | state, | ||
float | value | ||
) | [static, protected] |
Derived classes have static inline methods that pass in the stack index and cast their type into a float. This just gets an appropriate instance and calls the virtual set.
Referenced by SoTextureQualityElement::set(), SoPointSizeElement::set(), SoLineWidthElement::set(), SoFontSizeElement::set(), SoFocalDistanceElement::set(), SoCreaseAngleElement::set(), and SoComplexityElement::set().
virtual void SoFloatElement::setElt | ( | float | value | ) | [protected, virtual] |
Reimplemented in SoGLLineWidthElement, and SoGLPointSizeElement.
float SoFloatElement::data [protected] |
Definition at line 113 of file SoFloatElement.h.