Open Inventor Reference
SoShapeStyleElement Class Reference

This elements stores some information shapes need to quickly determine whether or not they should render, and, if they should render, how they should render. More...

#include <Inventor/elements/SoShapeStyleElement.h>

Inheritance diagram for SoShapeStyleElement:
SoElement

Public Member Functions

bool mightNotRender () const
 Returns TRUE if shapes may not render for some reason:
 
bool needNormals () const
 Returns TRUE if need normals:
 
bool needTexCoords () const
 Returns TRUE if need texture coordinates:
 
int getRenderCaseMask () const
 Returns a mask that can be used by the SoVertexPropertyCache class (see SoVertexProperty.h for the SoRenderInfo class) to quickly mask out the normal or texture coordinate cases if normals or texture coordinates aren't needed.
 
bool isTextureFunction () const
 
virtual void init (SoState *state)
 Initializes element.
 
virtual bool matches (const SoElement *elt) const
 Returns TRUE if the element matches another element (of the same class, presumably) with respect to cache validity.
 
virtual void push (SoState *state)
 Pushes/pops element.
 
virtual SoElementcopyMatchInfo () const
 Create a copy that we can put in a cache used list and call matches() on later.
 
virtual void print (FILE *fp) const
 Prints element (for debugging)
 
- Public Member Functions inherited from SoElement
virtual void init (SoState *state)
 Initializes element.
 
virtual void push (SoState *state)
 Pushes/pops element.
 
virtual void pop (SoState *state, const SoElement *prevTopElement)
 
virtual void print (FILE *fp) const
 Prints element (for debugging)
 
virtual bool matches (const SoElement *elt) const =0
 Returns TRUE if the element matches another element (of the same class, presumably) with respect to cache validity.
 
virtual SoElementcopyMatchInfo () const =0
 Create a copy that we can put in a cache used list and call matches() on later.
 
SoType getTypeId () const
 Returns type identifier for element instance.
 
int getStackIndex () const
 Returns the stack index for an element instance.
 
void setDepth (int dpth)
 Sets stuff in an element instance.
 
void setNext (SoElement *nxt)
 
void setNextInStack (SoElement *nxt)
 
void setNextFree (SoElement *nxt)
 
int getDepth () const
 Returns stuff from element instance.
 
SoElementgetNext () const
 
virtual ~SoElement ()
 Destructor.
 

Static Public Member Functions

static const SoShapeStyleElementget (SoState *state)
 API USED BY SHAPES:
 
static void setDrawStyle (SoState *state, int32_t value)
 API USED BY OTHER ELEMENTS:
 
static void setComplexityType (SoState *state, int32_t value)
 
static void setTransparencyType (SoState *state, int32_t value)
 
static void setTextureEnabled (SoState *state, bool value)
 
static void setTextureFunction (SoState *state, bool value)
 
static void setLightModel (SoState *state, int32_t value)
 
static void setOverrides (SoState *state, bool value)
 Set value is TRUE if either diffuse, transparency, or materialbinding are overridden; otherwise FALSE.
 
static bool isScreenDoor (SoState *state)
 
static void initClass ()
 
- Static Public Member Functions inherited from SoElement
static SoType getClassTypeId ()
 Returns type identifier for SoElement class.
 
static void initElements ()
 Initialize ALL Inventor element classes.
 
static void initClass ()
 Initializes the SoElement class.
 
static int getNumStackIndices ()
 Returns the number of stack indices allocated.
 
static SoType getIdFromStackIndex (int stackIndex)
 Returns the id for the element with the given stack index.
 

Protected Member Functions

virtual ~SoShapeStyleElement ()
 
- Protected Member Functions inherited from SoElement
 SoElement ()
 Constructor; use typeId.createInstance to create elements.
 
void capture (SoState *state) const
 Does whatever is necessary in state to capture this element for caching purposes.
 
virtual void captureThis (SoState *state) const
 Really captures this element, once it has been determined that a cache is open to capture it.
 
void setTypeId (SoType id)
 Sets typeId in instance.
 
