Manages several properties that need to be lazily tracked for OpenGL. More...
#include <Inventor/elements/SoLazyElement.h>
Public Types | |
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... | |
Public Member Functions | |
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 | push (SoState *state) |
push (for non-GL elements) | |
virtual void | print (FILE *fp) const |
Prints element (for debugging). | |
Public Member Functions inherited from SoElement | |
virtual void | pop (SoState *state, const SoElement *prevTopElement) |
Pops element. | |
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 | 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. | |
Deprecated | |
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. | |
Manages several properties that need to be lazily tracked for OpenGL.
This element manages several properties such as colors, that need to be lazily tracked for OpenGL. Allows Open Inventor property nodes to set these properties without immediately making any OpenGL calls. Thus we avoid making redundant OpenGL calls to set, for example, the material color. Open Inventor rendering nodes then request that the values of any properties that are relevant to that shape and "out of date" (not current with OpenGL state) be sent to OpenGL.
Includes:
Transparencies
GLColorMaterial
GLBlendEnablement
PolygonStipple
Light model
Color index
Line width
SoBaseColor, SoMaterial, SoPackedColor, SoVertexProperty
Definition at line 105 of file SoLazyElement.h.
enum SoLazyElement::cases |
Following masks and cases define the components of the lazy element.
Masks are needed by SoEXTENDER apps that need to use SoGLLazyElement::reset(bitmask) to invalidate GL values of particular components. NOTE: the order of these cases should not be changed without careful consideration of dependencies in the reallySend method. Cases
Definition at line 119 of file SoLazyElement.h.
enum SoLazyElement::masks |
Masks.
Definition at line 147 of file SoLazyElement.h.
|
static |
Returns the stack id for this element.
|
static |
Returns the type identifier for this class.
|
static |
|
static |
|
inlinestatic |
Specify Open Inventor defaults for colors, etc.
Definition at line 343 of file SoLazyElement.h.
|
inlinestatic |
Specify Open Inventor defaults for colors, etc.
Definition at line 330 of file SoLazyElement.h.
|
inlinestatic |
Specify Open Inventor defaults for colors, etc.
Definition at line 389 of file SoLazyElement.h.
|
inlinestatic |
Specify Open Inventor defaults for colors, etc.
Definition at line 337 of file SoLazyElement.h.
|
inlinestatic |
Specify Open Inventor defaults for colors, etc.
Definition at line 355 of file SoLazyElement.h.
|
inlinestatic |
Specify Open Inventor defaults for colors, etc.
Definition at line 383 of file SoLazyElement.h.
|
inlinestatic |
Specify Open Inventor defaults for colors, etc.
Definition at line 395 of file SoLazyElement.h.
|
inlinestatic |
Specify Open Inventor defaults for colors, etc.
Definition at line 371 of file SoLazyElement.h.
|
static |
Specify Open Inventor defaults for colors, etc.
|
inlinestatic |
Specify Open Inventor defaults for colors, etc.
Definition at line 361 of file SoLazyElement.h.
|
inlinestatic |
Specify Open Inventor defaults for colors, etc.
Definition at line 349 of file SoLazyElement.h.
|
inlinestatic |
Specify Open Inventor defaults for colors, etc.
Definition at line 377 of file SoLazyElement.h.
get() methods get value from Inventor state.
The public methods are static, they get an instance of the element. If there is a cache, the appropriate virtual registerGetDependence is called.
|
inlinestatic |
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.
Note that this element is not const; however modifications to it can cause problems. SoEXTENDER apps should use only SoEXTENDER methods on this element.
Definition at line 324 of file SoLazyElement.h.
|
static |
|
inline |
Method to inquire about current colors.
Definition at line 300 of file SoLazyElement.h.
|
inline |
Method to inquire about current colors.
Definition at line 288 of file SoLazyElement.h.
|
inline |
Method to inquire about current colors.
Definition at line 294 of file SoLazyElement.h.
|
static |
|
static |
|
static |
get() methods get value from Inventor state.
The public methods are static, they get an instance of the element. If there is a cache, the appropriate virtual registerGetDependence is called.
|
inline |
Method to inquire about current colors.
Definition at line 306 of file SoLazyElement.h.
SbBool SoLazyElement::isTransparent | ( | ) | const |
Method to inquire about current colors.
|
virtual |
Prints element (for debugging).
Reimplemented from SoElement.
|
virtual |
|
static |
|
inlinestatic |
Definition at line 226 of file SoLazyElement.h.
|
static |
Static set method.
|
static |
Static set method.
|
static |
|
inlinestatic |
Definition at line 232 of file SoLazyElement.h.
|
static |
|
static |
Static set method.
|
static |
|
inlinestatic |
Definition at line 238 of file SoLazyElement.h.
|
static |
Static set method.