Open Inventor Reference
|
This is the abstract base class for all state elements. More...
#include <Inventor/elements/SoElement.h>
Public Member Functions | |
virtual void | init (SoState *state) |
Initializes element. | |
virtual void | push (SoState *state) |
Pushes/pops element. | |
virtual void | pop (SoState *state, const SoElement *prevTopElement) |
virtual void | print (FILE *fp) const |
Prints element (for debugging) | |
virtual bool | matches (const SoElement *elt) const =0 |
Returns TRUE if the element matches another element (of the same class, presumably) with respect to cache validity. | |
virtual SoElement * | copyMatchInfo () const =0 |
Create a copy that we can put in a cache used list and call matches() on later. | |
SoType | getTypeId () const |
Returns type identifier for element instance. | |
int | getStackIndex () const |
Returns the stack index for an element instance. | |
void | setDepth (int dpth) |
Sets stuff in an element instance. | |
void | setNext (SoElement *nxt) |
void | setNextInStack (SoElement *nxt) |
void | setNextFree (SoElement *nxt) |
int | getDepth () const |
Returns stuff from element instance. | |
SoElement * | getNext () const |
virtual | ~SoElement () |
Destructor. | |
Static Public Member Functions | |
static SoType | getClassTypeId () |
Returns type identifier for SoElement class. | |
static void | initElements () |
Initialize ALL Inventor element classes. | |
static void | initClass () |
Initializes the SoElement class. | |
static int | getNumStackIndices () |
Returns the number of stack indices allocated. | |
static SoType | getIdFromStackIndex (int stackIndex) |
Returns the id for the element with the given stack index. | |
Protected Member Functions | |
SoElement () | |
Constructor; use typeId.createInstance to create elements. | |
void | capture (SoState *state) const |
Does whatever is necessary in state to capture this element for caching purposes. | |
virtual void | captureThis (SoState *state) const |
Really captures this element, once it has been determined that a cache is open to capture it. | |
void | setTypeId (SoType id) |
Sets typeId in instance. | |
void | setStackIndex (int index) |
Sets stackIndex in instance. | |
SoElement * | getNextInStack () const |
Returns next instance in specific element stack. | |
SoElement * | getNextFree () const |
Returns next free element in a specific element stack. | |
Static Protected Member Functions | |
static SoElement * | getElement (SoState *state, int stackIndex) |
Returns an instance of an element from the stack with the given index in the given state. | |
static const SoElement * | getConstElement (SoState *state, int stackIndex) |
Returns a read-only pointer to the top instance in the given element stack. | |
static int | createStackIndex (SoType id) |
Creates and returns a new stack index. | |
Static Protected Attributes | |
static int | classStackIndex |
Stack index for SoElement class. | |
Friends | |
class | SoState |
This class defines the following features for all of its derived classes:
Type identifiers. Each class of element has a unique (static) SoType identifier. The correct type id is also stored in each instance for easy access. Copying. Elements are copied into the list of elements used in an SoCache. Performing any operation other than matches() on a copied element is not guaranteed to work (and will not work for things like Coordinates, if the coordinate they were pointing to has been deleted). Stack indices. Since a subclass of an element class needs to be in the same state stack as the class from which it is derived, stack indices are inherited. Capturing. Each time an element's value is accessed, that element is added to the elements-used list of all currently open caches.
Definition at line 96 of file SoElement.h.
|
virtual |
|
protected |
|
inlineprotected |
Should be called by subclasses whenever any value in the element is accessed.
Definition at line 173 of file SoElement.h.
References SoState::isCacheOpen().
Referenced by getConstElement().
|
protectedvirtual |
Reimplemented in SoAccumulatedElement.
|
pure virtual |
Implemented in SoAccumulatedElement, SoCacheElement, SoFloatElement, SoFontNameElement, SoGLCacheContextElement, SoGLLazyElement, SoGLMaterialIndexElement, SoGLRenderPassElement, SoGLUpdateAreaElement, SoGLVBOElement, SoInt32Element, SoLazyElement, SoLightAttenuationElement, SoLocalBBoxMatrixElement, SoOverrideElement, SoPickRayElement, SoReplacedElement, SoShapeHintsElement, SoShapeStyleElement, SoTextureOverrideElement, SoViewportRegionElement, and SoWindowElement.
|
staticprotected |
|
inlinestatic |
Definition at line 121 of file SoElement.h.
|
inlinestaticprotected |
Description: Returns a read-only pointer to the top instance in the given element stack.
inline to speed up traversal.
Use: protected
Definition at line 234 of file SoElement.h.
References capture(), and SoState::getConstElement().
Referenced by SoFloatElement::get(), SoInt32Element::get(), SoCoordinateElement::getInstance(), and SoNormalElement::getInstance().
|
inline |
Definition at line 149 of file SoElement.h.
This instance is writeable. This returns NULL if no writable instance can be returned.
Definition at line 162 of file SoElement.h.
References SoState::getElement().
|
static |
|
inline |
Definition at line 150 of file SoElement.h.
|
inlineprotected |
Definition at line 190 of file SoElement.h.
|
inlineprotected |
Definition at line 187 of file SoElement.h.
Referenced by SoCacheElement::getNextCacheElement().
|
inlinestatic |
Definition at line 134 of file SoElement.h.
|
inline |
Definition at line 140 of file SoElement.h.
|
inline |
Definition at line 124 of file SoElement.h.
|
virtual |
Called for first element of its kind in stack. Default method does nothing.
Reimplemented in SoBBoxModelMatrixElement, SoCacheElement, SoClipPlaneElement, SoComplexityElement, SoComplexityTypeElement, SoCoordinateElement, SoCreaseAngleElement, SoDrawStyleElement, SoFocalDistanceElement, SoFontNameElement, SoFontSizeElement, SoGLCacheContextElement, SoGLDrawStyleElement, SoGLLazyElement, SoGLLightIdElement, SoGLLinePatternElement, SoGLLineWidthElement, SoGLMaterialIndexElement, SoGLModelMatrixElement, SoGLNormalElement, SoGLPointSizeElement, SoGLPolygonOffsetElement, SoGLRenderPassElement, SoGLShapeHintsElement, SoGLTextureCoordinateElement, SoGLTextureEnabledElement, SoGLTextureImageElement, SoGLUpdateAreaElement, SoGLVBOElement, SoGLViewingMatrixElement, SoGLViewportRegionElement, SoLazyElement, SoLightAttenuationElement, SoLinePatternElement, SoLineWidthElement, SoLocalBBoxMatrixElement, SoMaterialBindingElement, SoModelMatrixElement, SoNormalBindingElement, SoNormalElement, SoOverrideElement, SoPickRayElement, SoPickStyleElement, SoPointSizeElement, SoPolygonOffsetElement, SoProfileCoordinateElement, SoProfileElement, SoProjectionMatrixElement, SoReplacedElement, SoShapeHintsElement, SoShapeStyleElement, SoStencilBitsElement, SoSwitchElement, SoTextureCoordinateBindingElement, SoTextureCoordinateElement, SoTextureImageElement, SoTextureMatrixElement, SoTextureQualityElement, SoTextureOverrideElement, SoUnitsElement, SoViewingMatrixElement, SoViewportRegionElement, SoViewVolumeElement, and SoWindowElement.
|
static |
|
static |
|
pure virtual |
If you write a matches() method, you must also write a copy() method.
Implemented in SoGLLazyElement, SoLazyElement, SoAccumulatedElement, SoCacheElement, SoFloatElement, SoFontNameElement, SoGLCacheContextElement, SoGLMaterialIndexElement, SoGLRenderPassElement, SoGLUpdateAreaElement, SoGLVBOElement, SoInt32Element, SoLightAttenuationElement, SoLocalBBoxMatrixElement, SoModelMatrixElement, SoOverrideElement, SoPickRayElement, SoReplacedElement, SoShapeHintsElement, SoShapeStyleElement, SoTextureOverrideElement, SoViewportRegionElement, and SoWindowElement.
Reimplemented in SoGLPolygonOffsetElement, SoGLVBOElement, SoCacheElement, SoClipPlaneElement, SoGLClipPlaneElement, SoGLDrawStyleElement, SoGLLazyElement, SoGLLightIdElement, SoGLLinePatternElement, SoGLLineWidthElement, SoGLMaterialIndexElement, SoGLModelMatrixElement, SoGLPointSizeElement, SoGLProjectionMatrixElement, SoGLShapeHintsElement, SoGLTextureCoordinateElement, SoGLTextureEnabledElement, SoGLTextureImageElement, SoGLTextureMatrixElement, SoGLUpdateAreaElement, SoGLViewingMatrixElement, and SoGLViewportRegionElement.
|
virtual |
Reimplemented in SoAccumulatedElement, SoClipPlaneElement, SoComplexityTypeElement, SoCoordinateElement, SoCreaseAngleElement, SoDrawStyleElement, SoFloatElement, SoFontNameElement, SoGLCacheContextElement, SoGLLightIdElement, SoGLMaterialIndexElement, SoGLRenderPassElement, SoGLUpdateAreaElement, SoInt32Element, SoLazyElement, SoLightAttenuationElement, SoLinePatternElement, SoLocalBBoxMatrixElement, SoMaterialBindingElement, SoModelMatrixElement, SoNormalBindingElement, SoNormalElement, SoOverrideElement, SoPickRayElement, SoPickStyleElement, SoProfileCoordinateElement, SoProfileElement, SoProjectionMatrixElement, SoReplacedElement, SoShapeHintsElement, SoShapeStyleElement, SoTextureCoordinateBindingElement, SoTextureCoordinateElement, SoTextureImageElement, SoTextureMatrixElement, SoTextureOverrideElement, SoUnitsElement, SoViewingMatrixElement, SoViewportRegionElement, and SoViewVolumeElement.
|
virtual |
Allows for side effects to occur. Default methods do nothing.
Reimplemented in SoBBoxModelMatrixElement, SoClipPlaneElement, SoGLDrawStyleElement, SoGLLazyElement, SoGLLightIdElement, SoGLLinePatternElement, SoGLLineWidthElement, SoGLMaterialIndexElement, SoGLModelMatrixElement, SoGLPointSizeElement, SoGLPolygonOffsetElement, SoGLShapeHintsElement, SoGLTextureCoordinateElement, SoGLTextureEnabledElement, SoGLUpdateAreaElement, SoGLVBOElement, SoGLViewingMatrixElement, SoGLViewportRegionElement, SoLazyElement, SoLocalBBoxMatrixElement, SoModelMatrixElement, SoOverrideElement, SoProfileElement, SoShapeHintsElement, SoShapeStyleElement, SoStencilBitsElement, SoTextureMatrixElement, SoTextureOverrideElement, and SoWindowElement.
|
inline |
Definition at line 143 of file SoElement.h.
|
inline |
Definition at line 144 of file SoElement.h.
|
inline |
Definition at line 146 of file SoElement.h.
|
inline |
Definition at line 145 of file SoElement.h.
|
inlineprotected |
Definition at line 184 of file SoElement.h.
|
inlineprotected |
Definition at line 181 of file SoElement.h.
|
friend |
Definition at line 223 of file SoElement.h.
|
staticprotected |
Definition at line 193 of file SoElement.h.