VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
makVrv::DtOsgLightManager Class Reference

DtOsgLightManager receives LightSource nodes from the DtOsgCullVisitor, and collects them all here where they may by applied simultaneously at the same time. More...

Inheritance diagram for makVrv::DtOsgLightManager:
Inheritance graph
[legend]

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 DtLightManagerlightManager ()
 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 void deregisterLight (const osg::LightSource *light)
 
virtual void update (const osg::State &state, DtDe &de)
 Active the underlying GLLight's, transformed by the matrix passed in. More...
 
virtual int getTextureStartOffset (void) const
 
virtual const Vector2_uint32GetTileSize (void) const
 
virtual const Vector2_uint32GetGridMaxDims (void) const
 
virtual void releaseGLObjects (void)
 
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 Do nothing constructor. More...
 
virtual ~DtVirtualBaseClass ()
 Virtual do nothing destructor. More...
 

Static Public Member Functions

static DtOsgLightManagerinstance (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
 

Protected Member Functions

 DtOsgLightManager (DtDe &de)
 purposely protected More...
 
 DtOsgLightManager ()
 purposely protected More...
 
virtual void updateLightOnOffStatus (DtDe &de, const VectorLights &lights)
 
virtual bool computeLightStatusForTime (DtDe &de, 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)
 
virtual const VectorLights & computeFrustumLights (const osg::State &state)
 
virtual void proccessLightPath (DtLight *inLight, const osg::NodePath &nodePath)
 
virtual void configurePerPixelLighting (osg::StateSet *)
 
virtual void setComponentVisualizationMode (int mode)
 
virtual void slot_reloadShader ()
 
virtual bool existsInLightManager (const DtLight *light) const
 

Protected Attributes

DtDemyDe
 
bool myInitialized
 
bool myDebugCallbackInitialized
 
int myReservedID
 
bool myPerPixelLightingEnabled
 
osg::ref_ptr
< DtOsgLightingComponent
myLightingComponent
 
osg::ref_ptr< osg::Uniform > myComponentDebugUniform
 
bool myLightingComponentInstalled
 
osg::observer_ptr< osg::StateSet > myStateSet
 
VectorLights myActiveLights
 
DtLightManagermyLightManager
 
MapLightSourceHashToLights myMapLightSourceHashToLights
 
DtOsgLightsObserver * myOsgLightsObserver
 

Detailed Description

DtOsgLightManager receives LightSource nodes from the DtOsgCullVisitor, and collects them all here where they may by applied simultaneously at the same time.

Member Typedef Documentation

typedef std::pair<const osg::LightSource*, const makVrv::DtLight*> makVrv::DtOsgLightManager::LightSourceAndLight
protected
typedef boost::unordered_map<size_t, LightSourceAndLight> makVrv::DtOsgLightManager::MapLightSourceHashToLights
protected

Constructor & Destructor Documentation

virtual makVrv::DtOsgLightManager::~DtOsgLightManager ( )
virtual

DTOR.

makVrv::DtOsgLightManager::DtOsgLightManager ( DtDe de)
protected

purposely protected

makVrv::DtOsgLightManager::DtOsgLightManager ( )
protected

purposely protected

Member Function Documentation

virtual void makVrv::DtOsgLightManager::initialize ( )
virtual

Initialize the manager, create member variables and connect signals etc.

virtual void makVrv::DtOsgLightManager::attachToStateSet ( osg::StateSet *  stateSet)
virtual

Attach the light manager to a particular OSG state set.

Pass in NULL to detach.

virtual void makVrv::DtOsgLightManager::setPerPixelLightingEnabled ( bool  enabled)
virtual

Toggles global use of shader-based lighting effects.

virtual bool makVrv::DtOsgLightManager::perPixelLightingEnabled ( ) const
virtual

Retrieves whether per-pixel shader-based lighting is active.

virtual DtLightManager& makVrv::DtOsgLightManager::lightManager ( )
virtual

Get the internal light manager implementation object.

virtual void makVrv::DtOsgLightManager::setReservedID ( int  id)
virtual

Reserves a light ID that the light manager won't mess with.

virtual int makVrv::DtOsgLightManager::reservedID ( ) const
virtual

Retrieves the reserved light ID, or -1 if none.

virtual void makVrv::DtOsgLightManager::cullReset ( )
virtual

Clear the internal list of light sources and implement state changes when the cull visitor is reset each frame.

virtual bool makVrv::DtOsgLightManager::registerLight ( const osg::LightSource *  light,
const osg::NodePath &  nodePath,
const osg::Matrixd &  modelingMatrix,
bool  globalLights 
)
virtual

Add a light source to the ones globally managed.

virtual void makVrv::DtOsgLightManager::deregisterLight ( const osg::LightSource *  light)
virtual
virtual void makVrv::DtOsgLightManager::update ( const osg::State &  state,
DtDe de 
)
virtual

Active the underlying GLLight's, transformed by the matrix passed in.

virtual int makVrv::DtOsgLightManager::getTextureStartOffset ( void  ) const
virtual
virtual const Vector2_uint32& makVrv::DtOsgLightManager::GetTileSize ( void  ) const
virtual
virtual const Vector2_uint32& makVrv::DtOsgLightManager::GetGridMaxDims ( void  ) const
virtual
virtual void makVrv::DtOsgLightManager::releaseGLObjects ( void  )
virtual
static DtOsgLightManager& makVrv::DtOsgLightManager::instance ( DtDe de)
static

Get/create instance of light manager.

static const std::string& makVrv::DtOsgLightManager::theClassName ( )
static

Get the name this class is registered by.

static LightType makVrv::DtOsgLightManager::lightType ( const osg::Light *  light)
static

Get the DtLightManager LightType for an osg light.

virtual void makVrv::DtOsgLightManager::updateLightOnOffStatus ( DtDe de,
const VectorLights &  lights 
)
protectedvirtual
virtual bool makVrv::DtOsgLightManager::computeLightStatusForTime ( DtDe de,
DtLight pDtLight,
DtOsgSkyObject skyObject 
)
protectedvirtual

Will only turn off lights when it is too bright (won't turn on lights)

virtual void makVrv::DtOsgLightManager::updateFixedFunctionLights ( const osg::State &  state)
protectedvirtual
virtual void makVrv::DtOsgLightManager::updateShaderBasedLights ( const osg::State &  state,
const VectorLights &  lights 
)
protectedvirtual
virtual const VectorLights& makVrv::DtOsgLightManager::computeFrustumLights ( const osg::State &  state)
protectedvirtual
virtual void makVrv::DtOsgLightManager::proccessLightPath ( DtLight inLight,
const osg::NodePath &  nodePath 
)
protectedvirtual
virtual void makVrv::DtOsgLightManager::configurePerPixelLighting ( osg::StateSet *  )
protectedvirtual
virtual void makVrv::DtOsgLightManager::setComponentVisualizationMode ( int  mode)
protectedvirtual
virtual void makVrv::DtOsgLightManager::slot_reloadShader ( )
protectedvirtual
virtual bool makVrv::DtOsgLightManager::existsInLightManager ( const DtLight light) const
protectedvirtual

Member Data Documentation

DtDe& makVrv::DtOsgLightManager::myDe
protected
bool makVrv::DtOsgLightManager::myInitialized
protected
bool makVrv::DtOsgLightManager::myDebugCallbackInitialized
protected
int makVrv::DtOsgLightManager::myReservedID
protected
bool makVrv::DtOsgLightManager::myPerPixelLightingEnabled
protected
osg::ref_ptr<DtOsgLightingComponent> makVrv::DtOsgLightManager::myLightingComponent
protected
osg::ref_ptr<osg::Uniform> makVrv::DtOsgLightManager::myComponentDebugUniform
protected
bool makVrv::DtOsgLightManager::myLightingComponentInstalled
protected
osg::observer_ptr<osg::StateSet> makVrv::DtOsgLightManager::myStateSet
protected
VectorLights makVrv::DtOsgLightManager::myActiveLights
protected
DtLightManager* makVrv::DtOsgLightManager::myLightManager
protected
MapLightSourceHashToLights makVrv::DtOsgLightManager::myMapLightSourceHashToLights
protected
DtOsgLightsObserver* makVrv::DtOsgLightManager::myOsgLightsObserver
protected

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

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)