16 #include <boost/unordered_map.hpp>
18 #include <osg/observer_ptr>
22 #include <matrix/vlVector.h>
36 class DtOsgLightsObserver;
56 static const std::string& theClassName();
59 static LightType getLightType(
const osg::Light* light);
63 void attachToStateSet(osg::StateSet* stateSet);
66 void setPerPixelLightingEnabled(
bool enabled);
69 bool getPerPixelLightingEnabled()
const;
75 void setReservedID(
int id);
78 int reservedID()
const;
85 bool registerLight(
const osg::LightSource* light,
const osg::NodePath& nodePath,
const osg::Matrixd& modelingMatrix,
bool globalLights);
87 void deregisterLight(
const osg::LightSource* light);
92 void update(
const osg::State& state,
DtDe& de);
95 void deactivateLights();
97 int getTextureStartOffset(
void)
const;
101 void releaseGLObjects(
void);
106 void updateLightOnOffStatus(
DtDe& de,
const VectorLights& lights);
111 void updateFixedFunctionLights(
const osg::State& state);
113 void updateShaderBasedLights(
const osg::State& state,
const VectorLights& lights);
115 const VectorLights& computeFrustumLights(
const osg::State &state);
117 void proccessLightPath(
DtLight* inLight,
const osg::NodePath& nodePath);
120 void configurePerPixelLighting(osg::StateSet*);
121 void setComponentVisualizationMode(
int mode);
123 void slot_reloadShader();
149 bool existsInLightManager(
const DtLight* light)
const;