Open Inventor Reference
|
Element that stores the indices into the current GL material map of the ambient, diffuse, and specular components of the current surface material, as defined by GL's color index lighting model. More...
#include <Inventor/elements/SoGLMaterialIndexElement.h>
Public Member Functions | |
virtual void | init (SoState *state) |
Initializes element. | |
int32_t | getNum () const |
Returns the number of indices in an instance. | |
int32_t | getAmbient (int index) const |
Returns the indexed indices from an element. | |
int32_t | getDiffuse (int index) const |
int32_t | getSpecular (int index) const |
virtual void | push (SoState *state) |
Override push() and pop() methods to maintain GL state. | |
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 SoElement * | copyMatchInfo () const |
Create and return a copy of this element. | |
virtual void | print (FILE *fp) const |
Prints element (for debugging) | |
void | send (int index) const |
Sends indexed values to GL. | |
Static Public Member Functions | |
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. | |
static const SoGLMaterialIndexElement * | getInstance (SoState *state) |
Returns the top (current) instance of the element in the state. | |
static int32_t | getDefaultAmbient () |
Returns the default indices. | |
static int32_t | getDefaultDiffuse () |
static int32_t | getDefaultSpecular () |
static void | initClass () |
Initializes the SoGLMaterialIndexElement class. | |
Protected Member Functions | |
virtual | ~SoGLMaterialIndexElement () |
Protected Attributes | |
int32_t | numIndices |
const int32_t * | ambientIndices |
const int32_t * | diffuseIndices |
const int32_t * | specularIndices |
This class allows read-only access to the top element in the state to make accessing several values in it more efficient. Individual values must be accessed through this instance.
Definition at line 75 of file SoGLMaterialIndexElement.h.
virtual SoGLMaterialIndexElement::~SoGLMaterialIndexElement | ( | ) | [protected, virtual] |
virtual SoElement* SoGLMaterialIndexElement::copyMatchInfo | ( | ) | const [virtual] |
Reimplemented from SoReplacedElement.
int32_t SoGLMaterialIndexElement::getAmbient | ( | int | index | ) | const |
static int32_t SoGLMaterialIndexElement::getDefaultAmbient | ( | ) | [inline, static] |
Definition at line 104 of file SoGLMaterialIndexElement.h.
static int32_t SoGLMaterialIndexElement::getDefaultDiffuse | ( | ) | [inline, static] |
Definition at line 105 of file SoGLMaterialIndexElement.h.
static int32_t SoGLMaterialIndexElement::getDefaultSpecular | ( | ) | [inline, static] |
Definition at line 106 of file SoGLMaterialIndexElement.h.
int32_t SoGLMaterialIndexElement::getDiffuse | ( | int | index | ) | const |
static const SoGLMaterialIndexElement* SoGLMaterialIndexElement::getInstance | ( | SoState * | state | ) | [static] |
int32_t SoGLMaterialIndexElement::getNum | ( | ) | const [inline] |
Definition at line 96 of file SoGLMaterialIndexElement.h.
int32_t SoGLMaterialIndexElement::getSpecular | ( | int | index | ) | const |
virtual void SoGLMaterialIndexElement::init | ( | SoState * | state | ) | [virtual] |
Reimplemented from SoReplacedElement.
static void SoGLMaterialIndexElement::initClass | ( | ) | [static] |
Reimplemented from SoReplacedElement.
Reimplemented from SoReplacedElement.
virtual void SoGLMaterialIndexElement::pop | ( | SoState * | state, |
const SoElement * | prevTopElement | ||
) | [virtual] |
Reimplemented from SoElement.
virtual void SoGLMaterialIndexElement::print | ( | FILE * | fp | ) | const [virtual] |
Reimplemented from SoReplacedElement.
virtual void SoGLMaterialIndexElement::push | ( | SoState * | state | ) | [virtual] |
Reimplemented from SoElement.
void SoGLMaterialIndexElement::send | ( | int | index | ) | const |
static void SoGLMaterialIndexElement::set | ( | SoState * | state, |
SoNode * | node, | ||
int32_t | numIndices, | ||
const int32_t * | ambientIndices, | ||
const int32_t * | diffuseIndices, | ||
const int32_t * | specularIndices | ||
) | [static] |
Note that the given number of indices must be valid for the ambient, diffuse, and specular components.
const int32_t* SoGLMaterialIndexElement::ambientIndices [protected] |
Definition at line 131 of file SoGLMaterialIndexElement.h.
const int32_t * SoGLMaterialIndexElement::diffuseIndices [protected] |
Definition at line 131 of file SoGLMaterialIndexElement.h.
int32_t SoGLMaterialIndexElement::numIndices [protected] |
Definition at line 130 of file SoGLMaterialIndexElement.h.
const int32_t * SoGLMaterialIndexElement::specularIndices [protected] |
Definition at line 131 of file SoGLMaterialIndexElement.h.