Global environment node. More...
#include <Inventor/nodes/SoEnvironment.h>
Public Types | |
enum | FogType { NONE, HAZE, FOG, SMOKE } |
Public Member Functions | |
virtual SoType | getTypeId () const |
SoEnvironment () | |
virtual void | setOverride (const SbBool state) |
virtual SbBool | isOverride () const |
Static Public Member Functions | |
static SoType | getClassTypeId () |
Public Attributes | |
SoSFFloat | ambientIntensity |
SoSFColor | ambientColor |
SoSFVec3f | attenuation |
SoSFEnum | fogType |
SoSFColor | fogColor |
SoSFFloat | fogStart |
SoSFFloat | fogVisibility |
Global environment node.
This node describes global environmental attributes such as ambient lighting, light attenuation, and fog.
Ambient lighting is the amount of extra light impinging on each surface point when the lighting model is Phong (see SoLightModel).
Light attenuation affects all subsequent lights in a scene (see SoLight). It is a quadratic function of distance from a light source to a surface point. The three coefficients are specified in the attenuation field. Attenuation works only for light sources with a fixed location, such as point and spot lights.
Fog has one of four types, each of which blends each surface point with the specified fog color. Each type interprets the fogVisibility field to be the distance at which fog totally obscures objects. A fogVisibility value of 0 (the default) causes the SoEnvironment node to set up fog so that the visibility is the distance to the far clipping plane of the current camera. Using a fog of type HAZE results in a linear fog between the fogStart value and the fogVisibility value.
Note that this node has effect only during rendering.
ambientIntensity | 0.2 |
ambientColor | 1 1 1 |
attenuation | 0 0 1 |
fogType | NONE |
fogColor | 1 1 1 |
fogStart | 0 |
fogVisibility | 0 |
SoEnvironment::SoEnvironment | ( | ) |
Creates an environment node with default settings.
static SoType SoEnvironment::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from SoNode.
virtual SoType SoEnvironment::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from SoNode.
virtual SbBool SoEnvironment::isOverride | ( | ) | const [inline, virtual] |
Returns the state of the override field.
Reimplemented from SoNode.
virtual void SoEnvironment::setOverride | ( | const SbBool | state | ) | [inline, virtual] |
RGB color of ambient lighting (for Phong lighting).
Default is 1, 1, 1.
Intensity of ambient lighting (for Phong lighting).
Default is 0.2.
Squared, linear, and constant light attenuation coefficients (in that order) with respect to distance of light from surface (for Phong lighting).
Default is 0, 0, 1.
Fog color.
Default is 1, 1, 1.
Distance at which the linear fog HAZE starts to be applied.
Between fogStart and fogVisibility, the HAZE fog is linear, and beyond the fogVisibility distance, the fog totally obscures objects. This field has no effect on other types of fog. Default is 0.
Type of fog.
Use enum FogType. Default is NONE.
Fog visibility distance, which is the distance at which fog totally obscures objects.
Default is 0. A value of 0 (the default) causes the SoEnvironment node to set up fog so that the visibility is the distance to the far clipping plane of the current camera.