Open Inventor Reference
SoEnvironment Class Reference

Global environment node. More...

#include <Inventor/nodes/SoEnvironment.h>

Inheritance diagram for SoEnvironment:
SoNode SoFieldContainer SoBase

List of all members.

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 ()

Detailed Description

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.

File Format/Default
Action Behavior
SoGLRenderAction
Sets the current environment parameters to those specified with this node. Successive geometries will be rendered using this environment.
See Also
SoLight, SoLightModel

Definition at line 120 of file SoEnvironment.h.


Member Enumeration Documentation

Enumerator:
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.


Constructor & Destructor Documentation

SoEnvironment::SoEnvironment ( )
virtual SoEnvironment::~SoEnvironment ( ) [protected, virtual]

Member Function Documentation

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.


Member Data Documentation

Definition at line 146 of file SoEnvironment.h.


The documentation for this class was generated from the following file: