H3D::LocalFog Class Reference
[X3D node classes.]

The LocalFog node provides a way to simulate atmospheric effects by blending objects with the colour specified by the color field based on the distances of the various objects from the viewer. More...

#include <H3D/LocalFog.h>

Inheritance diagram for H3D::LocalFog:

Inheritance graph

List of all members.

Public Member Functions

 LocalFog (Inst< SFNode > _metadata=0, Inst< SFColor > _color=0, Inst< SFString > _localFogType=0, Inst< SFFloat > _visibilityRange=0)
 Construtor.
virtual void enableGraphicsState ()
 Set up and enable the fog with OpenGL.
virtual void disableGraphicsState ()
 Restore the previous attribs.

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase for this node.


Detailed Description

The LocalFog node provides a way to simulate atmospheric effects by blending objects with the colour specified by the color field based on the distances of the various objects from the viewer.

The distances are calculated in the coordinate space of the LocalFog node. The visibilityRange field specifies the distance in metres (in the local coordinate system) at which objects are totally obscured by the fog. Objects located outside the visibilityRange from the viewer are drawn with a constant colour of color. Objects very close to the viewer are blended very little with the fog color. A visibilityRange of 0.0 disables the LocalFog node. The visibilityRange is affected by the scaling transformations of the LocalFog node’s parents; translations and rotations have no affect on visibilityRange.

The fogType field controls how much of the fog colour is blended with the object as a function of distance. If fogType is "LINEAR", the amount of blending is a linear function of the distance, resulting in a depth cueing effect. If fogType is "EXPONENTIAL", an exponential increase in blending is used, resulting in a more natural fog appearance.


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

Generated on Fri Nov 7 10:30:33 2008 for H3D API by  doxygen 1.5.7