SoEnvironment Class Reference
[Lights & colors]

Global environment node. More...

#include <Inventor/nodes/SoEnvironment.h>

Inheritance diagram for SoEnvironment:
SoNode SoFieldContainer SoBase SoRefCounter SoTypedObject

List of all members.

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

Detailed Description

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.

FILE FORMAT/DEFAULT

ACTION BEHAVIOR

SEE ALSO

SoLight, SoLightModel


Member Enumeration Documentation

Type of fog.

Enumerator:
NONE 

No fog.

HAZE 

Linear increase in opacity with distance.

FOG 

Exponential increase in opacity.

SMOKE 

Exponential squared increase in opacity.


Constructor & Destructor Documentation

SoEnvironment::SoEnvironment (  ) 

Creates an environment node with default settings.


Member Function Documentation

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]

Set the state of the override field.

see SoNode::setOverride doc.

Reimplemented from SoNode.


Member Data Documentation

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.


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

Open Inventor Toolkit reference manual, generated on 11 Nov 2019
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/