NAME SoEnvironment SoEnv SO_ENV_ { global environment node }

INCLUDE nodes/SoEnvironment.h

DESC {

This node describes global environmental attributes such as ambient
lighting, light attenuation, and fog.
\p
Ambient lighting is the amount of extra light impinging on each
surface point when the lighting model is Phong (see \cSoLightModel\.).
\p
Light attenuation affects all subsequent lights in a scene (see
\cSoLight\.). It is a quadratic function of distance from a light
source to a surface point.  The three coefficients are specified in
the \vattenuation\. field.  Attenuation works only for light sources
with a fixed location, such as point and spot lights.
\p
Fog has one of four types, each of which blends each surface point
with the specified fog color. Each type interprets the \vvisibility\.
field to be the distance at which fog totally obscures objects. A
\vvisibility\. value of 0 (the default) causes the \cSoEnvironment\.
node to set up fog so that the visibility is the distance to the far
clipping plane of the current camera.
\p
Note that this node has effect only during rendering, and that it
does not inherit field values from other \cSoEnvironment\. nodes.
}

ENUM FogType {
    NONE	"No fog",
    HAZE	"Linear increase in opacity with distance",
    FOG		"Exponential increase in opacity",
    SMOKE	"Exponential squared increase in opacity"
}

FIELD ambientIntensity {}
FIELD ambientColor {
Intensity and RGB color of ambient lighting (for Phong lighting).
}

FIELD attenuation {
Squared, linear, and constant light attenuation coefficients (in that
order) with respect to distance of light from surface (for Phong
lighting).
}

FIELD fogType {}
FIELD fogColor {}
FIELD fogVisibility {
Type of fog, color of fog, and visibility distance, which is the
distance at which fog totally obscures objects.
}

METHOD "" SoEnvironment() {
Creates an environment node with default settings.
}

METHOD "" static SoType getClassTypeId() {
Returns type identifier for this class.
}

ACTION SoGLRenderAction {
Sets the current environment parameters to those specified with this node.
Successive geometries will be rendered using this environment.
}

ALSO { SoLight, SoLightModel }
