1 #ifndef OPENMW_COMPONENTS_SCENEUTIL_LIGHTMANAGER_H
2 #define OPENMW_COMPONENTS_SCENEUTIL_LIGHTMANAGER_H
9 #include <osg/NodeVisitor>
10 #include <osg/observer_ptr>
44 LightSource(const LightSource&
copy, const osg::
CopyOp& copyop);
72 mLight[1] =
new osg::Light(*light);
110 void addLight(
LightSource* lightSource,
const osg::Matrixf& worldMat,
unsigned int frameNum);
118 const std::vector<LightSourceTransform>&
getLights()
const;
126 const std::vector<LightSourceViewBound>&
getLightsInViewSpace(osg::Camera* camera,
const osg::RefMatrix* viewMatrix);
128 typedef std::vector<const LightSourceViewBound*>
LightList;
165 : osg::Object(copy, copyop), osg::NodeCallback(copy, copyop)
173 void operator()(osg::Node* node, osg::NodeVisitor* nv);
Definition: lightmanager.hpp:157
Definition: lightmanager.hpp:120
void copy(const btTransform &src, Nif::Transformation &dst)
Definition: testbulletnifloader.cpp:269
META_Node(SceneUtil, LightManager) LightManager()
std::set< SceneUtil::LightSource * > mIgnoredLightSources
Definition: lightmanager.hpp:183
void setLightingMask(unsigned int mask)
Definition: lightmanager.cpp:178
osg::Light * getLight(unsigned int frame)
Definition: lightmanager.hpp:60
unsigned int mLightingMask
Definition: lightmanager.hpp:145
osg::ref_ptr< osg::Light > mLight[2]
Definition: lightmanager.hpp:31
std::map< size_t, osg::ref_ptr< osg::StateSet > > LightStateSetMap
Definition: lightmanager.hpp:140
float getRadius() const
Definition: lightmanager.hpp:46
void setStartLight(int start)
Set the first light index that should be used by this manager, typically the number of directional li...
Definition: lightmanager.cpp:339
unsigned int mLastFrameNumber
Definition: lightmanager.hpp:181
void setRadius(float radius)
The LightSource will affect objects within this radius.
Definition: lightmanager.hpp:52
int getStartLight() const
Definition: lightmanager.cpp:353
LightSource * mLightSource
Definition: lightmanager.hpp:122
std::vector< const LightSourceViewBound * > LightList
Definition: lightmanager.hpp:128
std::vector< LightSourceTransform > mLights
Definition: lightmanager.hpp:134
void update()
Internal use only, called automatically by the LightManager's UpdateCallback.
Definition: lightmanager.cpp:188
Definition: lightmanager.hpp:28
LightListCallback()
Definition: lightmanager.hpp:160
LightStateSetMap mStateSetCache[2]
Definition: lightmanager.hpp:141
const std::vector< LightSourceTransform > & getLights() const
Definition: lightmanager.cpp:262
Decorator node implementing the rendering of any number of LightSources that can be anywhere in the s...
Definition: lightmanager.hpp:83
std::vector< LightSourceViewBound > LightSourceViewBoundCollection
Definition: lightmanager.hpp:136
int mStartLight
Definition: lightmanager.hpp:143
osg::ref_ptr< osg::StateSet > getLightListStateSet(const LightList &lightList, unsigned int frameNum)
Definition: lightmanager.cpp:220
LightManager(const LightManager ©, const osg::CopyOp ©op)
Definition: lightmanager.cpp:163
META_Object(SceneUtil, LightListCallback) void operator()(osg pushLightState(osg::Node *node, osgUtil::CullVisitor *nv) bool
Definition: lightmanager.cpp:393
std::map< osg::observer_ptr< osg::Camera >, LightSourceViewBoundCollection > mLightsInViewSpace
Definition: lightmanager.hpp:137
const std::vector< LightSourceViewBound > & getLightsInViewSpace(osg::Camera *camera, const osg::RefMatrix *viewMatrix)
Definition: lightmanager.cpp:267
int getId() const
Get the unique ID for this light source.
Definition: lightmanager.hpp:76
std::set< SceneUtil::LightSource * > & getIgnoredLightSources()
Definition: lightmanager.hpp:177
unsigned int getLightingMask() const
Definition: lightmanager.cpp:183
META_Node(SceneUtil, LightSource) LightSource()
osg::BoundingSphere mViewBound
Definition: lightmanager.hpp:123
float mRadius
Definition: lightmanager.hpp:34
int mId
Definition: lightmanager.hpp:36
void setLight(osg::Light *light)
Definition: lightmanager.hpp:69
void addLight(LightSource *lightSource, const osg::Matrixf &worldMat, unsigned int frameNum)
Internal use only, called automatically by the LightSource's UpdateCallback.
Definition: lightmanager.cpp:201
LightManager * mLightManager
Definition: lightmanager.hpp:180
LightListCallback(const LightListCallback ©, const osg::CopyOp ©op)
Definition: lightmanager.hpp:164
LightManager::LightList mLightList
Definition: lightmanager.hpp:182