50#ifndef _SO_MATERIAL_BINDING_ELEMENT
51#define _SO_MATERIAL_BINDING_ELEMENT
53#include <Inventor/elements/SoSubElement.h>
54#include <Inventor/SbVertexAttributeBinding.h>
68SoEXTENDER_Documented
class SoMaterialBindingElement :
public SoElement {
70 SO_ELEMENT_HEADER(SoMaterialBindingElement);
136 {
set(state, binding); }
177 virtual void init(
SoState *state);
180 SbBool matches(
const SoElement* elt)
const override;
183 SoElement* copyMatchInfo()
const override;
187 static void initClass();
188 static void exitClass();
191 virtual ~SoMaterialBindingElement();
@ PER_FACE
One attribute for each face of object.
@ PER_FACE_INDEXED
One attribute for each face, indexed.
@ PER_PART_INDEXED
One attribute for each part, indexed.
@ PER_VERTEX_INDEXED
One attribute for each vertex, indexed.
@ OVERALL
Whole object has same attribute.
@ PER_PART
One attribute for each part of object.
@ PER_VERTEX
One attribute for each vertex.
static Face getDefaultFace()
Returns the default material binding face.
static Binding get(SoState *state)
Returns the current material binding from the state.
Binding
The choice of values is for compatibility with Open Inventor 2.0 binary format files.
@ PER_VERTEX_INDEXED
One material for each vertex, indexed.
@ OVERALL
Whole object has same material.
@ PER_PART_INDEXED
One material for each part, indexed.
@ PER_VERTEX
One material for each vertex.
@ PER_FACE_INDEXED
One material for each face, indexed.
@ PER_FACE
One material for each face of object.
@ PER_PART
One material for each part of object.
static Binding getDefault()
Returns the default material binding.
static void set(SoState *state, Binding binding)
Sets the current material binding in the state.
static Face getFace(SoState *state)
Returns the current face binding from the state.
Face
Specifies values to apply material on the front face, back face or both front and back face of an obj...
@ FRONT
Applies the material to the front faces of the object.
@ FRONT_AND_BACK
Applies the material to both the front and back faces of the object.
@ BACK
Applies the material to the back faces of the object.
static void setFace(SoState *state, Face face)
Sets the current face binding in the state.
static void set(SoState *state, SoNode *, Binding binding)
Sets the current material binding in the state.
virtual void print(FILE *fp) const
Prints element (for debugging).
void push(SoState *state) override
Pushes element.
Abstract base class for all database nodes.