Manages the GL state for the SoLazyElement. More...
#include <Inventor/elements/SoGLLazyElement.h>
Public Member Functions | |
virtual void | push (SoState *state) |
Overrides push() method to maintain GL state. | |
virtual void | pop (SoState *state, const SoElement *prevTopElement) |
Overrides pop() method to maintain GL state. | |
void | sendDiffuseByIndex (int index) const |
Sends diffuse color and transparency, by index. | |
void | reset (SoState *state, uint32_t bitmask) const |
Destroys knowledge of GL state. | |
Public Member Functions inherited from SoLazyElement | |
int32_t | getNumDiffuse () const |
Method to inquire about current colors. | |
int32_t | getNumTransparencies () const |
Method to inquire about current colors. | |
int32_t | getNumColorIndices () const |
Method to inquire about current colors. | |
SbBool | isPacked () const |
Method to inquire about current colors. | |
SbBool | isTransparent () const |
Method to inquire about current colors. | |
virtual void | print (FILE *fp) const |
Prints element (for debugging). | |
Public Member Functions inherited from SoElement | |
virtual SoType | getTypeId () const |
Returns type identifier for element instance. | |
Public Member Functions inherited from SoTypedObject | |
SbBool | isOfType (const SoType &type) const |
Returns TRUE if this object is of the type specified in type or is derived from that type. | |
template<typename TypedObjectClass > | |
SbBool | isOfType () const |
Returns TRUE if this object is of the type of class TypedObjectClass or is derived from that class. | |
Static Public Member Functions | |
static SoType | getClassTypeId () |
Returns the type identifier for this class. | |
static int | getClassStackIndex () |
Returns the stack id for this element. | |
static void | sendAllMaterial (SoState *state) |
Static send, always send top-of-stack. | |
static void | sendNoMaterial (SoState *state) |
Static send, always send top-of-stack. | |
static void | sendOnlyDiffuseColor (SoState *state) |
Static send, always send top-of-stack. | |
static SoGLLazyElement * | getInstance (const SoState *state) |
Returns the top (current) instance of the element in the state Note it does NOT cause cache dependency! It also casts away the const. | |
Static Public Member Functions inherited from SoLazyElement | |
static SoType | getClassTypeId () |
Returns the type identifier for this class. | |
static int | getClassStackIndex () |
Returns the stack id for this element. | |
static void | setDiffuse (SoState *state, SoNode *node, int32_t numColors, const SbColor *colors, SoColorPacker *cPacker) |
Static set method. | |
static void | setTransparency (SoState *state, SoNode *node, int32_t numTransp, const float *transp, SoColorPacker *cPacker) |
Static set method. | |
static void | setPacked (SoState *state, SoNode *node, SoColorPacker *cPacker, int32_t numColors, const uint32_t *colors) |
Static set method. | |
static void | setColorIndices (SoState *state, SoNode *node, int32_t numIndices, const int32_t *indices) |
Static set method. | |
static void | setAmbient (SoState *state, SoNode *node, const SbColor &color) |
static void | setEmissive (SoState *state, SoNode *node, const SbColor &color) |
static void | setSpecular (SoState *state, SoNode *node, const SbColor &color) |
static void | setShininess (SoState *state, SoNode *node, float value) |
static void | setColorMaterial (SoState *state, SoNode *node, SbBool value) |
static void | setBlending (SoState *state, SbBool value) |
static void | setSmoothing (SoState *state, SbBool value) |
static void | setLightModel (SoState *state, const int32_t model) |
static SbColor | getDiffuse (SoState *state, int index) |
get() methods get value from Inventor state. | |
static float | getTransparency (SoState *, int index) |
get() methods get value from Inventor state. | |
static const uint32_t * | getPackedColors (SoState *state) |
static const int32_t * | getColorIndices (SoState *state) |
static int32_t | getColorIndex (SoState *, int num) |
static SbColor | getAmbient (SoState *) |
static SbColor | getEmissive (SoState *) |
static SbColor | getSpecular (SoState *) |
static float | getShininess (SoState *) |
static SbBool | getColorMaterial (SoState *) |
static SbBool | getBlending (SoState *) |
static SbBool | getSmoothing (SoState *) |
static int32_t | getLightModel (SoState *) |
static SoLazyElement * | getInstance (SoState *state) |
Returns the top (current) instance of the element in the state Note that the cache dependencies associated with this element are managed differently from other elements: this replaces the SoElement::getConstElement that is used by standard elements, but which causes cache dependency. | |
static float | getDefaultAmbientIntensity () |
Specify Open Inventor defaults for colors, etc. | |
static SbColor | getDefaultDiffuse () |
Specify Open Inventor defaults for colors, etc. | |
static SbColor | getDefaultAmbient () |
Specify Open Inventor defaults for colors, etc. | |
static SbColor | getDefaultSpecular () |
Specify Open Inventor defaults for colors, etc. | |
static SbColor | getDefaultEmissive () |
Specify Open Inventor defaults for colors, etc. | |
static float | getDefaultShininess () |
Specify Open Inventor defaults for colors, etc. | |
static uint32_t | getDefaultPackedInternal () |
Specify Open Inventor defaults for colors, etc. | |
static uint32_t | getDefaultPacked () |
Specify Open Inventor defaults for colors, etc. | |
static float | getDefaultTransparency () |
Specify Open Inventor defaults for colors, etc. | |
static int32_t | getDefaultLightModel () |
Specify Open Inventor defaults for colors, etc. | |
static int32_t | getDefaultColorIndex () |
Specify Open Inventor defaults for colors, etc. | |
static float | getDefaultLineWidth () |
Specify Open Inventor defaults for colors, etc. | |
static SoDEPRECATED void | setAmbient (SoState *state, SoNode *node, const SbColor *color) |
static SoDEPRECATED void | setEmissive (SoState *state, SoNode *node, const SbColor *color) |
static SoDEPRECATED void | setSpecular (SoState *state, SoNode *node, const SbColor *color) |
Static Public Member Functions inherited from SoElement | |
static SoType | getClassTypeId () |
Returns type identifier for SoElement class. | |
Static Public Member Functions inherited from SoTypedObject | |
static SoType | getClassTypeId () |
Returns the type identifier for this class. | |
Additional Inherited Members | |
Public Types inherited from SoLazyElement | |
enum | cases { LIGHT_MODEL_CASE = 0 , COLOR_MATERIAL_CASE = 1 , DIFFUSE_CASE = 2 , AMBIENT_CASE = 3 , EMISSIVE_CASE = 4 , SPECULAR_CASE = 5 , SHININESS_CASE = 6 , BLENDING_CASE = 7 , TRANSPARENCY_CASE = 8 , PATTERN_CASE = 9 , SMOOTHING_CASE = 10 , LINE_WIDTH_CASE = 11 } |
Following masks and cases define the components of the lazy element. More... | |
enum | masks { LIGHT_MODEL_MASK = 1 << LIGHT_MODEL_CASE , COLOR_MATERIAL_MASK = 1 << COLOR_MATERIAL_CASE , DIFFUSE_MASK = 1 << DIFFUSE_CASE , AMBIENT_MASK = 1 << AMBIENT_CASE , EMISSIVE_MASK = 1 << EMISSIVE_CASE , SPECULAR_MASK = 1 << SPECULAR_CASE , SHININESS_MASK = 1 << SHININESS_CASE , TRANSPARENCY_MASK = 1 << TRANSPARENCY_CASE , BLENDING_MASK = 1 << BLENDING_CASE , SMOOTHING_MASK = 1 << SMOOTHING_CASE , ALL_MASK = (1 << SO_LAZY_NUM_COMPONENTS)-1 , PATTERN_MASK = 1 << PATTERN_CASE , LINE_WIDTH_MASK = 1 << LINE_WIDTH_CASE } |
Masks. More... | |
Manages the GL state for the SoLazyElement.
This element manages the GL state for the SoLazyElement.
Note that this class relies on SoLazyElement to store the Open Inventor color(s), etc. in the instance. This element keeps GL shadow copies of colors.
Definition at line 77 of file SoGLLazyElement.h.
|
static |
Returns the stack id for this element.
|
static |
Returns the type identifier for this class.
|
inlinestatic |
Returns the top (current) instance of the element in the state Note it does NOT cause cache dependency! It also casts away the const.
Definition at line 137 of file SoGLLazyElement.h.
|
virtual |
Overrides push() method to maintain GL state.
Reimplemented from SoLazyElement.
void SoGLLazyElement::reset | ( | SoState * | state, |
uint32_t | bitmask | ||
) | const |
Destroys knowledge of GL state.
|
inlinestatic |
Static send, always send top-of-stack.
Intended for extender use.
Definition at line 95 of file SoGLLazyElement.h.
void SoGLLazyElement::sendDiffuseByIndex | ( | int | index | ) | const |
Sends diffuse color and transparency, by index.
Included for compatibility with SoMaterialBundle. To be used by a shape to send additional colors after first send(). Should NEVER be the first send of a shape!
|
inlinestatic |
Static send, always send top-of-stack.
Intended for extender use.
Definition at line 104 of file SoGLLazyElement.h.
|
inlinestatic |
Static send, always send top-of-stack.
Intended for extender use.
Definition at line 113 of file SoGLLazyElement.h.