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

#include <NodeOSG.h>

Inheritance diagram for vtShadow:
NodeExtension

Public Member Functions

 vtShadow (const int ShadowTextureUnit, int LightNumber)
 
void SetDarkness (float bias)
 Set the darkness of the shadow, from 0 to 1. Only supported on newer 3D cards.
 
float GetDarkness ()
 Get the darkness, from 0 to 1.
 
void AddAdditionalTerrainTextureUnit (const uint Unit, const uint Mode)
 
void RemoveAdditionalTerrainTextureUnit (const uint Unit)
 
void RemoveAllAdditionalTerrainTextureUnits ()
 
void SetShadowTextureResolution (const uint ShadowTextureResolution)
 A single texture is used for the shadow. It's resolution defaults to 1024.
 
void SetRecalculateEveryFrame (const bool RecalculateEveryFrame)
 The shadow may be recalculated every frame, or for improved performance, only when desired.
 
bool GetRecalculateEveryFrame () const
 
void SetShadowSphereRadius (const float ShadowSphereRadius)
 
void SetHeightField3d (vtHeightField3d *pHeightField3d)
 
void AddLodGridToIgnore (vtLodGrid *pLodGrid)
 
void ForceShadowUpdate ()
 
void SetDebugHUD (vtGroup *pGroup)
 
- 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)
 

Protected Attributes

const int m_ShadowTextureUnit
 
const int m_LightNumber
 

Additional Inherited Members

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

Detailed Description

A Shadow node allows you to apply shadows within all its child nodes. Add it to your scene graph, and all descendents will receive a cast shadow. Only certain nodes, which are set with vtNode::SetCastShadow, will cast a shadow.


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