Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
vtFog Class Reference

#include <NodeOSG.h>

Inheritance diagram for vtFog:
NodeExtension

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.
 
void SetOsgNode (osg::Node *n)
 

Static Public Attributes

static RGBf s_white
 

Protected Attributes

osg::ref_ptr< osg::StateSet > m_pFogStateSet
 
osg::ref_ptr< osg::Fog > m_pFog
 

Additional Inherited Members

- Public Attributes inherited from NodeExtension
osg::Node * m_pNode
 
bool m_bCastShadow
 

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.

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