VR-Forces 4.8 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 Member Functions | Protected Attributes | Private Member Functions
makVrv::DtShaderEffectRain Class Reference

DtShaderEffectRain injects custom shaders into the scene, Handles rain on the ground causing the ground to look damp. More...

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

Classes

class  RainEffectGeneration
 

Public Member Functions

virtual ~DtShaderEffectRain ()
 DTOR. More...
 
virtual void initializeEffect (const std::vector< osg::StateSet * > &stateSets, DtIndirectTextureProcessor *textureProcessor, DtOsgRenderer &osgRenderer)
 initializes or reinitializes the effects. More...
 
virtual void registerWeatherEffectsObject (DtOsgWeatherEffectsObject *weatherEffectsObject)
 called by the DtOsgWeatherEffectsObject constructor to register itself when it is created. More...
 
virtual void releaseGLObjects (osg::State *state)
 handle destruction of graphics objects when the context is destroyed 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...
 
- Public Member Functions inherited from makVrv::DtShaderEffect
virtual ~DtShaderEffect ()
 DTOR. More...
 
virtual void updateTextureUniforms (unsigned int contextId)
 update the texture uniforms for this shader effect More...
 
virtual void setEffectDirty (bool dirty)
 set this effect dirty so that it will be reinitialized before the next time it is run More...
 
