![]() |
VR-Forces 4.10 Class Documentation
|
DtOsgLightManager receives LightSource nodes from the DtOsgCullVisitor, and collects them all here where they may by applied simultaneously at the same time. More...

Public Member Functions | |
| virtual | ~DtOsgLightManager () |
| DTOR. More... | |
| virtual void | initialize () |
| Initialize the manager, create member variables and connect signals etc. More... | |
| virtual void | attachToStateSet (osg::StateSet *stateSet) |
| Attach the light manager to a particular OSG state set. More... | |
| virtual void | setPerPixelLightingEnabled (bool enabled) |
| Toggles global use of shader-based lighting effects. More... | |
| virtual bool | perPixelLightingEnabled () const |
| Retrieves whether per-pixel shader-based lighting is active. More... | |
| virtual DtLightManager & | lightManager () |
| Get the internal light manager implementation object. More... | |
| virtual void | setReservedID (int id) |
| Reserves a light ID that the light manager won't mess with. More... | |
| virtual int | reservedID () const |
| Retrieves the reserved light ID, or -1 if none. More... | |
| virtual void | cullReset () |
| Clear the internal list of light sources and implement state changes when the cull visitor is reset each frame. More... | |
| virtual bool | registerLight (const osg::LightSource *light, const osg::NodePath &nodePath, const osg::Matrixd &modelingMatrix, bool globalLights) |
| Add a light source to the ones globally managed. More... | |
| virtual DtLight * | createDtLight (const osg::Light *osgLight) |
| create a DtLight from an osg::Light. More... | |
| virtual void | convertOsgLightToDtLight (const osg::LightSource &lightSource, DtLight *pDtLight, const osg::Matrixd &modelingMatrix) |
| update a DtLight's parameters based on an osg::LightSource More... | |
| virtual void | deregisterLight (const osg::LightSource *light) |
| virtual void | getWorldPositionAndDirection (const osg::LightSource &lightSource, const osg::Matrixd &modelingMatrix, osg::Vec3d &vWorldPos, osg::Vec3d &vWorldDir) const |
| get the world position and direction from a light source More... | |
| virtual void | update (osg::State &state, DtDe &de, const osg::Camera *camera) |
| Active the underlying GLLight's, transformed by the matrix passed in on a per camera basis. More... | |
| virtual int | getTextureStartOffset (void) const |
| get offset More... | |
| virtual const Vector2_uint32 & | tileSize (void) const |
| get the tile size More... | |
| virtual const Vector2_uint32 & | gridMaxDims (void) const |
| get the grid dimensions More... | |
| virtual void | releaseGLObjects (void) |
| release gl objects More... | |
| virtual unsigned int | getOrCreateLightSourceTypeId (DtLight *pDtLight) |
| find or create a light source type id for this light source More... | |
| virtual unsigned int | getOrCreateLightSourceTypeId (const osg::LightSource &lightSource) |
| find or create a light source type id for an osg::LightSource More... | |
| virtual unsigned int | getOrCreateDynamicLightSourceTypeId (const DtLight *pDtLight) |
| find or create a light source type id for a light source that will be changing over time. More... | |
| virtual void | deleteDynamicLightSourceTypeId (const DtLight *pDtLight) |
| delete a dynamic light source type id. Makes it available to be used by a different light source More... | |
| virtual LightReusableVector | lightSourceTypeLightVector () const |
| get the light source types that are registered with this light manager be careful with this since it makes a copy of the vector for thread safety More... | |
| virtual void | updateLightSourceType (unsigned int id, const DtLight *light) |
| update a light source in the registered types. More... | |
| virtual const DtOsgLightingComponent * | lightingComponent () const |
| get the lighting component created by this osg light manager. More... | |
| virtual DtOsgLightingComponent * | lightingComponent () |
| get the lighting component created by this osg light manager (non-const) More... | |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| Do nothing constructor. More... | |
| virtual | ~DtVirtualBaseClass () |
| Virtual do nothing destructor. More... | |
Static Public Member Functions | |
| static DtOsgLightManager & | instance (DtDe &de) |
| Get/create instance of light manager. More... | |
| static const std::string & | theClassName () |
| Get the name this class is registered by. More... | |
| static LightType | lightType (const osg::Light *light) |
| Get the DtLightManager LightType for an osg light. More... | |
Protected Types | |
| typedef std::pair< const osg::LightSource *, const makVrv::DtLight * > | LightSourceAndLight |
| typedef boost::unordered_map < size_t, LightSourceAndLight > | MapLightSourceHashToLights |
| typedef std::map< size_t, unsigned int > | MapLightSourceTypeToLightID |
Protected Member Functions | |
| DtOsgLightManager (DtDe &de) | |
| purposely protected More... | |
| virtual void | updateLightOnOffStatus (const VectorLights &lights) |
| update on/off status More... | |
| virtual bool | computeLightStatusForTime (const DtLight *pDtLight, DtOsgSkyObject *skyObject) |
| Will only turn off lights when it is too bright (won't turn on lights) More... | |
| virtual void | updateFixedFunctionLights (const osg::State &state) |
| virtual void | updateShaderBasedLights (const osg::State &state, const VectorLights &lights, const osg::Camera *camera) |
| update the information needed to render the dynamic lights. More... | |
| virtual const VectorLights & | computeFrustumLights (const osg::State &state, const osg::Camera *camera) |
| virtual void | proccessLightPath (DtLight *inLight, const osg::NodePath &nodePath) |
| virtual void | configurePerPixelLighting (osg::StateSet *) |
| virtual void | slot_reloadShader () |
| virtual bool | existsInLightManager (const DtLight *light) const |
Protected Attributes | |
| DtDe & | myDe |
| bool | myInitialized |
| bool | myDebugCallbackInitialized |
| int | myReservedID |
| bool | myPerPixelLightingEnabled |
| osg::ref_ptr < DtOsgLightingComponent > | myLightingComponent |
| osg::observer_ptr< osg::StateSet > | myStateSet |
| VectorLights | myActiveLights |
| DtLightManager * | myLightManager |
| MapLightSourceHashToLights | myMapLightSourceHashToLights |
| DtOsgLightsObserver * | myOsgLightsObserver |
| MapLightSourceTypeToLightID | myLightSourceTypeMap |
| LightReusableVector | myLightSourceTypeLightVector |
| boost::mutex | myMutableLightSourceTypeMutex |
Private Member Functions | |
| DtOsgLightManager ()=delete | |
| not allowed More... | |
| DtOsgLightManager (const DtOsgLightManager &rhs)=delete | |
| not allowed More... | |
| DtOsgLightManager & | operator= (const DtOsgLightManager &rhs)=delete |
| not allowed More... | |
DtOsgLightManager receives LightSource nodes from the DtOsgCullVisitor, and collects them all here where they may by applied simultaneously at the same time.
|
protected |
|
protected |
|
protected |
|
virtual |
DTOR.
|
protected |
purposely protected
|
privatedelete |
not allowed
|
privatedelete |
not allowed
|
privatedelete |
not allowed
|
virtual |
Initialize the manager, create member variables and connect signals etc.
|
virtual |
Attach the light manager to a particular OSG state set.
Pass in NULL to detach.
|
virtual |
Toggles global use of shader-based lighting effects.
|
virtual |
Retrieves whether per-pixel shader-based lighting is active.
|
virtual |
Get the internal light manager implementation object.
|
virtual |
Reserves a light ID that the light manager won't mess with.
|
virtual |
Retrieves the reserved light ID, or -1 if none.
|
virtual |
Clear the internal list of light sources and implement state changes when the cull visitor is reset each frame.
|
virtual |
Add a light source to the ones globally managed.
|
virtual |
create a DtLight from an osg::Light.
It does not pass through all the parameters. Use convertOsgLightToDtLight afterwards to do that.
|
virtual |
update a DtLight's parameters based on an osg::LightSource
|
virtual |
|
virtual |
get the world position and direction from a light source
|
virtual |
Active the underlying GLLight's, transformed by the matrix passed in on a per camera basis.
|
virtual |
get offset
|
virtual |
get the tile size
|
virtual |
get the grid dimensions
|
virtual |
release gl objects
|
virtual |
find or create a light source type id for this light source
|
virtual |
find or create a light source type id for an osg::LightSource
|
virtual |
find or create a light source type id for a light source that will be changing over time.
good for particle system light sources and the flashlight
|
virtual |
delete a dynamic light source type id. Makes it available to be used by a different light source
|
virtual |
get the light source types that are registered with this light manager be careful with this since it makes a copy of the vector for thread safety
|
virtual |
update a light source in the registered types.
|
virtual |
get the lighting component created by this osg light manager.
|
virtual |
get the lighting component created by this osg light manager (non-const)
|
static |
Get/create instance of light manager.
|
static |
Get the name this class is registered by.
|
static |
Get the DtLightManager LightType for an osg light.
|
protectedvirtual |
update on/off status
|
protectedvirtual |
Will only turn off lights when it is too bright (won't turn on lights)
|
protectedvirtual |
|
protectedvirtual |
update the information needed to render the dynamic lights.
This needs to be done on a per camera basis because it runs at the start of draw. When there is a planar reflection camera the cull for two cameras runs and then the draw for those two cameras run so we have to keep the light data separate for each camera in that case.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
mutableprotected |