55#ifndef _SO_GL_MATERIAL_INDEX_ELEMENT
56#define _SO_GL_MATERIAL_INDEX_ELEMENT
139 static int32_t defaultAmbientIndex;
140 static int32_t defaultDiffuseIndex;
141 static int32_t defaultSpecularIndex;
#define SoEXTENDER
Provide inline template functions for abs, swap, min, max, and clamp.
bool SbBool
The original OIV version used SbBool as a typedef to int.
#define INVENTOR_API
Disable some annoying warnings on MSVC 6.
#define SO_ELEMENT_HEADER(className)
This one is for non-abstract element classes.
SoElement()
Constructor; use typeId.createInstance to create elements.
Element that stores the indices into the current GL material map of the ambient, diffuse,...
int32_t getSpecular(int index) const
static const SoGLMaterialIndexElement * getInstance(SoState *state)
Returns the top (current) instance of the element in the state.
static int32_t getDefaultDiffuse()
int32_t getAmbient(int index) const
Returns the indexed indices from an element.
static void initClass()
Initializes the SoGLMaterialIndexElement class.
const int32_t * specularIndices
void send(int index) const
Sends indexed values to GL.
static void set(SoState *state, SoNode *node, int32_t numIndices, const int32_t *ambientIndices, const int32_t *diffuseIndices, const int32_t *specularIndices)
Sets the current material indices.
virtual void pop(SoState *state, const SoElement *prevTopElement)
virtual SbBool matches(const SoElement *elt) const
Override matches() to return TRUE only if node-id's match AND last values sent to GL match.
virtual void push(SoState *state)
Override push() and pop() methods to maintain GL state.
const int32_t * ambientIndices
int32_t getNum() const
Returns the number of indices in an instance.
virtual ~SoGLMaterialIndexElement()
static int32_t getDefaultSpecular()
virtual void print(FILE *fp) const
Prints element (for debugging)
virtual void init(SoState *state)
Initializes element.
const int32_t * diffuseIndices
virtual SoElement * copyMatchInfo() const
Create and return a copy of this element.
static int32_t getDefaultAmbient()
Returns the default indices.
int32_t getDiffuse(int index) const
Abstract base class for all database nodes.
This is the abstract base class for each state element whose value is replaced whenever it is set.