vtlib library
Public Member Functions | List of all members
vtFog Class Reference
Inheritance diagram for vtFog:
Inheritance graph
[legend]

Public Member Functions

void SetFog (bool bOn, float start=0, float end=10000, const RGBf &color=s_white, osg::Fog::Mode eType=osg::Fog::LINEAR)
 
- Public Member Functions inherited from NodeExtension
void SetEnabled (bool bOn)
 
bool GetEnabled () const
 
void SetCastShadow (bool b)
 Set this node to cast a shadow, if it is under a vtShadow node. Default is false.
 
bool GetCastShadow ()
 Get whether this node casts a shadow.
 
void GetBoundSphere (FSphere &sphere, bool bGlobal=false)
 Get the Bounding Sphere of the node.
 

Detailed Description

A Fog node allows you to apply a fog to all its child nodes.

Member Function Documentation

void vtFog::SetFog ( bool  bOn,
float  start = 0,
float  end = 10000,
const RGBf color = s_white,
osg::Fog::Mode  eType = osg::Fog::LINEAR 
)

Set the Fog state.

You can turn fog on or off. When you turn fog on, it affects all others below it in the scene graph.

Parameters
bOnTrue to turn fog on, false to turn it off.
startThe distance from the camera at which fog starts, in meters.
endThe distance from the camera at which fog end, in meters. This is the point at which it becomes totally opaque.
colorThe color of the fog. All geometry will be faded toward this color.
eTypeCan be FM_LINEAR, FM_EXP, or FM_EXP2 for linear or exponential increase of the fog density.