OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
SceneUtil::LightListCallback Class Reference

#include <lightmanager.hpp>

Inheritance diagram for SceneUtil::LightListCallback:
Collaboration diagram for SceneUtil::LightListCallback:

Public Member Functions

 LightListCallback ()
 
 LightListCallback (const LightListCallback &copy, const osg::CopyOp &copyop)
 
META_Object(SceneUtil,
LightListCallback) void
operator()(osg 
pushLightState (osg::Node *node, osgUtil::CullVisitor *nv) bool
 
std::set
< SceneUtil::LightSource * > & 
getIgnoredLightSources ()
 

Private Attributes

LightManagermLightManager
 
unsigned int mLastFrameNumber
 
LightManager::LightList mLightList
 
std::set
< SceneUtil::LightSource * > 
mIgnoredLightSources
 

Detailed Description

To receive lighting, objects must be decorated by a LightListCallback. Light list callbacks must be added via node->addCullCallback(new LightListCallback). Once a light list callback is added to a node, that node and all its child nodes can receive lighting.

The placement of these LightListCallbacks affects the granularity of light lists. Having too fine grained
light lists can result in degraded performance. Too coarse grained light lists can result in lights no longer rendering when the size of a light list exceeds the OpenGL limit on the number of concurrent lights (8). A good starting point is to attach a LightListCallback to each game object's base node.
Note
Not thread safe for CullThreadPerCamera threading mode.
Due to lack of OSG support, the callback does not work on Drawables.

Constructor & Destructor Documentation

SceneUtil::LightListCallback::LightListCallback ( )
inline
SceneUtil::LightListCallback::LightListCallback ( const LightListCallback copy,
const osg::CopyOp &  copyop 
)
inline

Member Function Documentation

std::set<SceneUtil::LightSource*>& SceneUtil::LightListCallback::getIgnoredLightSources ( )
inline
bool SceneUtil::LightListCallback::pushLightState ( osg::Node *  node,
osgUtil::CullVisitor *  nv 
)

Here is the call graph for this function:

Member Data Documentation

std::set<SceneUtil::LightSource*> SceneUtil::LightListCallback::mIgnoredLightSources
private
unsigned int SceneUtil::LightListCallback::mLastFrameNumber
private
LightManager::LightList SceneUtil::LightListCallback::mLightList
private
LightManager* SceneUtil::LightListCallback::mLightManager
private

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