| 1 |
NAME SoMaterial SoMtl "" { surface material definition node } |
| 2 |
|
| 3 |
INCLUDE nodes/SoMaterial.h |
| 4 |
|
| 5 |
DESC { |
| 6 |
This node defines the current surface material properties for all |
| 7 |
subsequent shapes. \cSoMaterial\. sets several components of the |
| 8 |
current material during traversal. |
| 9 |
\p |
| 10 |
Multiple values can be specified for |
| 11 |
the \vdiffuseColor\. and \vtransparency\.. |
| 12 |
Different shapes interpret |
| 13 |
materials with multiple values differently. To bind materials to |
| 14 |
shapes, use an \cSoMaterialBinding\. node. |
| 15 |
} |
| 16 |
|
| 17 |
FIELD ambientColor { Ambient color of the surface. } |
| 18 |
FIELD diffuseColor { Diffuse color(s) of the surface. } |
| 19 |
FIELD specularColor { Specular color of the surface. } |
| 20 |
FIELD emissiveColor { Emissive color of the surface. } |
| 21 |
FIELD shininess { |
| 22 |
Shininess coefficient of the surface. Values can range from 0.0 for |
| 23 |
no shininess (a diffuse surface) to 1.0 for maximum shininess (a |
| 24 |
highly polished surface). |
| 25 |
} |
| 26 |
FIELD transparency { |
| 27 |
Transparency value(s) of the surface. Values can range from 0.0 for |
| 28 |
opaque surfaces to 1.0 for completely transparent surfaces. If the |
| 29 |
transparency type is \cSoGLRenderAction::SCREEN_DOOR\. then only the |
| 30 |
first transparency value will be used. With other transparency types, |
| 31 |
multiple transparencies will be used, if the \cSoMaterial\. node |
| 32 |
contains as many transparencies as diffuse colors. If there are not |
| 33 |
as many transparencies as diffuse colors, only the first transparency |
| 34 |
will be used. |
| 35 |
} |
| 36 |
|
| 37 |
METHOD "" SoMaterial() { Creates a material node with default settings. } |
| 38 |
|
| 39 |
METHOD "" static SoType getClassTypeId() { |
| 40 |
Returns type identifier for this class. |
| 41 |
} |
| 42 |
|
| 43 |
ACTION SoGLRenderAction, SoCallbackAction { |
| 44 |
Sets the ambient color, the diffuse color, the specular color, the |
| 45 |
emissive color, the shininess, and the transparency of the current |
| 46 |
material. |
| 47 |
} |
| 48 |
|
| 49 |
ALSO { |
| 50 |
SoBaseColor, |
| 51 |
SoLightModel, |
| 52 |
SoMaterialBinding, |
| 53 |
SoPackedColor |
| 54 |
} |