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::DtShaderEffectSnow Class Reference

DtShaderEffectSnow injects custom shaders into the scene, Handles snow on the ground causing the ground to look covered by snow. More...

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

Classes

class  SnowEffectGeneration
 

Public Member Functions

virtual ~DtShaderEffectSnow ()
 DTOR. More...
 
virtual void initializeEffect (const std::vector< osg::StateSet * > &statesets, DtIndirectTextureProcessor *textureProcessor, DtOsgRenderer &osgRenderer)
 initializes or reinitializes the effects. More...
 
virtual void releaseGLObjects (osg::State *state)
 handle destruction of graphics objects when the context is destroyed More...
 
virtual void registerWeatherEffectsObject (DtOsgWeatherEffectsObject *weatherEffectsObject)
 called by the DtOsgWeatherEffectsObject constructor to register itself when it is created. More...
 
virtual void reloadShader ()
 mark the effect as dirty so the shaders are reloaded. 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 DtShaderEffectSnowinstance (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

 DtShaderEffectSnow (DtDe &de)
 constructor More...
 
virtual void slot_snowAccumulationChanged (double depth)
 listen to the snow accumulation changes from the environment More...
 
virtual void slot_snowRoadAccumulationChanged (double depth)
 listen to the snow road accumulation changes from the environment More...
 
virtual void slot_snowMinimumElevationChanged (double elevation)
 listen to the snow minimum elevation changes from the environment More...
 
virtual void slot_snowElevationTransitionChagned (double elevation)
 listen to the snow elevation transition changes from the environment More...
 
virtual SnowEffectGenerationcreateSnowEffectJob ()
 wrapper around the job creation to make it easy to override later. 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 > myEnableSnowUniform
 
osg::ref_ptr< osg::Uniform > mySnowUpThresholdUniform
 
osg::ref_ptr< osg::Uniform > mySnowColorUniform
 
osg::ref_ptr< osg::Uniform > mySnowMaskedRoadUniform
 
GLuint mySnowEffectTextureId
 
GLuint64 mySnowEffectImageHandle
 
osg::ref_ptr< osg::Texture2D > mySnowEffectTexture
 
bool mySnowEnabled
 
float mySnowUpThresholdRange
 
float mySnowUpThresholdMin
 
float mySnowElevationMin
 
float mySnowElevationRange
 
float mySnowMaskedRoadMax
 
float mySnowMaskedRoadRange
 
bool myEnableBlowingSnow
 
osg::Vec4 mySnowColor
 
DtOsgWeatherEffectsObjectmyWeatherEffectsObject
 
SnowEffectGenerationmySnowEffectGenerationJob
 
DtOsgRenderermyOsgRenderer
 
- Protected Attributes inherited from makVrv::DtShaderEffect
DtDemyDe
 
TextureDataPtrVector myShaderEffectTextures
 
bool myEffectDirty
 

Private Member Functions

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

Additional Inherited Members

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

Detailed Description

DtShaderEffectSnow injects custom shaders into the scene, Handles snow on the ground causing the ground to look covered by snow.

Also adds an effect to road areas which show snow blowing over the road

Constructor & Destructor Documentation

virtual makVrv::DtShaderEffectSnow::~DtShaderEffectSnow ( )
virtual

DTOR.

makVrv::DtShaderEffectSnow::DtShaderEffectSnow ( DtDe de)
protected

constructor

makVrv::DtShaderEffectSnow::DtShaderEffectSnow ( )
private

unimplemented private default constructor

makVrv::DtShaderEffectSnow::DtShaderEffectSnow ( const DtShaderEffectSnow )
private

Copy Constructor not implemented – Copy not allowed.

Member Function Documentation

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

Assignment Operator not implemented – Copy not allowed.

virtual void makVrv::DtShaderEffectSnow::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::DtShaderEffectSnow::releaseGLObjects ( osg::State *  state)
virtual

handle destruction of graphics objects when the context is destroyed

Implements makVrv::DtShaderEffect.

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

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

Implements makVrv::DtShaderEffect.

virtual void makVrv::DtShaderEffectSnow::reloadShader ( )
virtual

mark the effect as dirty so the shaders are reloaded.

virtual void makVrv::DtShaderEffectSnow::updateImGui ( )
virtual

update the imgui widgets and readback any changes from them

Implements makVrv::DtShaderEffect.

virtual void makVrv::DtShaderEffectSnow::updateUniforms ( )
virtual

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

Implements makVrv::DtShaderEffect.

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

Get/create instance of sky object manager.

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

Get the name this class is registered by.

virtual void makVrv::DtShaderEffectSnow::slot_snowAccumulationChanged ( double  depth)
protectedvirtual

listen to the snow accumulation changes from the environment

virtual void makVrv::DtShaderEffectSnow::slot_snowRoadAccumulationChanged ( double  depth)
protectedvirtual

listen to the snow road accumulation changes from the environment

virtual void makVrv::DtShaderEffectSnow::slot_snowMinimumElevationChanged ( double  elevation)
protectedvirtual

listen to the snow minimum elevation changes from the environment

virtual void makVrv::DtShaderEffectSnow::slot_snowElevationTransitionChagned ( double  elevation)
protectedvirtual

listen to the snow elevation transition changes from the environment

virtual SnowEffectGeneration* makVrv::DtShaderEffectSnow::createSnowEffectJob ( )
protectedvirtual

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

Member Data Documentation

DtSignalConnectionManager makVrv::DtShaderEffectSnow::myConnections
protected
osg::ref_ptr<osg::Uniform> makVrv::DtShaderEffectSnow::myEnableSnowUniform
protected
osg::ref_ptr<osg::Uniform> makVrv::DtShaderEffectSnow::mySnowUpThresholdUniform
protected
osg::ref_ptr<osg::Uniform> makVrv::DtShaderEffectSnow::mySnowColorUniform
protected
osg::ref_ptr<osg::Uniform> makVrv::DtShaderEffectSnow::mySnowMaskedRoadUniform
protected
GLuint makVrv::DtShaderEffectSnow::mySnowEffectTextureId
protected
GLuint64 makVrv::DtShaderEffectSnow::mySnowEffectImageHandle
protected
osg::ref_ptr<osg::Texture2D> makVrv::DtShaderEffectSnow::mySnowEffectTexture
protected
bool makVrv::DtShaderEffectSnow::mySnowEnabled
protected
float makVrv::DtShaderEffectSnow::mySnowUpThresholdRange
protected
float makVrv::DtShaderEffectSnow::mySnowUpThresholdMin
protected
float makVrv::DtShaderEffectSnow::mySnowElevationMin
protected
float makVrv::DtShaderEffectSnow::mySnowElevationRange
protected
float makVrv::DtShaderEffectSnow::mySnowMaskedRoadMax
protected
float makVrv::DtShaderEffectSnow::mySnowMaskedRoadRange
protected
bool makVrv::DtShaderEffectSnow::myEnableBlowingSnow
protected
osg::Vec4 makVrv::DtShaderEffectSnow::mySnowColor
protected
DtOsgWeatherEffectsObject* makVrv::DtShaderEffectSnow::myWeatherEffectsObject
protected
SnowEffectGeneration* makVrv::DtShaderEffectSnow::mySnowEffectGenerationJob
protected
DtOsgRenderer& makVrv::DtShaderEffectSnow::myOsgRenderer
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)