void setStackIndex (int index)
 Sets stackIndex in instance.
 
SoElementgetNextInStack () const
 Returns next instance in specific element stack.
 
SoElementgetNextFree () const
 Returns next free element in a specific element stack.
 

Additional Inherited Members

- Static Protected Member Functions inherited from SoElement
static SoElementgetElement (SoState *state, int stackIndex)
 Returns an instance of an element from the stack with the given index in the given state.
 
static const SoElementgetConstElement (SoState *state, int stackIndex)
 Returns a read-only pointer to the top instance in the given element stack.
 
static int createStackIndex (SoType id)
 Creates and returns a new stack index.
 
- Static Protected Attributes inherited from SoElement
static int classStackIndex
 Stack index for SoElement class.
 

Detailed Description

Specifically, it stores:

NeedNormals: TRUE if lighting is on NeedTexCoords: TRUE if texturing and texcoords not generated by GL

MightNotRender: TRUE if: – bounding box complexity – invisible drawstyle – render abort callback registered

Definition at line 93 of file SoShapeStyleElement.h.

Constructor & Destructor Documentation

◆ ~SoShapeStyleElement()

virtual SoShapeStyleElement::~SoShapeStyleElement ( )
protectedvirtual

Member Function Documentation

◆ copyMatchInfo()

virtual SoElement * SoShapeStyleElement::copyMatchInfo ( ) const
virtual

Implements SoElement.

◆ get()

static const SoShapeStyleElement * SoShapeStyleElement::get ( SoState state)
static

Get a readable instance:

◆ getRenderCaseMask()

int SoShapeStyleElement::getRenderCaseMask ( ) const
inline

◆ init()

virtual void SoShapeStyleElement::init ( SoState state)
virtual

Called for first element of its kind in stack. Default method does nothing.

Reimplemented from SoElement.

◆ initClass()

static void SoShapeStyleElement::initClass ( )
static

◆ isScreenDoor()

static bool SoShapeStyleElement::isScreenDoor ( SoState state)
static

◆ isTextureFunction()

bool SoShapeStyleElement::isTextureFunction ( ) const
inline

Definition at line 138 of file SoShapeStyleElement.h.

◆ matches()

virtual bool SoShapeStyleElement::matches ( const SoElement elt) const
virtual

If you write a matches() method, you must also write a copy() method.

Implements SoElement.

◆ mightNotRender()

bool SoShapeStyleElement::mightNotRender ( ) const
inline

Definition at line 107 of file SoShapeStyleElement.h.

◆ needNormals()

bool SoShapeStyleElement::needNormals ( ) const
inline

Definition at line 110 of file SoShapeStyleElement.h.

Referenced by SoVertexPropertyCache::shouldGenerateNormals().

◆ needTexCoords()

bool SoShapeStyleElement::needTexCoords ( ) const
inline

◆ print()

virtual void SoShapeStyleElement::print ( FILE *  fp) const
virtual

Reimplemented from SoElement.

◆ push()

virtual void SoShapeStyleElement::push ( SoState state)
virtual

Allows for side effects to occur. Default methods do nothing.

Reimplemented from SoElement.

◆ setComplexityType()

static void SoShapeStyleElement::setComplexityType ( SoState state,
int32_t  value 
)
static

◆ setDrawStyle()

static void SoShapeStyleElement::setDrawStyle ( SoState state,
int32_t  value 
)
static

◆ setLightModel()

static void SoShapeStyleElement::setLightModel ( SoState state,
int32_t  value 
)
static

◆ setOverrides()

static void SoShapeStyleElement::setOverrides ( SoState state,
bool  value 
)
static

◆ setTextureEnabled()

static void SoShapeStyleElement::setTextureEnabled ( SoState state,
bool  value 
)
static

◆ setTextureFunction()

static void SoShapeStyleElement::setTextureFunction ( SoState state,
bool  value 
)
static

◆ setTransparencyType()

static void SoShapeStyleElement::setTransparencyType ( SoState state,
int32_t  value 
)
static

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