Open Inventor Reference
|
Node that specifies how multiple materials are bound to shapes. More...
#include <Inventor/nodes/SoMaterialBinding.h>
Public Types | |
enum | Binding { OVERALL = SoMaterialBindingElement::OVERALL, PER_PART = SoMaterialBindingElement::PER_PART, PER_PART_INDEXED = SoMaterialBindingElement::PER_PART_INDEXED, PER_FACE = SoMaterialBindingElement::PER_FACE, PER_FACE_INDEXED = SoMaterialBindingElement::PER_FACE_INDEXED, PER_VERTEX = SoMaterialBindingElement::PER_VERTEX, PER_VERTEX_INDEXED = SoMaterialBindingElement::PER_VERTEX_INDEXED, DEFAULT = OVERALL, NONE = OVERALL } |
Public Member Functions | |
SoMaterialBinding () | |
Creates a material binding node with default settings. | |
virtual void | doAction (SoAction *action) |
This method performs the "typical" operation of a node for any action. | |
virtual void | GLRender (SoGLRenderAction *action) |
These virtual functions implement all of the actions for nodes, Most of the default implementations do nothing. | |
virtual void | callback (SoCallbackAction *action) |
virtual void | pick (SoPickAction *action) |
Static Public Member Functions | |
static void | initClass () |
Initializes base node class. | |
Public Attributes | |
Fields | |
SoSFEnum | value |
Specifies how to bind materials to shapes. | |
Protected Member Functions | |
virtual | ~SoMaterialBinding () |
virtual SbBool | readInstance (SoInput *in, unsigned short flags) |
Reads stuff into instance. Upgrades old bindings. |
This node specifies how the current materials are bound to shapes that follow in the scene graph. Each shape node may interpret bindings differently. The current material always has a base value, which is defined by the first value of all material fields. Since material fields may have multiple values, the binding determines how these values are distributed over a shape.
The bindings for faces and vertices are meaningful only for shapes that are made from faces and vertices. Similarly, the indexed bindings are only used by the shapes that allow indexing.
The bindings apply only to diffuse colors and transparency. Other materials (emissive, specular, ambient, shininess) will have the first value applied to the entire shape, regardless of the material binding or the number provided.
If the number of transparencies is less than the number of diffuse colors, only the first transparency value will be used, regardless of the material binding. If the number of diffuse colors in the state is less than the number required for the given binding, a debug warning will be printed and unpredictable colors will result.
Definition at line 113 of file SoMaterialBinding.h.
Definition at line 118 of file SoMaterialBinding.h.
SoMaterialBinding::SoMaterialBinding | ( | ) |
virtual SoMaterialBinding::~SoMaterialBinding | ( | ) | [protected, virtual] |
virtual void SoMaterialBinding::callback | ( | SoCallbackAction * | action | ) | [virtual] |
Reimplemented from SoNode.
virtual void SoMaterialBinding::doAction | ( | SoAction * | action | ) | [virtual] |
The default implementation does nothing.
Reimplemented from SoNode.
virtual void SoMaterialBinding::GLRender | ( | SoGLRenderAction * | action | ) | [virtual] |
Reimplemented from SoNode.
static void SoMaterialBinding::initClass | ( | ) | [static] |
Reimplemented from SoNode.
virtual void SoMaterialBinding::pick | ( | SoPickAction * | action | ) | [virtual] |
Reimplemented from SoNode.
virtual SbBool SoMaterialBinding::readInstance | ( | SoInput * | in, |
unsigned short | flags | ||
) | [protected, virtual] |
Reimplemented from SoFieldContainer.
Definition at line 145 of file SoMaterialBinding.h.