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: More...
 
bool needNormals () const
 Returns TRUE if need normals: More...
 
bool needTexCoords () const
 Returns TRUE if need texture coordinates: More...
 
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. More...
 
bool isTextureFunction () const
 
virtual void init (SoState *state)
 Initializes element. More...
 
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. More...
 
virtual void push (SoState *state)
 Pushes/pops element. More...
 
virtual SoElementcopyMatchInfo () const
 Create a copy that we can put in a cache used list and call matches() on later. More...
 
virtual void print (FILE *fp) const
 Prints element (for debugging) More...
 
- Public Member Functions inherited from SoElement
virtual void pop (SoState *state, const SoElement *prevTopElement)
 
SoType getTypeId () const
 Returns type identifier for element instance. More...
 
int getStackIndex () const
 Returns the stack index for an element instance. More...
 
void setDepth (int dpth)
 Sets stuff in an element instance. More...
 
void setNext (SoElement *nxt)
 
void setNextInStack (SoElement *nxt)
 
void setNextFree (SoElement *nxt)
 
int getDepth () const
 Returns stuff from element instance. More...
 
SoElementgetNext () const
 
virtual ~SoElement ()
 Destructor. More...
 

Static Public Member Functions

static const SoShapeStyleElementget (SoState *state)
 API USED BY SHAPES: More...
 
static void setDrawStyle (SoState *state, int32_t value)
 API USED BY OTHER ELEMENTS: More...
 
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. More...
 
static bool isScreenDoor (SoState *state)
 
static void initClass ()
 
- Static Public Member Functions inherited from SoElement
static SoType getClassTypeId ()
 Returns type identifier for SoElement class. More...
 
static void initElements ()
 Initialize ALL Inventor element classes. More...
 
static void initClass ()
 Initializes the SoElement class. More...
 
static int getNumStackIndices ()
 Returns the number of stack indices allocated. More...
 
static SoType getIdFromStackIndex (int stackIndex)
 Returns the id for the element with the given stack index. More...
 

Protected Member Functions

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

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. More...
 
static const SoElementgetConstElement (SoState *state, int stackIndex)
 Returns a read-only pointer to the top instance in the given element stack. More...
 
static int createStackIndex (SoType id)
 Creates and returns a new stack index. More...
 
- Static Protected Attributes inherited from SoElement
static int classStackIndex
 Stack index for SoElement class. More...
 

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: