1SoMaterial(3IV)()                                            SoMaterial(3IV)()
2
3
4

NAME

6       SoMaterial — surface material definition node
7

INHERITS FROM

9       SoBase > SoFieldContainer > SoNode > SoMaterial
10

SYNOPSIS

12       #include <Inventor/nodes/SoMaterial.h>
13
14          Fields from class SoMaterial:
15
16     SoMFColor           ambientColor
17     SoMFColor           diffuseColor
18     SoMFColor           specularColor
19     SoMFColor           emissiveColor
20     SoMFFloat           shininess
21     SoMFFloat           transparency
22
23          Methods from class SoMaterial:
24
25                         SoMaterial()
26     static SoType       getClassTypeId()
27
28          Methods from class SoNode:
29
30     void                setOverride(SbBool state)
31     SbBool              isOverride() const
32     SoNode *            copy(SbBool copyConnections = FALSE) const
33     virtual SbBool      affectsState() const
34     static SoNode *     getByName(const SbName &name)
35     static int          getByName(const SbName &name, SoNodeList &list)
36
37          Methods from class SoFieldContainer:
38
39     void                setToDefaults()
40     SbBool              hasDefaultValues() const
41     SbBool              fieldsAreEqual(const SoFieldContainer *fc) const
42     void                copyFieldValues(const  SoFieldContainer  *fc,  SbBool
43                              copyConnections = FALSE)
44     SbBool              set(const char *fieldDataString)
45     void                get(SbString &fieldDataString)
46     virtual int         getFields(SoFieldList &resultList) const
47     virtual SoField *   getField(const SbName &fieldName) const
48     SbBool              getFieldName(const SoField *field, SbName &fieldName)
49                              const
50     SbBool              isNotifyEnabled() const
51     SbBool              enableNotify(SbBool flag)
52
53          Methods from class SoBase:
54
55     void                ref()
56     void                unref() const
57     void                unrefNoDelete() const
58     void                touch()
59     virtual SoType      getTypeId() const
60     SbBool              isOfType(SoType type) const
61     virtual void        setName(const SbName &name)
62     virtual SbName      getName() const
63
64

DESCRIPTION

66       This  node defines the current surface material properties for all sub‐
67       sequent shapes. SoMaterial sets several components of the current mate‐
68       rial during traversal.
69
70       Multiple values can be specified for the diffuseColor and transparency.
71       Different shapes interpret materials with multiple values  differently.
72       To bind materials to shapes, use an SoMaterialBinding node.
73

FIELDS

75     SoMFColor           ambientColor
76          Ambient color of the surface.
77
78     SoMFColor           diffuseColor
79          Diffuse color(s) of the surface.
80
81     SoMFColor           specularColor
82          Specular color of the surface.
83
84     SoMFColor           emissiveColor
85          Emissive color of the surface.
86
87     SoMFFloat           shininess
88          Shininess  coefficient of the surface. Values can range from 0.0 for
89          no shininess (a diffuse surface) to 1.0  for  maximum  shininess  (a
90          highly polished surface).
91
92     SoMFFloat           transparency
93          Transparency  value(s) of the surface. Values can range from 0.0 for
94          opaque surfaces to 1.0 for completely transparent surfaces.  If  the
95          transparency  type  is  SoGLRenderAction::SCREEN_DOOR  then only the
96          first transparency value  will  be  used.  With  other  transparency
97          types,  multiple transparencies will be used, if the SoMaterial node
98          contains as many transparencies as diffuse colors. If there are  not
99          as  many  transparencies  as  diffuse  colors, only the first trans‐
100          parency will be used.
101
102

METHODS

104                         SoMaterial()
105          Creates a material 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 ambient color, the diffuse color, the specular  color,  the
114          emissive  color,  the shininess, and the transparency of the current
115          material.
116
117

FILE FORMAT/DEFAULTS

119       Material {
120          ambientColor   0.2 0.2 0.2
121          diffuseColor   0.8 0.8 0.8
122          specularColor  0 0 0
123          emissiveColor  0 0 0
124          shininess      0.2
125          transparency   0
126     }
127

SEE ALSO

129       SoBaseColor, SoLightModel, SoMaterialBinding, SoPackedColor
130
131
132
133
134                                                             SoMaterial(3IV)()
Impressum