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

DtShaderEffectManager injects custom shaders into the scenes, uses DtShaderEffect objects to add rendering effects to the ground. More...

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

Classes

struct  DtShaderEffectPerChannelData
 Structure for holding per channel data for the effects. More...
 
class  TextureAddressJob
 

Public Member Functions

virtual ~DtShaderEffectManager ()
 DTOR. More...
 
 DtShaderEffectManager ()=delete
 unimplemented private default constructor More...
 
 DtShaderEffectManager (const DtShaderEffectManager &)=delete
 Copy Constructor not implemented – Copy not allowed. More...
 
DtShaderEffectManageroperator= (const DtShaderEffectManager &)=delete
 Assignment Operator not implemented – Copy not allowed. More...
 
virtual void initializeEffects ()
 initializes or reinitializes the effects. More...
 
virtual void findTextureAddresses (osg::RenderInfo &renderInfo)
 called by the main thread job periodically to check if the texture has been assigned an address. More...
 
virtual TextureAddressJobcreateTextureAddressJob ()
 create the main thread job, wrapper function for the call to new so it can be overridden if we need to change the job class More...
 
virtual void update ()
 called by DtOsgRenderer::update(), updates the per frame uniforms for the shader effects and sets up IMGui More...
 
virtual void updateChannel (DtOsgChannel *channel, osg::Vec3d pos)
 called by DtOsgChannel::update(), updates the per channel uniforms More...
 
virtual void registerWeatherEffectsObject (DtOsgWeatherEffectsObject *weatherEffectsObject)
 called by the DtOsgWeatherEffectsObject constructor to register itself when it is created. More...
 
virtual void slot_reloadShader ()
 called when the signal_reloadShader is triggered. Marks the effect dirty so it can be recreated More...
 
virtual void slot_elevationalConfigurationUpdated (DtEnvironmentInterface::DtElevationalConfigurationRecord rec)
 handle an elevational configuration update signal More...
 
virtual DtOsgWeatherEffectsObjectfindWeatherEffectsObject ()
 Use to get the local settings for the weather effects. Currently only has snow parameters in it. More...
 
virtual const
DtOsgWeatherEffectsObject
findWeatherEffectsObject () const
 Use to get the local settings for the weather effects. Currently only has snow parameters in it. More...
 
virtual void releaseGLObjects (osg::State *state)
 release the gl objects for this class 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 DtShaderEffectManagerinstance (DtDe &de)
 Get/create instance of sky object manager. More...
 
static const std::string & theClassName ()
 Get the name this class is registered by. More...
 

Protected Types

typedef std::set
< DtShaderEffect * > 
ShaderEffectSet
 
typedef std::map
< osg::observer_ptr
< osg::Camera >
, DtShaderEffectPerChannelData * > 
PerChannelDataMap
 
typedef osg::ref_ptr
< osg::CoordinateSystemNode > 
CoordinateSystemNodeRef
 

Protected Member Functions

 DtShaderEffectManager (DtDe &de)
 constructor More...
 
virtual void updateImGui ()
 update the imgui widgets and readback any changes from them More...
 
virtual void updateUniforms ()
 update the uniforms that may need to be changed based on the imgui or regular gui inputs. More...
 
virtual
DtShaderEffectPerChannelData
getOrCreatePerChannelData (osg::Camera *camera)
 gets or creates the data associated with a channel More...
 
virtual void flushInvalidChannels ()
 check if the channel still is valid. If not then destroy the corrisponding shader effects More...
 

Protected Attributes

DtDemyDe
 
DtSignalConnectionManager myConnections
 
osg::ref_ptr
< DtIndirectTextureProcessor
myTextureProcessor
 
DtOsgRenderermyOsgRenderer
 
PerChannelDataMap myPerChannelDataMap
 
CoordinateSystemNodeRef myCoordSystemNode
 
DtOsgWeatherEffectsObjectmyWeatherEffectsObject
 
osg::ref_ptr< TextureAddressJobmyTextureAddressJob
 
float myWindBaseMSAltitude
 
float myWindSpeed
 
float myWindDirection
 
float myVisibilityDistance
 
DtEnvironmentInterface::VisibilityObscurant myVisibilityObscurant
 

Detailed Description

DtShaderEffectManager injects custom shaders into the scenes, uses DtShaderEffect objects to add rendering effects to the ground.

Currently has effects for rain and snow but more could be added for ice, sand, etc...

Member Typedef Documentation

typedef std::map< osg::observer_ptr<osg::Camera>, DtShaderEffectPerChannelData*> makVrv::DtShaderEffectManager::PerChannelDataMap
protected
typedef osg::ref_ptr<osg::CoordinateSystemNode> makVrv::DtShaderEffectManager::CoordinateSystemNodeRef
protected

Constructor & Destructor Documentation

virtual makVrv::DtShaderEffectManager::~DtShaderEffectManager ( )
virtual

