1SoMaterialBinding(3IV)()                              SoMaterialBinding(3IV)()
2
3
4

NAME

6       SoMaterialBinding  —  node  that  specifies  how multiple materials are
7       bound to shapes
8

INHERITS FROM

10       SoBase > SoFieldContainer > SoNode > SoMaterialBinding
11

SYNOPSIS

13       #include <Inventor/nodes/SoMaterialBinding.h>
14
15     enum Binding {
16          SoMaterialBinding::OVERALL   Whole object has same material
17          SoMaterialBinding::PER_PART  One material for each part of object
18          SoMaterialBinding::PER_PART_INDEXED
19                                       One material for each part, indexed
20          SoMaterialBinding::PER_FACE  One material for each face of object
21          SoMaterialBinding::PER_FACE_INDEXED
22                                       One material for each face, indexed
23          SoMaterialBinding::PER_VERTEX
24                                       One material for each vertex of object
25          SoMaterialBinding::PER_VERTEX_INDEXED
26                                       One material for each vertex, indexed
27     }
28
29          Fields from class SoMaterialBinding:
30
31     SoSFEnum            value
32
33          Methods from class SoMaterialBinding:
34
35                         SoMaterialBinding()
36     static SoType       getClassTypeId()
37
38          Methods from class SoNode:
39
40     void                setOverride(SbBool state)
41     SbBool              isOverride() const
42     SoNode *            copy(SbBool copyConnections = FALSE) const
43     virtual SbBool      affectsState() const
44     static SoNode *     getByName(const SbName &name)
45     static int          getByName(const SbName &name, SoNodeList &list)
46
47          Methods from class SoFieldContainer:
48
49     void                setToDefaults()
50     SbBool              hasDefaultValues() const
51     SbBool              fieldsAreEqual(const SoFieldContainer *fc) const
52     void                copyFieldValues(const  SoFieldContainer  *fc,  SbBool
53                              copyConnections = FALSE)
54     SbBool              set(const char *fieldDataString)
55     void                get(SbString &fieldDataString)
56     virtual int         getFields(SoFieldList &resultList) const
57     virtual SoField *   getField(const SbName &fieldName) const
58     SbBool              getFieldName(const SoField *field, SbName &fieldName)
59                              const
60     SbBool              isNotifyEnabled() const
61     SbBool              enableNotify(SbBool flag)
62
63          Methods from class SoBase:
64
65     void                ref()
66     void                unref() const
67     void                unrefNoDelete() const
68     void                touch()
69     virtual SoType      getTypeId() const
70     SbBool              isOfType(SoType type) const
71     virtual void        setName(const SbName &name)
72     virtual SbName      getName() const
73
74

DESCRIPTION

76       This node specifies how the current materials are bound to shapes  that
77       follow  in the scene graph. Each shape node may interpret bindings dif‐
78       ferently. The current material  always  has  a  base  value,  which  is
79       defined  by  the  first  value  of  all material fields. Since material
80       fields may have multiple values, the binding determines how these  val‐
81       ues are distributed over a shape.
82
83       The bindings for faces and vertices are meaningful only for shapes that
84       are made from faces and vertices. Similarly, the indexed  bindings  are
85       only used by the shapes that allow indexing.
86
87       The  bindings  apply  only  to  diffuse colors and transparency.  Other
88       materials (emissive, specular, ambient, shininess) will have the  first
89       value  applied  to the entire shape, regardless of the material binding
90       or the number provided.
91
92       If the number of transparencies is less than the number of diffuse col‐
93       ors,  only the first transparency value will be used, regardless of the
94       material binding. If the number of diffuse colors in the state is  less
95       than the number required for the given binding, a debug warning will be
96       printed and unpredictable colors will result.
97

FIELDS

99     SoSFEnum            value
100          Specifies how to bind materials to shapes.
101
102

METHODS

104                         SoMaterialBinding()
105          Creates a material binding node with default settings.
106
107     static SoType       getClassTypeId()
108          Returns type identifier for this class.
109
110

ACTION BEHAVIOR

112       SoGLRenderAction, SoCallbackAction
113          Sets the current material binding type.
114
115

FILE FORMAT/DEFAULTS

117       MaterialBinding {
118          value  OVERALL
119     }
120

SEE ALSO

122       SoMaterial, SoNormalBinding, SoShape, SoTextureCoordinateBinding
123
124
125
126
127                                                      SoMaterialBinding(3IV)()
Impressum