#include <NodeOSG.h>
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 |
A Fog node allows you to apply a fog to all its child nodes.
| 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.
| bOn | True to turn fog on, false to turn it off. |
| start | The distance from the camera at which fog starts, in meters. |
| end | The distance from the camera at which fog end, in meters. This is the point at which it becomes totally opaque. |
| color | The color of the fog. All geometry will be faded toward this color. |
| eType | Can be FM_LINEAR, FM_EXP, or FM_EXP2 for linear or exponential increase of the fog density. |
1.8.4