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 Member Functions | Protected Attributes
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...
 
 DtShaderEffectSnow (DtDe &de)
 constructor More...
 
 DtShaderEffectSnow ()=delete
 unimplemented private default constructor More...
 
 DtShaderEffectSnow (const DtShaderEffectSnow &)=delete
 Copy Constructor not implemented – Copy not allowed. More...
 
DtShaderEffectSnowoperator= (const DtShaderEffectSnow &)=delete
 Assignment Operator not implemented – Copy not allowed. 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) override
 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...
 
virtual void slot_elevationalConfigurationUpdated (DtEnvironmentInterface::DtElevationalConfigurationRecord rec)
 handle an elevational configuration update signal More...
 
- Public Member Functions inherited from makVrv::DtShaderEffect
virtual ~DtShaderEffect ()
 DTOR. More...
 
 DtShaderEffect ()=delete
 unimplemented private default constructor More...
 
 DtShaderEffect (const DtShaderEffect &)=delete
 Copy Constructor not implemented – Copy not allowed. More...
 
DtShaderEffectoperator= (const DtShaderEffect &)=delete
 Assignment Operator not implemented – Copy not allowed. More...
 
virtual void updateTextureUniforms (unsigned int contextId)
 update the texture uniforms for this shader effect More...
 
virtual void setCameraLocation (const DtVector &location)
 sets a location for localized effects. 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 const std::string & theClassName ()
 Get the name this class is registered by. More...
 

Protected Member Functions

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_snowElevationTransitionChanged (double elevation)
 listen to the snow elevation transition changes from the environment More...
 
virtual void slot_PreObserverUpdate (double simTime)
 handle the pre objeserver update. 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
 
osg::ref_ptr< osg::Uniform > mySnowWindUniform
 
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
 
osg::Vec4 myWindUniform
 
float myWindOffset
 
double myLastSimulationTime
 
DtOsgWeatherEffectsObjectmyWeatherEffectsObject
 
SnowEffectGenerationmySnowEffectGenerationJob
 
DtOsgRenderermyOsgRenderer
 
- Protected Attributes inherited from makVrv::DtShaderEffect
DtDemyDe
 
TextureDataPtrVector myShaderEffectTextures
 
bool myEffectDirty
 

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)

constructor

makVrv::DtShaderEffectSnow::DtShaderEffectSnow ( )
delete

unimplemented private default constructor

makVrv::DtShaderEffectSnow::DtShaderEffectSnow ( const DtShaderEffectSnow )
delete

Copy Constructor not implemented – Copy not allowed.

Member Function Documentation

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

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)
overridevirtual

handle destruction of graphics objects when the context is destroyed

Reimplemented from 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.

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

handle an elevational configuration update signal

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_snowElevationTransitionChanged ( double  elevation)
protectedvirtual

listen to the snow elevation transition changes from the environment

virtual void makVrv::DtShaderEffectSnow::slot_PreObserverUpdate ( double  simTime)
protectedvirtual

handle the pre objeserver update.

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
osg::ref_ptr<osg::Uniform> makVrv::DtShaderEffectSnow::mySnowWindUniform
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
osg::Vec4 makVrv::DtShaderEffectSnow::myWindUniform
protected
float makVrv::DtShaderEffectSnow::myWindOffset
protected
double makVrv::DtShaderEffectSnow::myLastSimulationTime
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 Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)