SoMaterialBinding — node that specifies how multiple materials are bound to shapes
Contents
Action Behavior
SoGLRenderAction,SoCallbackAction
Sets the current material binding type.
Description
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.
Fields
SoSFEnumvalue
Specifies how to bind materials to shapes.
File Format/Defaults
MaterialBinding{valueOVERALL}Inherits From
SoBase > SoFieldContainer > SoNode > SoMaterialBinding
Methods
SoMaterialBinding()
Creates a material binding node with default settings.
staticSoTypegetClassTypeId()
Returns type identifier for this class.
Name
SoMaterialBinding — node that specifies how multiple materials are bound to shapes
See Also
SoMaterial,SoNormalBinding,SoShape,SoTextureCoordinateBindingSoMaterialBinding(3IV)()
Synopsis
#include<Inventor/nodes/SoMaterialBinding.h>enumBinding{SoMaterialBinding::OVERALL Whole object has same material
SoMaterialBinding::PER_PART One material for each part of object
SoMaterialBinding::PER_PART_INDEXED
One material for each part, indexed
SoMaterialBinding::PER_FACE One material for each face of object
SoMaterialBinding::PER_FACE_INDEXED
One material for each face, indexed
SoMaterialBinding::PER_VERTEX
One material for each vertex of object
SoMaterialBinding::PER_VERTEX_INDEXED
One material for each vertex, indexed
}
Fields from class SoMaterialBinding:
SoSFEnumvalue
Methods from class SoMaterialBinding:
SoMaterialBinding()staticSoTypegetClassTypeId()
Methods from class SoNode:
voidsetOverride(SbBoolstate)SbBoolisOverride()constSoNode*copy(SbBoolcopyConnections=FALSE)constvirtualSbBoolaffectsState()conststaticSoNode*getByName(constSbName&name)staticintgetByName(constSbName&name,SoNodeList&list)
Methods from class SoFieldContainer:
voidsetToDefaults()SbBoolhasDefaultValues()constSbBoolfieldsAreEqual(constSoFieldContainer*fc)constvoidcopyFieldValues(constSoFieldContainer*fc,SbBoolcopyConnections=FALSE)SbBoolset(constchar*fieldDataString)voidget(SbString&fieldDataString)virtualintgetFields(SoFieldList&resultList)constvirtualSoField*getField(constSbName&fieldName)constSbBoolgetFieldName(constSoField*field,SbName&fieldName)constSbBoolisNotifyEnabled()constSbBoolenableNotify(SbBoolflag)
Methods from class SoBase:
voidref()voidunref()constvoidunrefNoDelete()constvoidtouch()virtualSoTypegetTypeId()constSbBoolisOfType(SoTypetype)constvirtualvoidsetName(constSbName&name)virtualSbNamegetName()const