Open Inventor Reference
SoFloatElement Class Reference

Subclasses store a single float, int, or enum value. More...

#include <Inventor/elements/SoFloatElement.h>

Inheritance diagram for SoFloatElement:
SoElement SoComplexityElement SoCreaseAngleElement SoFocalDistanceElement SoFontSizeElement SoLineWidthElement SoPointSizeElement SoTextureQualityElement SoGLLineWidthElement SoGLPointSizeElement

List of all members.

Public Member Functions

virtual SbBool matches (const SoElement *elt) const
 Comparison based on value of floats.
virtual SoElementcopyMatchInfo () 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.

Detailed Description

This class defines generic matches() and copy() methods.

Definition at line 76 of file SoFloatElement.h.


Constructor & Destructor Documentation

virtual SoFloatElement::~SoFloatElement ( ) [protected, virtual]

Member Function Documentation

virtual SoElement* SoFloatElement::copyMatchInfo ( ) const [virtual]

Implements SoElement.

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().

virtual SbBool SoFloatElement::matches ( const SoElement elt) const [virtual]

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]

Member Data Documentation

float SoFloatElement::data [protected]

Definition at line 113 of file SoFloatElement.h.


The documentation for this class was generated from the following file: