SoLazyElement Class Reference
[Elements]

Manages several properties that need to be lazily tracked for OpenGL. More...

#include <Inventor/elements/SoLazyElement.h>

Inheritance diagram for SoLazyElement:
SoElement SoTypedObject SoGLLazyElement

List of all members.

Classes

class  __ivstate

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
}
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
}

Public Member Functions

int32_t getNumDiffuse () const
int32_t getNumTransparencies () const
int32_t getNumColorIndices () const
SbBool isPacked () const
SbBool isTransparent () const
virtual void push (SoState *state)
virtual void print (FILE *fp) const

Static Public Member Functions

static SoType getClassTypeId ()
static int getClassStackIndex ()
static void setDiffuse (SoState *state, SoNode *node, int32_t numColors, const SbColor *colors, SoColorPacker *cPacker)
static void setTransparency (SoState *state, SoNode *node, int32_t numTransp, const float *transp, SoColorPacker *cPacker)
static void setPacked (SoState *state, SoNode *node, SoColorPacker *cPacker, int32_t numColors, const uint32_t *colors)
static void setColorIndices (SoState *state, SoNode *node, int32_t numIndices, const int32_t *indices)
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)
static float getTransparency (SoState *, int index)
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 SoLazyElementgetInstance (SoState *state)
static float getDefaultAmbientIntensity ()
static SbColor getDefaultDiffuse ()
static SbColor getDefaultAmbient ()
static SbColor getDefaultSpecular ()
static SbColor getDefaultEmissive ()
static float getDefaultShininess ()
static uint32_t getDefaultPackedInternal ()
static uint32_t getDefaultPacked ()
static float getDefaultTransparency ()
static int32_t getDefaultLightModel ()
static int32_t getDefaultColorIndex ()
static float getDefaultLineWidth ()

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)

Detailed Description

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

SEE ALSO

SoBaseColor, SoMaterial, SoPackedColor, SoVertexProperty

Deprecated:

Deprecated since Open Inventor 10000
Use SoMaterialElement, SoBlendElement or SoLightModelElement instead.

Member Enumeration Documentation

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

Enumerator:
LIGHT_MODEL_CASE 

Light model case.

COLOR_MATERIAL_CASE 

Color material case.

DIFFUSE_CASE 

Diffuse case.

AMBIENT_CASE 

Ambient case.

EMISSIVE_CASE 

Emissive case.

SPECULAR_CASE 

Specular case.

SHININESS_CASE 

Shininess case.

BLENDING_CASE 

Blending case.

TRANSPARENCY_CASE 

Transparency case.

PATTERN_CASE 

Pattern case.

SMOOTHING_CASE 

Smoothing case.

LINE_WIDTH_CASE 

Line width case.

Masks.

Enumerator:
LIGHT_MODEL_MASK 

Light model mask.

COLOR_MATERIAL_MASK 

Color mask.

DIFFUSE_MASK 

Diffuse mask.

AMBIENT_MASK 

Ambient mask.

EMISSIVE_MASK 

Emissive mask.

SPECULAR_MASK 

Specular mask.

SHININESS_MASK 

Shininess mask.

TRANSPARENCY_MASK 

Transparency mask.

BLENDING_MASK 

Blending mask.

SMOOTHING_MASK 

Smoothing mask.

ALL_MASK 

All masks.

PATTERN_MASK 

Pattern mask.

LINE_WIDTH_MASK 

Line width mask.


Member Function Documentation

static SbColor SoLazyElement::getAmbient ( SoState  )  [static]
static SbBool SoLazyElement::getBlending ( SoState  )  [static]
static int SoLazyElement::getClassStackIndex (  )  [static]

Returns the stack id for this element.

Reimplemented from SoElement.

Reimplemented in SoGLLazyElement.

static SoType SoLazyElement::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoElement.

Reimplemented in SoGLLazyElement.

static int32_t SoLazyElement::getColorIndex ( SoState ,
int  num 
) [static]
static const int32_t* SoLazyElement::getColorIndices ( SoState state  )  [static]
static SbBool SoLazyElement::getColorMaterial ( SoState  )  [static]
static SbColor SoLazyElement::getDefaultAmbient (  )  [inline, static]

Specify Open Inventor defaults for colors, etc.

static float SoLazyElement::getDefaultAmbientIntensity (  )  [inline, static]

Specify Open Inventor defaults for colors, etc.

static int32_t SoLazyElement::getDefaultColorIndex (  )  [inline, static]

Specify Open Inventor defaults for colors, etc.

static SbColor SoLazyElement::getDefaultDiffuse (  )  [inline, static]

Specify Open Inventor defaults for colors, etc.

static SbColor SoLazyElement::getDefaultEmissive (  )  [inline, static]

Specify Open Inventor defaults for colors, etc.

static int32_t SoLazyElement::getDefaultLightModel (  )  [inline, static]

Specify Open Inventor defaults for colors, etc.

static float SoLazyElement::getDefaultLineWidth (  )  [inline, static]

Specify Open Inventor defaults for colors, etc.

static uint32_t SoLazyElement::getDefaultPacked (  )  [inline, static]

Specify Open Inventor defaults for colors, etc.

static uint32_t SoLazyElement::getDefaultPackedInternal (  )  [static]

Specify Open Inventor defaults for colors, etc.

static float SoLazyElement::getDefaultShininess (  )  [inline, static]

Specify Open Inventor defaults for colors, etc.

static SbColor SoLazyElement::getDefaultSpecular (  )  [inline, static]

Specify Open Inventor defaults for colors, etc.

static float SoLazyElement::getDefaultTransparency (  )  [inline, static]

Specify Open Inventor defaults for colors, etc.

static SbColor SoLazyElement::getDiffuse ( SoState state,
int  index 
) [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.

static SbColor SoLazyElement::getEmissive ( SoState  )  [static]
static SoLazyElement* SoLazyElement::getInstance ( SoState state  )  [inline, static]

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.

static int32_t SoLazyElement::getLightModel ( SoState  )  [static]
int32_t SoLazyElement::getNumColorIndices (  )  const [inline]

Method to inquire about current colors.

int32_t SoLazyElement::getNumDiffuse (  )  const [inline]

Method to inquire about current colors.

int32_t SoLazyElement::getNumTransparencies (  )  const [inline]

Method to inquire about current colors.

static const uint32_t* SoLazyElement::getPackedColors ( SoState state  )  [static]
static float SoLazyElement::getShininess ( SoState  )  [static]
static SbBool SoLazyElement::getSmoothing ( SoState  )  [static]
static SbColor SoLazyElement::getSpecular ( SoState  )  [static]
static float SoLazyElement::getTransparency ( SoState ,
int  index 
) [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.

SbBool SoLazyElement::isPacked (  )  const [inline]

Method to inquire about current colors.

SbBool SoLazyElement::isTransparent (  )  const

Method to inquire about current colors.

virtual void SoLazyElement::print ( FILE *  fp  )  const [virtual]

Prints element (for debugging).

Reimplemented from SoElement.

virtual void SoLazyElement::push ( SoState state  )  [virtual]

push (for non-GL elements)

Reimplemented from SoElement.

Reimplemented in SoGLLazyElement.

static void SoLazyElement::setAmbient ( SoState state,
SoNode node,
const SbColor color 
) [static]
static SoDEPRECATED void SoLazyElement::setAmbient ( SoState state,
SoNode node,
const SbColor color 
) [inline, static]
static void SoLazyElement::setBlending ( SoState state,
SbBool  value 
) [static]
static void SoLazyElement::setColorIndices ( SoState state,
SoNode node,
int32_t  numIndices,
const int32_t *  indices 
) [static]

Static set method.

static void SoLazyElement::setColorMaterial ( SoState state,
SoNode node,
SbBool  value 
) [static]
static void SoLazyElement::setDiffuse ( SoState state,
SoNode node,
int32_t  numColors,
const SbColor colors,
SoColorPacker cPacker 
) [static]

Static set method.

static void SoLazyElement::setEmissive ( SoState state,
SoNode node,
const SbColor color 
) [static]
static SoDEPRECATED void SoLazyElement::setEmissive ( SoState state,
SoNode node,
const SbColor color 
) [inline, static]
static void SoLazyElement::setLightModel ( SoState state,
const int32_t  model 
) [static]
static void SoLazyElement::setPacked ( SoState state,
SoNode node,
SoColorPacker cPacker,
int32_t  numColors,
const uint32_t *  colors 
) [static]

Static set method.

static void SoLazyElement::setShininess ( SoState state,
SoNode node,
float  value 
) [static]
static void SoLazyElement::setSmoothing ( SoState state,
SbBool  value 
) [static]
static void SoLazyElement::setSpecular ( SoState state,
SoNode node,
const SbColor color 
) [static]
static SoDEPRECATED void SoLazyElement::setSpecular ( SoState state,
SoNode node,
const SbColor color 
) [inline, static]
static void SoLazyElement::setTransparency ( SoState state,
SoNode node,
int32_t  numTransp,
const float *  transp,
SoColorPacker cPacker 
) [static]

Static set method.


The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 28 Oct 2019
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/