DTOR.

makVrv::DtShaderEffectManager::DtShaderEffectManager ( )
delete

unimplemented private default constructor

makVrv::DtShaderEffectManager::DtShaderEffectManager ( const DtShaderEffectManager )
delete

Copy Constructor not implemented – Copy not allowed.

makVrv::DtShaderEffectManager::DtShaderEffectManager ( DtDe de)
protected

constructor

Member Function Documentation

DtShaderEffectManager& makVrv::DtShaderEffectManager::operator= ( const DtShaderEffectManager )
delete

Assignment Operator not implemented – Copy not allowed.

virtual void makVrv::DtShaderEffectManager::initializeEffects ( )
virtual

initializes or reinitializes the effects.

Called by DtOsgRenderer at startup and whenever reload shaders is triggered reloads the shader changes if triggered from reload shaders but the texture is not reloaded off disk due to osgFileCache

virtual void makVrv::DtShaderEffectManager::findTextureAddresses ( osg::RenderInfo &  renderInfo)
virtual

called by the main thread job periodically to check if the texture has been assigned an address.

virtual TextureAddressJob* makVrv::DtShaderEffectManager::createTextureAddressJob ( )
virtual

create the main thread job, wrapper function for the call to new so it can be overridden if we need to change the job class

virtual void makVrv::DtShaderEffectManager::update ( )
virtual

called by DtOsgRenderer::update(), updates the per frame uniforms for the shader effects and sets up IMGui

virtual void makVrv::DtShaderEffectManager::updateChannel ( DtOsgChannel channel,
osg::Vec3d  pos 
)
virtual

called by DtOsgChannel::update(), updates the per channel uniforms

virtual void makVrv::DtShaderEffectManager::registerWeatherEffectsObject ( DtOsgWeatherEffectsObject weatherEffectsObject)
virtual

called by the DtOsgWeatherEffectsObject constructor to register itself when it is created.

virtual void makVrv::DtShaderEffectManager::slot_reloadShader ( )
virtual

called when the signal_reloadShader is triggered. Marks the effect dirty so it can be recreated

virtual void makVrv::DtShaderEffectManager::slot_elevationalConfigurationUpdated ( DtEnvironmentInterface::DtElevationalConfigurationRecord  rec)
virtual

handle an elevational configuration update signal

virtual DtOsgWeatherEffectsObject* makVrv::DtShaderEffectManager::findWeatherEffectsObject ( )
virtual

Use to get the local settings for the weather effects. Currently only has snow parameters in it.

virtual const DtOsgWeatherEffectsObject* makVrv::DtShaderEffectManager::findWeatherEffectsObject ( ) const
virtual

Use to get the local settings for the weather effects. Currently only has snow parameters in it.

virtual void makVrv::DtShaderEffectManager::releaseGLObjects ( osg::State *  state)
virtual

release the gl objects for this class

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

Get/create instance of sky object manager.

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

Get the name this class is registered by.

virtual void makVrv::DtShaderEffectManager::updateImGui ( )
protectedvirtual

update the imgui widgets and readback any changes from them

virtual void makVrv::DtShaderEffectManager::updateUniforms ( )
protectedvirtual

update the uniforms that may need to be changed based on the imgui or regular gui inputs.

virtual DtShaderEffectPerChannelData& makVrv::DtShaderEffectManager::getOrCreatePerChannelData ( osg::Camera *  camera)
protectedvirtual

gets or creates the data associated with a channel

virtual void makVrv::DtShaderEffectManager::flushInvalidChannels ( )
protectedvirtual

check if the channel still is valid. If not then destroy the corrisponding shader effects

Member Data Documentation

DtDe& makVrv::DtShaderEffectManager::myDe
protected
DtSignalConnectionManager makVrv::DtShaderEffectManager::myConnections
protected
osg::ref_ptr<DtIndirectTextureProcessor> makVrv::DtShaderEffectManager::myTextureProcessor
protected
DtOsgRenderer& makVrv::DtShaderEffectManager::myOsgRenderer
protected
PerChannelDataMap makVrv::DtShaderEffectManager::myPerChannelDataMap
protected
CoordinateSystemNodeRef makVrv::DtShaderEffectManager::myCoordSystemNode
protected
DtOsgWeatherEffectsObject* makVrv::DtShaderEffectManager::myWeatherEffectsObject
protected
osg::ref_ptr<TextureAddressJob> makVrv::DtShaderEffectManager::myTextureAddressJob
protected
float makVrv::DtShaderEffectManager::myWindBaseMSAltitude
protected
float makVrv::DtShaderEffectManager::myWindSpeed
protected
float makVrv::DtShaderEffectManager::myWindDirection
protected
float makVrv::DtShaderEffectManager::myVisibilityDistance
protected
DtEnvironmentInterface::VisibilityObscurant makVrv::DtShaderEffectManager::myVisibilityObscurant
protected

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

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)