OpenMW
|
Decorator node implementing the rendering of any number of LightSources that can be anywhere in the subgraph. More...
#include <lightmanager.hpp>
Classes | |
struct | LightSourceTransform |
struct | LightSourceViewBound |
Public Types | |
typedef std::vector< const LightSourceViewBound * > | LightList |
Public Member Functions | |
META_Node (SceneUtil, SceneUtil::LightManager) LightManager() | |
LightManager (const LightManager ©, const osg::CopyOp ©op) | |
void | setLightingMask (unsigned int mask) |
unsigned int | getLightingMask () const |
void | setStartLight (int start) |
Set the first light index that should be used by this manager, typically the number of directional lights in the scene. More... | |
int | getStartLight () const |
void | update () |
Internal use only, called automatically by the LightManager's UpdateCallback. More... | |
void | addLight (LightSource *lightSource, const osg::Matrixf &worldMat, unsigned int frameNum) |
Internal use only, called automatically by the LightSource's UpdateCallback. More... | |
const std::vector < LightSourceTransform > & | getLights () const |
const std::vector < LightSourceViewBound > & | getLightsInViewSpace (osg::Camera *camera, const osg::RefMatrix *viewMatrix) |
osg::ref_ptr< osg::StateSet > | getLightListStateSet (const LightList &lightList, unsigned int frameNum) |
Private Types | |
typedef std::vector < LightSourceViewBound > | LightSourceViewBoundCollection |
typedef std::map< size_t, osg::ref_ptr< osg::StateSet > > | LightStateSetMap |
Private Attributes | |
std::vector< LightSourceTransform > | mLights |
std::map< osg::observer_ptr < osg::Camera > , LightSourceViewBoundCollection > | mLightsInViewSpace |
LightStateSetMap | mStateSetCache [2] |
int | mStartLight |
unsigned int | mLightingMask |
Decorator node implementing the rendering of any number of LightSources that can be anywhere in the subgraph.
typedef std::vector<const LightSourceViewBound*> SceneUtil::LightManager::LightList |
|
private |
|
private |
SceneUtil::LightManager::LightManager | ( | const LightManager & | copy, |
const osg::CopyOp & | copyop | ||
) |
void SceneUtil::LightManager::addLight | ( | LightSource * | lightSource, |
const osg::Matrixf & | worldMat, | ||
unsigned int | frameNum | ||
) |
Internal use only, called automatically by the LightSource's UpdateCallback.
unsigned int SceneUtil::LightManager::getLightingMask | ( | ) | const |
osg::ref_ptr< osg::StateSet > SceneUtil::LightManager::getLightListStateSet | ( | const LightList & | lightList, |
unsigned int | frameNum | ||
) |
const std::vector< LightManager::LightSourceTransform > & SceneUtil::LightManager::getLights | ( | ) | const |
const std::vector< LightManager::LightSourceViewBound > & SceneUtil::LightManager::getLightsInViewSpace | ( | osg::Camera * | camera, |
const osg::RefMatrix * | viewMatrix | ||
) |
int SceneUtil::LightManager::getStartLight | ( | ) | const |
SceneUtil::LightManager::META_Node | ( | SceneUtil | , |
SceneUtil::LightManager | |||
) |
void SceneUtil::LightManager::setLightingMask | ( | unsigned int | mask | ) |
mask | This mask is compared with the current Camera's cull mask to determine if lighting is desired. By default, it's ~0u i.e. always on. If you have some views that do not require lighting, then set the Camera's cull mask to not include the lightingMask for a much faster cull and rendering. |
void SceneUtil::LightManager::setStartLight | ( | int | start | ) |
Set the first light index that should be used by this manager, typically the number of directional lights in the scene.
void SceneUtil::LightManager::update | ( | ) |
Internal use only, called automatically by the LightManager's UpdateCallback.
|
private |
|
private |
|
private |
|
private |
|
private |