Open Inventor Reference
|
Global environment node. More...
#include <Inventor/nodes/SoEnvironment.h>
Public Types | |
enum | FogType { NONE, HAZE, FOG, SMOKE } |
Type of fog: More... | |
Public Member Functions | |
SoEnvironment () | |
Creates an environment node with default settings. | |
virtual void | GLRender (SoGLRenderAction *action) |
These virtual functions implement all of the actions for nodes, Most of the default implementations do nothing. | |
virtual void | callback (SoCallbackAction *action) |
Static Public Member Functions | |
static void | initClass () |
Initializes base node class. | |
Public Attributes | |
SoSFVec3f | attenuation |
SoSFEnum | fogType |
SoSFColor | fogColor |
SoSFFloat | fogVisibility |
Fields | |
SoSFFloat | ambientIntensity |
Intensity and RGB color of ambient lighting (for Phong lighting). | |
SoSFColor | ambientColor |
Intensity and RGB color of ambient lighting (for Phong lighting). | |
Protected Member Functions | |
virtual | ~SoEnvironment () |
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 visibility field to be the distance at which fog totally obscures objects. A visibility 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.
Note that this node has effect only during rendering, and that it does not inherit field values from other SoEnvironment nodes.
Environment { ambientIntensity 0.2 ambientColor 1 1 1 attenuation 0 0 1 fogType NONE fogColor 1 1 1 fogVisibility 0 }
Definition at line 120 of file SoEnvironment.h.
NONE |
No fog. |
HAZE |
Linear increase in opacity with distance. |
FOG |
Exponential increase in opacity. |
SMOKE |
Exponential squared increase in opacity. |
Definition at line 126 of file SoEnvironment.h.
SoEnvironment::SoEnvironment | ( | ) |
virtual SoEnvironment::~SoEnvironment | ( | ) | [protected, virtual] |
virtual void SoEnvironment::callback | ( | SoCallbackAction * | action | ) | [virtual] |
Reimplemented from SoNode.
virtual void SoEnvironment::GLRender | ( | SoGLRenderAction * | action | ) | [virtual] |
Reimplemented from SoNode.
static void SoEnvironment::initClass | ( | ) | [static] |
Reimplemented from SoNode.
Definition at line 140 of file SoEnvironment.h.
Definition at line 137 of file SoEnvironment.h.
Definition at line 144 of file SoEnvironment.h.
Definition at line 147 of file SoEnvironment.h.
Definition at line 146 of file SoEnvironment.h.
Definition at line 148 of file SoEnvironment.h.