VR-Forces 4.6 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 Member Functions | Protected Attributes | Private Types | Private Member Functions | Private 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.
void attachToStateSet (osg::StateSet *stateSet)
 Attach the light manager to a particular OSG state set.
void setPerPixelLightingEnabled (bool enabled)
 Toggles global use of shader-based lighting effects.
bool getPerPixelLightingEnabled () const
 Retrieves whether per-pixel shader-based lighting is active.
DtLightManagerlightManager ()
 Get the internal light manager implementation object.
void setReservedID (int id)
 Reserves a light ID that the light manager won't mess with.
int reservedID () const
 Retrieves the reserved light ID, or -1 if none.
void cullReset ()
 Clear the internal list of light sources and implement state changes when the cull visitor is reset each frame.
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.
void deregisterLight (const osg::LightSource *light)
void update (const osg::State &state, DtDe &de)
 Active the underlying GLLight's, transformed by the matrix passed in.
void deactivateLights ()
 Disable all GLLights managed by this class.
int getTextureStartOffset (void) const
const Vector2_uint32GetTileSize (void) const
const Vector2_uint32GetGridMaxDims (void) const
void releaseGLObjects (void)
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 Do nothing constructor.
virtual ~DtVirtualBaseClass ()
 Virtual do nothing destructor.

Static Public Member Functions

static DtOsgLightManagerinstance (DtDe &de)
 Get/create instance of sky object manager.
static const std::string & theClassName ()
 Get the name this class is registered by.
static LightType getLightType (const osg::Light *light)
 Get the DtLightManager LightType for an osg light.

Protected Member Functions

 DtOsgLightManager (DtDe &de)
void updateLightOnOffStatus (DtDe &de, const VectorLights &lights)
bool computeLightStatusForTime (DtDe &de, DtLight *pDtLight, DtOsgSkyObject *skyObject)
 Will only turn off lights when it is too bright (won't turn on lights)
void updateFixedFunctionLights (const osg::State &state)
void updateShaderBasedLights (const osg::State &state, const VectorLights &lights)
const VectorLights & computeFrustumLights (const osg::State &state)
void proccessLightPath (DtLight *inLight, const osg::NodePath &nodePath)
void configurePerPixelLighting (osg::StateSet *)
void setComponentVisualizationMode (int mode)
void slot_reloadShader ()

Protected Attributes

int myReservedID
DtDemyDe
bool myPerPixelLightingEnabled
osg::ref_ptr
< DtOsgLightingComponent
myLightingComponent
osg::ref_ptr< osg::Uniform > myComponentDebugUniform
bool myLightingComponentInstalled
osg::observer_ptr< osg::StateSet > myStateSet
VectorLights myActiveLights

Private Types

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

Private Member Functions

 DtOsgLightManager ()
bool existsInLightManager (const DtLight *light) const

Private Attributes

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
private
typedef boost::unordered_map<size_t, LightSourceAndLight> makVrv::DtOsgLightManager::MapLightSourceHashToLights
private

Constructor & Destructor Documentation

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

DTOR.

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

Member Function Documentation

static DtOsgLightManager& makVrv::DtOsgLightManager::instance ( DtDe de)
static

Get/create instance of sky object manager.

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

Get the name this class is registered by.

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

Get the DtLightManager LightType for an osg light.

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

Attach the light manager to a particular OSG state set.

Pass in NULL to detach.

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

Toggles global use of shader-based lighting effects.

bool makVrv::DtOsgLightManager::getPerPixelLightingEnabled ( ) const

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

DtLightManager& makVrv::DtOsgLightManager::lightManager ( )

Get the internal light manager implementation object.

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

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

int makVrv::DtOsgLightManager::reservedID ( ) const

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

void makVrv::DtOsgLightManager::cullReset ( )

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

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

Add a light source to the ones globally managed.

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

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

void makVrv::DtOsgLightManager::deactivateLights ( )

Disable all GLLights managed by this class.

int makVrv::DtOsgLightManager::getTextureStartOffset ( void  ) const
const Vector2_uint32& makVrv::DtOsgLightManager::GetTileSize ( void  ) const
const Vector2_uint32& makVrv::DtOsgLightManager::GetGridMaxDims ( void  ) const
void makVrv::DtOsgLightManager::releaseGLObjects ( void  )
void makVrv::DtOsgLightManager::updateLightOnOffStatus ( DtDe de,
const VectorLights &  lights 
)
protected
bool makVrv::DtOsgLightManager::computeLightStatusForTime ( DtDe de,
DtLight pDtLight,
DtOsgSkyObject skyObject 
)
protected

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

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

Member Data Documentation

int makVrv::DtOsgLightManager::myReservedID
protected
DtDe& makVrv::DtOsgLightManager::myDe
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
private
MapLightSourceHashToLights makVrv::DtOsgLightManager::myMapLightSourceHashToLights
private
DtOsgLightsObserver* makVrv::DtOsgLightManager::myOsgLightsObserver
private

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

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)