| 1 |
NAME SoEnvironment SoEnv SO_ENV_ { global environment node } |
| 2 |
|
| 3 |
INCLUDE nodes/SoEnvironment.h |
| 4 |
|
| 5 |
DESC { |
| 6 |
|
| 7 |
This node describes global environmental attributes such as ambient |
| 8 |
lighting, light attenuation, and fog. |
| 9 |
\p |
| 10 |
Ambient lighting is the amount of extra light impinging on each |
| 11 |
surface point when the lighting model is Phong (see \cSoLightModel\.). |
| 12 |
\p |
| 13 |
Light attenuation affects all subsequent lights in a scene (see |
| 14 |
\cSoLight\.). It is a quadratic function of distance from a light |
| 15 |
source to a surface point. The three coefficients are specified in |
| 16 |
the \vattenuation\. field. Attenuation works only for light sources |
| 17 |
with a fixed location, such as point and spot lights. |
| 18 |
\p |
| 19 |
Fog has one of four types, each of which blends each surface point |
| 20 |
with the specified fog color. Each type interprets the \vvisibility\. |
| 21 |
field to be the distance at which fog totally obscures objects. A |
| 22 |
\vvisibility\. value of 0 (the default) causes the \cSoEnvironment\. |
| 23 |
node to set up fog so that the visibility is the distance to the far |
| 24 |
clipping plane of the current camera. |
| 25 |
\p |
| 26 |
Note that this node has effect only during rendering, and that it |
| 27 |
does not inherit field values from other \cSoEnvironment\. nodes. |
| 28 |
} |
| 29 |
|
| 30 |
ENUM FogType { |
| 31 |
NONE "No fog", |
| 32 |
HAZE "Linear increase in opacity with distance", |
| 33 |
FOG "Exponential increase in opacity", |
| 34 |
SMOKE "Exponential squared increase in opacity" |
| 35 |
} |
| 36 |
|
| 37 |
FIELD ambientIntensity {} |
| 38 |
FIELD ambientColor { |
| 39 |
Intensity and RGB color of ambient lighting (for Phong lighting). |
| 40 |
} |
| 41 |
|
| 42 |
FIELD attenuation { |
| 43 |
Squared, linear, and constant light attenuation coefficients (in that |
| 44 |
order) with respect to distance of light from surface (for Phong |
| 45 |
lighting). |
| 46 |
} |
| 47 |
|
| 48 |
FIELD fogType {} |
| 49 |
FIELD fogColor {} |
| 50 |
FIELD fogVisibility { |
| 51 |
Type of fog, color of fog, and visibility distance, which is the |
| 52 |
distance at which fog totally obscures objects. |
| 53 |
} |
| 54 |
|
| 55 |
METHOD "" SoEnvironment() { |
| 56 |
Creates an environment node with default settings. |
| 57 |
} |
| 58 |
|
| 59 |
METHOD "" static SoType getClassTypeId() { |
| 60 |
Returns type identifier for this class. |
| 61 |
} |
| 62 |
|
| 63 |
ACTION SoGLRenderAction { |
| 64 |
Sets the current environment parameters to those specified with this node. |
| 65 |
Successive geometries will be rendered using this environment. |
| 66 |
} |
| 67 |
|
| 68 |
ALSO { SoLight, SoLightModel } |