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

Stores the current material binding. More...

#include <Inventor/elements/SoMaterialBindingElement.h>

+ Inheritance diagram for SoMaterialBindingElement:

Public Types

enum  Binding {
  OVERALL = SbVertexAttributeBinding::OVERALL ,
  PER_PART = SbVertexAttributeBinding::PER_PART ,
  PER_PART_INDEXED = SbVertexAttributeBinding::PER_PART_INDEXED ,
  PER_FACE = SbVertexAttributeBinding::PER_FACE ,
  PER_FACE_INDEXED = SbVertexAttributeBinding::PER_FACE_INDEXED ,
  PER_VERTEX = SbVertexAttributeBinding::PER_VERTEX ,
  PER_VERTEX_INDEXED = SbVertexAttributeBinding::PER_VERTEX_INDEXED ,
  DEFAULT = OVERALL ,
  NONE = OVERALL
}
 The choice of values is for compatibility with Open Inventor 2.0 binary format files. More...
 

Public Member Functions

virtual void print (FILE *fp) const
 Prints element (for debugging).
 
- Public Member Functions inherited from SoElement
virtual void push (SoState *state)
 Pushes element.
 
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 set (SoState *state, Binding binding)
 Sets the current material binding in the state.
 
static void set (SoState *state, SoNode *, Binding binding)
 Sets the current material binding in the state.
 
static Binding get (SoState *state)
 Returns current material binding from the state.
 
static Binding getDefault ()
 Returns the default material binding.
 
- Static Public Member Functions inherited from SoInt32Element
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
static int getClassStackIndex ()
 Returns the stack id for this element.
 
- 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 the current material binding.

This element stores the current material binding.

SEE ALSO

SoMaterialBinding, SoVertexProperty

Definition at line 68 of file SoMaterialBindingElement.h.

Member Enumeration Documentation

◆ Binding

The choice of values is for compatibility with Open Inventor 2.0 binary format files.

Enumerator
OVERALL 

Whole object has same material.

PER_PART 

One material for each part of object.

PER_PART_INDEXED 

One material for each part, indexed.

PER_FACE 

One material for each face of object.

PER_FACE_INDEXED 

One material for each face, indexed.

PER_VERTEX 

One material for each vertex.

PER_VERTEX_INDEXED 

One material for each vertex, indexed.

DEFAULT 
NONE 

Definition at line 77 of file SoMaterialBindingElement.h.

Member Function Documentation

◆ get()

static Binding SoMaterialBindingElement::get ( SoState state)
inlinestatic

Returns current material binding from the state.

Definition at line 129 of file SoMaterialBindingElement.h.

◆ getClassStackIndex()

static int SoMaterialBindingElement::getClassStackIndex ( )
static

Returns the stack id for this element.


◆ getClassTypeId()

static SoType SoMaterialBindingElement::getClassTypeId ( )
static

Returns the type identifier for this class.


◆ getDefault()

static Binding SoMaterialBindingElement::getDefault ( )
inlinestatic

Returns the default material binding.

Definition at line 135 of file SoMaterialBindingElement.h.

◆ print()

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

Prints element (for debugging).

Reimplemented from SoInt32Element.

◆ set() [1/2]

static void SoMaterialBindingElement::set ( SoState state,
Binding  binding 
)
inlinestatic

Sets the current material binding in the state.

Definition at line 117 of file SoMaterialBindingElement.h.

◆ set() [2/2]

static void SoMaterialBindingElement::set ( SoState state,
SoNode ,
Binding  binding 
)
inlinestatic

Sets the current material binding in the state.

Definition at line 123 of file SoMaterialBindingElement.h.


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