200 static SoType classTypeId;
204 static int nextStackIndex;
#define SoEXTENDER
Provide inline template functions for abs, swap, min, max, and clamp.
#define INVENTOR_API
Disable some annoying warnings on MSVC 6.
This is the abstract base class for all state elements.
void setTypeId(SoType id)
Sets typeId in instance.
virtual void print(FILE *fp) const
Prints element (for debugging)
static const SoElement * getConstElement(SoState *state, int stackIndex)
Returns a read-only pointer to the top instance in the given element stack.
static void initElements()
Initialize ALL Inventor element classes.
void setNextFree(SoElement *nxt)
void setNext(SoElement *nxt)
virtual bool matches(const SoElement *elt) const =0
Returns TRUE if the element matches another element (of the same class, presumably) with respect to c...
static int classStackIndex
Stack index for SoElement class.
virtual ~SoElement()
Destructor.
SoElement * getNextFree() const
Returns next free element in a specific element stack.
static SoType getClassTypeId()
Returns type identifier for SoElement class.
static void initClass()
Initializes the SoElement class.
void capture(SoState *state) const
Does whatever is necessary in state to capture this element for caching purposes.
int getDepth() const
Returns stuff from element instance.
SoElement * getNext() const
int getStackIndex() const
Returns the stack index for an element instance.
static int getNumStackIndices()
Returns the number of stack indices allocated.
static int createStackIndex(SoType id)
Creates and returns a new stack index.
void setNextInStack(SoElement *nxt)
virtual SoElement * copyMatchInfo() const =0
Create a copy that we can put in a cache used list and call matches() on later.
virtual void init(SoState *state)
Initializes element.
SoType getTypeId() const
Returns type identifier for element instance.
virtual void pop(SoState *state, const SoElement *prevTopElement)
SoElement()
Constructor; use typeId.createInstance to create elements.
void setStackIndex(int index)
Sets stackIndex in instance.
static SoType getIdFromStackIndex(int stackIndex)
Returns the id for the element with the given stack index.
virtual void push(SoState *state)
Pushes/pops element.
SoElement * getNextInStack() const
Returns next instance in specific element stack.
void setDepth(int dpth)
Sets stuff in an element instance.
virtual void captureThis(SoState *state) const
Really captures this element, once it has been determined that a cache is open to capture it.
static SoElement * getElement(SoState *state, int stackIndex)
Returns an instance of an element from the stack with the given index in the given state.
An SoState collects and holds state while traversing a scene graph.
const SoElement * getConstElement(int stackIndex) const
Returns the top (read-only) instance of the given element stack.
SoElement * getElement(int stackIndex)
Returns a writable instance of the element on the top of the stack with the given index.
Maintains a list of SoTypes.
SoType has no virtual functions to keep it small...