Open Inventor Release 2024.1.0
 
Loading...
Searching...
No Matches
SoShapeStyleElement Class Reference

Stores some information used by shapes. More...

#include <Inventor/elements/SoShapeStyleElement.h>

+ Inheritance diagram for SoShapeStyleElement:

Public Types

enum  flags {
  INVISIBLE_BIT = 0x1 ,
  BBOX_BIT = 0x2 ,
  DELAY_TRANSP_BIT = 0x4
}
 flags More...
 

Public Member Functions

virtual void push (SoState *state)
 Pushes element.
 
virtual void pop (SoState *state, const SoElement *prevTopElement)
 Pops element.
 
SbBool mightNotRender () const
 Returns TRUE if shapes may not render for some reason.
 
SbBool needNormals () const
 Returns TRUE if need normals.
 
SbBool needTangents () const
 Returns TRUE if need tangents.
 
SbBool needTexCoords (int unit=0) const
 Returns TRUE if need texture coordinates.
 
SbBool needTexCoords3 (int unit=0) const
 Returns TRUE if need 3D 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.
 
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 const SoShapeStyleElementget (SoState *state)
 Get a readable instance.
 
static void setDrawStyle (SoState *state, int32_t value)
 API used by other elements.
 
static void setComplexityType (SoState *state, int32_t value)
 API used by other elements.
 
static void setTransparencyType (SoState *state, int32_t value)
 API used by other elements.
 
static void setTextureEnabled (SoState *state, SbBool value, int unit=0)
 API used by other elements.
 
static void setTexture3Enabled (SoState *state, SbBool value, int unit=0)
 API used by other elements.
 
static void setTextureFunction (SoState *state, SbBool value, int unit=0)
 API used by other elements.
 
static void setLightModel (SoState *state, int32_t value)
 API used by other elements.
 
static void setOverrides (SoState *state, SbBool value)
 Set value is TRUE if either diffuse, transparency, or materialbinding are overridden; otherwise FALSE.
 
- 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.
 

Detailed Description

Stores some information used by shapes.

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. Specifically, it stores:

NeedNormals: TRUE if lighting is on
NeedTangents: 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

SEE ALSO

Definition at line 83 of file SoShapeStyleElement.h.

Member Enumeration Documentation

◆ flags

flags

Enumerator
INVISIBLE_BIT 

INVISIBLE_BIT.

BBOX_BIT 

BBOX_BIT.

DELAY_TRANSP_BIT 

DELAY_TRANSP_BIT.

Definition at line 90 of file SoShapeStyleElement.h.

Member Function Documentation

◆ get()

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

Get a readable instance.

◆ getClassStackIndex()

static int SoShapeStyleElement::getClassStackIndex ( )
static

Returns the stack id for this element.


◆ getClassTypeId()

static SoType SoShapeStyleElement::getClassTypeId ( )
static

Returns the type identifier for this class.


◆ getRenderCaseMask()

int SoShapeStyleElement::getRenderCaseMask ( ) const
inline

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.

Definition at line 144 of file SoShapeStyleElement.h.

◆ mightNotRender()

SbBool SoShapeStyleElement::mightNotRender ( ) const
inline

Returns TRUE if shapes may not render for some reason.

Definition at line 113 of file SoShapeStyleElement.h.

◆ needNormals()

SbBool SoShapeStyleElement::needNormals ( ) const
inline

Returns TRUE if need normals.

Definition at line 118 of file SoShapeStyleElement.h.

◆ needTangents()

SbBool SoShapeStyleElement::needTangents ( ) const
inline

Returns TRUE if need tangents.

Definition at line 123 of file SoShapeStyleElement.h.

◆ needTexCoords()

SbBool SoShapeStyleElement::needTexCoords ( int  unit = 0) const

Returns TRUE if need texture coordinates.

◆ needTexCoords3()

SbBool SoShapeStyleElement::needTexCoords3 ( int  unit = 0) const

Returns TRUE if need 3D texture coordinates.

◆ pop()

virtual void SoShapeStyleElement::pop ( SoState state,
const SoElement prevTopElement 
)
virtual

Pops element.

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

Reimplemented from SoElement.

◆ print()

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

Prints element (for debugging).

Reimplemented from SoElement.

◆ push()

virtual void SoShapeStyleElement::push ( SoState state)
virtual

Pushes element.

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

Reimplemented from SoElement.

◆ setComplexityType()

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

API used by other elements.

◆ setDrawStyle()

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

API used by other elements.

◆ setLightModel()

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

API used by other elements.

◆ setOverrides()

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

Set value is TRUE if either diffuse, transparency, or materialbinding are overridden; otherwise FALSE.

◆ setTexture3Enabled()

static void SoShapeStyleElement::setTexture3Enabled ( SoState state,
SbBool  value,
int  unit = 0 
)
static

API used by other elements.

◆ setTextureEnabled()

static void SoShapeStyleElement::setTextureEnabled ( SoState state,
SbBool  value,
int  unit = 0 
)
static

API used by other elements.

◆ setTextureFunction()

static void SoShapeStyleElement::setTextureFunction ( SoState state,
SbBool  value,
int  unit = 0 
)
static

API used by other elements.

◆ setTransparencyType()

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

API used by other elements.


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