![]() |
http://www.sim.no/ http://www.coin3d.org/ |
SoElement is the abstract base class for all elements. More...
#include <Inventor/elements/SoElement.h>
Public Member Functions | |
const SoType | getTypeId (void) const |
int | getStackIndex (void) const |
virtual void | init (SoState *state) |
virtual void | push (SoState *state) |
virtual void | pop (SoState *state, const SoElement *prevTopElement) |
virtual SbBool | matches (const SoElement *element) const =0 |
virtual SoElement * | copyMatchInfo (void) const =0 |
void | setDepth (const int depth) |
int | getDepth (void) const |
virtual void | print (FILE *file=stdout) const |
virtual | ~SoElement () |
Static Public Member Functions | |
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 | |
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) |
static const SoElement * | getConstElement (SoState *const state, const int stackIndex) |
static int | createStackIndex (const SoType id) |
Protected Attributes | |
SoType | typeId |
int | stackIndex |
int | depth |
Static Protected Attributes | |
static int | classStackIndex |
static SoTypeList * | stackToType |
SoElement is the abstract base class for all elements.
This is the base class for all the element classes in Coin.
SoElement::~SoElement | ( | ) | [virtual] |
The destructor.
SoElement::SoElement | ( | void | ) | [protected] |
The constructor. To create element instances, use SoType::createInstance() for the elements type identifier..
void SoElement::initClass | ( | void | ) | [static] |
Initialize relevant common data for all instances, like the type system.
Reimplemented in SoGLShadowCullingElement, SoShadowStyleElement, SoProfilerElement, SoAccumulatedElement, SoAmbientColorElement, SoAnnoText3CharOrientElement, SoAnnoText3FontSizeHintElement, SoAnnoText3RenderPrintElement, SoBBoxModelMatrixElement, SoBumpMapCoordinateElement, SoBumpMapMatrixElement, SoCacheElement, SoClipPlaneElement, SoComplexityElement, SoComplexityTypeElement, SoCoordinateElement, SoCreaseAngleElement, SoCullElement, SoDecimationPercentageElement, SoDecimationTypeElement, SoDepthBufferElement, SoDiffuseColorElement, SoDrawStyleElement, SoEmissiveColorElement, SoEnvironmentElement, SoFloatElement, SoFocalDistanceElement, SoFontNameElement, SoFontSizeElement, SoGLClipPlaneElement, SoGLColorIndexElement, SoGLCoordinateElement, SoGLDepthBufferElement, SoGLDrawStyleElement, SoGLEnvironmentElement, SoGLLazyElement, SoGLLightIdElement, SoGLLinePatternElement, SoGLLineWidthElement, SoGLModelMatrixElement, SoGLMultiTextureCoordinateElement, SoGLMultiTextureImageElement, SoGLMultiTextureMatrixElement, SoGLNormalElement, SoGLPointSizeElement, SoGLPolygonOffsetElement, SoGLProjectionMatrixElement, SoGLRenderPassElement, SoGLShapeHintsElement, SoGLTexture3EnabledElement, SoGLTextureCoordinateElement, SoGLTextureEnabledElement, SoGLTextureImageElement, SoGLTextureMatrixElement, SoGLUpdateAreaElement, SoGLVBOElement, SoGLViewingMatrixElement, SoGLViewportRegionElement, SoGeoElement, SoInt32Element, SoLazyElement, SoLightAttenuationElement, SoLightElement, SoLightModelElement, SoLinePatternElement, SoLineWidthElement, SoListenerDopplerElement, SoListenerGainElement, SoListenerOrientationElement, SoListenerPositionElement, SoLocalBBoxMatrixElement, SoMaterialBindingElement, SoModelMatrixElement, SoMultiTextureEnabledElement, SoMultiTextureImageElement, SoMultiTextureMatrixElement, SoNormalBindingElement, SoNormalElement, SoOverrideElement, SoPickRayElement, SoPickStyleElement, SoPointSizeElement, SoPolygonOffsetElement, SoProfileCoordinateElement, SoProfileElement, SoReplacedElement, SoShapeStyleElement, SoShininessElement, SoSoundElement, SoSpecularColorElement, SoSwitchElement, SoTextOutlineEnabledElement, SoTextureCombineElement, SoTextureCoordinateBindingElement, SoTextureCoordinateElement, SoTextureEnabledElement, SoTextureImageElement, SoTextureMatrixElement, SoTextureOverrideElement, SoTextureQualityElement, SoTextureUnitElement, SoTransparencyElement, SoUnitsElement, SoVertexAttributeBindingElement, SoViewVolumeElement, SoViewingMatrixElement, SoViewportRegionElement, and SoWindowElement.
SoType SoElement::getClassTypeId | ( | void | ) | [static] |
This static method returns the class type.
int SoElement::getClassStackIndex | ( | void | ) | [static] |
This static method returns the state stack index for the class.
const SoType SoElement::getTypeId | ( | void | ) | const |
Returns the type identification of an object derived from a class inheriting SoElement. This is used for run-time type checking and "downward" casting.
For a more thorough explanation of the run-time type identification functionality, see the documentation of SoBase::getTypeId().
int SoElement::getStackIndex | ( | void | ) | const |
Returns the stack index for an element instance.
SoElement * SoElement::copyMatchInfo | ( | void | ) | const [pure 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.
Implemented in SoProfilerElement, SoAccumulatedElement, SoCacheElement, SoCullElement, SoDepthBufferElement, SoFloatElement, SoFontNameElement, SoGLRenderPassElement, SoGLUpdateAreaElement, SoGLVBOElement, SoInt32Element, SoLazyElement, SoLightAttenuationElement, SoLocalBBoxMatrixElement, SoMultiTextureEnabledElement, SoMultiTextureImageElement, SoOverrideElement, SoPickRayElement, SoReplacedElement, SoShapeStyleElement, SoTextureCombineElement, SoTextureOverrideElement, SoViewportRegionElement, and SoWindowElement.
void SoElement::initElements | ( | void | ) | [static] |
This function initializes all the built-in Coin element classes.
int SoElement::getNumStackIndices | ( | void | ) | [static] |
Returns the number of allocated element stack index slots.
SoType SoElement::getIdFromStackIndex | ( | const int | stackIndex | ) | [static] |
Returns the SoType identifier for the element class with element state stack index stackIndex.
void SoElement::setDepth | ( | const int | depth | ) |
Sets the depth value of the element instance in the state stack.
int SoElement::getDepth | ( | void | ) | const |
Returns the state stack depth value of the element instance.
void SoElement::print | ( | FILE * | file = stdout | ) | const [virtual] |
This function is for printing element information, and is used mostly for debugging purposes.
Reimplemented in SoCoordinateElement, SoEnvironmentElement, SoFloatElement, SoFontNameElement, SoInt32Element, SoLightAttenuationElement, SoListenerDopplerElement, SoListenerOrientationElement, SoListenerPositionElement, SoOverrideElement, SoReplacedElement, SoSoundElement, SoTextureOverrideElement, and SoViewportRegionElement.
SoElement * SoElement::getElement | ( | SoState *const | state, |
const int | stackIndex | ||
) | [inline, static, protected] |
This method returns the top instance (in the state stack) of the element class with stack index stackIndex.
The retuned instance is writable. To make this instance, some lazy evaluation may have to be perfomed, so use getConstElement() instead if the instance shouldn't be modified.
If no instance is available and can not be made, NULL
is returned.
void const SoElement * SoElement::getConstElement | ( | SoState *const | state, |
const int | stackIndex | ||
) | [inline, static, protected] |
This method returns a reference to the top element of the class with stack index stackIndex. The returned element is non-mutable.
(Don't try to be clever and cast away the constness -- if the returned instance is modified, strange, hard to find and generally wonderful bugs will most likely start to happen.)
If no instance can be returned, NULL
is returned.
void SoElement::capture | ( | SoState *const | state | ) | const [inline, protected] |
This function does whatever is necessary in the state for caching purposes. If should be called by subclasses of SoElement whenever any value in the element is accessed.
void SoElement::captureThis | ( | SoState * | state | ) | const [protected, virtual] |
Adds the element to the cache.
Reimplemented in SoAccumulatedElement.
void SoElement::setTypeId | ( | const SoType | typeId | ) | [protected] |
Sets the type identifier of an instance.
Note that this is fundamentally different from the SoNode run-time type system.
void SoElement::setStackIndex | ( | const int | stackIndex | ) | [protected] |
Sets the stack index in an instance. Used in constructors of derived elements.
int SoElement::createStackIndex | ( | const SoType | typeId | ) | [static, protected] |
Returns the value of a new available stack index.
SoElement * SoElement::getNextInStack | ( | void | ) | const [protected] |
Returns the next element down in the stack. Should be used in push() to get the previous element.
This method has a slightly misleading name, but we didn't change it to stay compatible with the original SGI Inventor API.
SoElement * SoElement::getNextFree | ( | void | ) | const [protected] |
Returns the next free element, ie the next element up in the stack.
int SoElement::classStackIndex [static, protected] |
This is the static state stack index for the class.
SoType SoElement::typeId [protected] |
The element's unique SoType type identification.
int SoElement::stackIndex [protected] |
The index in the state stack for this particular element instance.
SoTypeList * SoElement::stackToType [static, protected] |
Provides mapping from state stack indices to element types.
int SoElement::depth [protected] |
The depth of the element instance in the state stack.
Copyright © 1998-2010 by Kongsberg Oil & Gas Technologies. All rights reserved.
Generated on Thu Apr 28 2011 03:43:19 for Coin by Doxygen 1.7.4.