virtual bool effectDirty ()
 get if this effect is dirty 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 DtShaderEffectRaininstance (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 Member Functions

 DtShaderEffectRain (DtDe &de)
 constructor, protected since this is a singleton class that creates itself in instance() More...
 
virtual RainEffectGenerationcreateRainEffectJob ()
 wrapper around the job creation to make it easy to override later. More...
 
virtual void slot_rainAccumulationChanged (double depth)
 handle changes to the ground rain accumultation from the weather effects object More...
 
- Protected Member Functions inherited from makVrv::DtShaderEffect
 DtShaderEffect (DtDe &de)
 constructor More...
 
virtual int loadShaderEffectTexture (const std::string &filename, const std::string &uniformName)
 load a texture from a file and set it up as a bindless texture with the address in the specified uniform name More...
 
virtual int addShaderEffectTexture (osg::Texture *shaderEffectTexture, const std::string &uniformName)
 add a texture and set it up as a bindless texture with the address in the specified uniform name More...
 

Protected Attributes

DtSignalConnectionManager myConnections
 
osg::ref_ptr< osg::Uniform > myEnableRainUniform
 
osg::ref_ptr< osg::Uniform > myRainUpThresholdUniform
 
osg::ref_ptr< osg::Uniform > myRainColorUniform
 
osg::ref_ptr< osg::Uniform > myRainMaskedRoadUniform
 
GLuint myRainEffectTextureId
 
osg::ref_ptr< osg::Texture2D > myRainEffectTexture
 
DtOsgRenderermyOsgRenderer
 
bool myRainEnabled
 
float myRainUpThresholdRange
 
float myRainUpThresholdMin
 
float myRainMaskedRoadMax
 
float myRainMaskedRoadRange
 
bool myEnablePuddleEffects
 
osg::Vec4 myRainColor
 
DtOsgWeatherEffectsObjectmyWeatherEffectsObject
 
RainEffectGenerationmyRainEffectGenerationJob
 
- Protected Attributes inherited from makVrv::DtShaderEffect
DtDemyDe
 
TextureDataPtrVector myShaderEffectTextures
 
bool myEffectDirty
 

Private Member Functions

 DtShaderEffectRain ()
 unimplemented private default constructor More...
 
 DtShaderEffectRain (const DtShaderEffectRain &)
 Copy Constructor not implemented – Copy not allowed. More...
 
DtShaderEffectRainoperator= (const DtShaderEffectRain &)
 Assignment Operator not implemented – Copy not allowed. More...
 

Additional Inherited Members

- Public Types inherited from makVrv::DtShaderEffect
typedef std::vector
< DtShaderEffectTextureData
TextureDataPtrVector
 

Detailed Description

DtShaderEffectRain injects custom shaders into the scene, Handles rain on the ground causing the ground to look damp.

Also adds an effect to puddled areas which show rain drops in the puddles.

Constructor & Destructor Documentation

virtual makVrv::DtShaderEffectRain::~DtShaderEffectRain ( )
virtual

DTOR.

makVrv::DtShaderEffectRain::DtShaderEffectRain ( DtDe de)
protected

constructor, protected since this is a singleton class that creates itself in instance()

makVrv::DtShaderEffectRain::DtShaderEffectRain ( )
private

unimplemented private default constructor

makVrv::DtShaderEffectRain::DtShaderEffectRain ( const DtShaderEffectRain )
private

Copy Constructor not implemented – Copy not allowed.

Member Function Documentation

DtShaderEffectRain& makVrv::DtShaderEffectRain::operator= ( const DtShaderEffectRain )
private

Assignment Operator not implemented – Copy not allowed.

virtual void makVrv::DtShaderEffectRain::initializeEffect ( const std::vector< osg::StateSet * > &  stateSets,
DtIndirectTextureProcessor textureProcessor,
DtOsgRenderer osgRenderer 
)
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

Reimplemented from makVrv::DtShaderEffect.

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

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

Implements makVrv::DtShaderEffect.

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

handle destruction of graphics objects when the context is destroyed

Implements makVrv::DtShaderEffect.

virtual void makVrv::DtShaderEffectRain::updateImGui ( )
virtual

update the imgui widgets and readback any changes from them

Implements makVrv::DtShaderEffect.

virtual void makVrv::DtShaderEffectRain::updateUniforms ( )
virtual

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

Implements makVrv::DtShaderEffect.

virtual RainEffectGeneration* makVrv::DtShaderEffectRain::createRainEffectJob ( )
protectedvirtual

wrapper around the job creation to make it easy to override later.

virtual void makVrv::DtShaderEffectRain::slot_rainAccumulationChanged ( double  depth)
protectedvirtual

handle changes to the ground rain accumultation from the weather effects object

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

Get/create instance of sky object manager.

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

Get the name this class is registered by.

Member Data Documentation

DtSignalConnectionManager makVrv::DtShaderEffectRain::myConnections
protected
osg::ref_ptr<osg::Uniform> makVrv::DtShaderEffectRain::myEnableRainUniform
protected
osg::ref_ptr<osg::Uniform> makVrv::DtShaderEffectRain::myRainUpThresholdUniform
protected
osg::ref_ptr<osg::Uniform> makVrv::DtShaderEffectRain::myRainColorUniform
protected
osg::ref_ptr<osg::Uniform> makVrv::DtShaderEffectRain::myRainMaskedRoadUniform
protected
GLuint makVrv::DtShaderEffectRain::myRainEffectTextureId
protected
osg::ref_ptr<osg::Texture2D> makVrv::DtShaderEffectRain::myRainEffectTexture
protected
DtOsgRenderer& makVrv::DtShaderEffectRain::myOsgRenderer
protected
bool makVrv::DtShaderEffectRain::myRainEnabled
protected
float makVrv::DtShaderEffectRain::myRainUpThresholdRange
protected
float makVrv::DtShaderEffectRain::myRainUpThresholdMin
protected
float makVrv::DtShaderEffectRain::myRainMaskedRoadMax
protected
float makVrv::DtShaderEffectRain::myRainMaskedRoadRange
protected
bool makVrv::DtShaderEffectRain::myEnablePuddleEffects
protected
osg::Vec4 makVrv::DtShaderEffectRain::myRainColor
protected
DtOsgWeatherEffectsObject* makVrv::DtShaderEffectRain::myWeatherEffectsObject
protected
RainEffectGeneration* makVrv::DtShaderEffectRain::myRainEffectGenerationJob
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)