VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
makVrv::DtWeatherEffectDrawable Class Reference

A drawable for drawing weather effects such as hail. The class serves as a place to setup common state settings for all weather effects along with a draw point entry and an entry to release GL objects.

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

Classes

struct  TextureEntry
 

Public Member Functions

 DtWeatherEffectDrawable (makVrv::DtDe &de, DtWeatherLayerGroup *weatherLayerGroup)
 
 DtWeatherEffectDrawable (const DtWeatherEffectDrawable &orig, const osg::CopyOp &opr)
 
virtual ~DtWeatherEffectDrawable ()
 
virtual osg::Object * clone (const osg::CopyOp &copyop) const
 
virtual osg::Object * cloneType () const
 
virtual bool init ()
 
virtual void SetCameraBasis (const osg::Matrixd &basisRot)
 
virtual osg::Texture2D * getTexture (const char *imagePath)
 
virtual void releaseGLObjects (osg::State *state) const
 
virtual void drawImplementation (osg::RenderInfo &renderInfo) const
 
virtual void applyState (DtWeatherEffect::DrawData &drawData) const
 
virtual void applyHeightMap (DtWeatherEffect::DrawData &drawData) const
 

Protected Member Functions

virtual bool loadShaders ()
 
virtual void connectSignals ()
 
virtual void slot_reloadShaders ()
 
virtual void setupSoftness (osg::Camera *camera) const
 
virtual float computeNearClip (osg::Camera *camera) const
 
virtual void clearTextureLibrary () const
 

Protected Attributes

DtDemyDe
 
DtWeatherLayerGroupmyWeatherLayerGroup
 
bool myInitialized
 
osg::ref_ptr< osg::Texture2D > myTexture
 
osg::ref_ptr< osg::StateSet > myStateSet
 
osg::Matrixd myBasisRot
 
DtSignalConnectionManager myConnections
 

Private Member Functions

 DtWeatherEffectDrawable ()=delete
 
 DtWeatherEffectDrawable (const DtWeatherEffectDrawable &other)=delete
 
DtWeatherEffectDrawableoperator= (const DtWeatherEffectDrawable &other)=delete
 

Private Attributes

osg::ref_ptr< osg::Uniform > myMutableInvPersMatrixUniform
 
osg::ref_ptr< osg::Uniform > myMutablePersMatrixUniform
 
osg::ref_ptr< osg::Uniform > myMutableViewportUniform
 
osg::ref_ptr< osg::Uniform > myMutableIsReflectionUniform
 
osg::ref_ptr< osg::Uniform > myMutableSoftnessUniform
 
osg::ref_ptr< osg::Uniform > myMutableModelAxisXUniform
 
osg::ref_ptr< osg::Uniform > myMutableModelAxisZUniform
 
osg::ref_ptr< osg::Uniform > myMutableViewMatrixInvUniform
 
std::vector< TextureEntry * > myTextureLibrary
 

Constructor & Destructor Documentation

makVrv::DtWeatherEffectDrawable::DtWeatherEffectDrawable ( makVrv::DtDe de,
DtWeatherLayerGroup weatherLayerGroup 
)

CTOR.

makVrv::DtWeatherEffectDrawable::DtWeatherEffectDrawable ( const DtWeatherEffectDrawable orig,
const osg::CopyOp &  opr 
)

Copy constructor needed because it is derived from osg::Drawable.

virtual makVrv::DtWeatherEffectDrawable::~DtWeatherEffectDrawable ( )
virtual

DTOR.

makVrv::DtWeatherEffectDrawable::DtWeatherEffectDrawable ( )
privatedelete

Default Constructor not implemented.

makVrv::DtWeatherEffectDrawable::DtWeatherEffectDrawable ( const DtWeatherEffectDrawable other)
privatedelete

Copy Constructor not implemented - Copy not allowed.

Member Function Documentation

DtWeatherEffectDrawable& makVrv::DtWeatherEffectDrawable::operator= ( const DtWeatherEffectDrawable other)
privatedelete

Assignment Operator not implemented - Assignment not allowed.

virtual osg::Object* makVrv::DtWeatherEffectDrawable::clone ( const osg::CopyOp &  copyop) const
inlinevirtual

required functions for derriving from osg::Drawable

virtual osg::Object* makVrv::DtWeatherEffectDrawable::cloneType ( ) const
inlinevirtual
virtual bool makVrv::DtWeatherEffectDrawable::init ( )
virtual

Initializes the uniforms and state attributes for the drawable.

virtual void makVrv::DtWeatherEffectDrawable::SetCameraBasis ( const osg::Matrixd &  basisRot)
virtual

Sets the earth basis rotation for the current camera being rendered.

Parameters
basisRotThe earth basis rotation at the camera location.
virtual osg::Texture2D* makVrv::DtWeatherEffectDrawable::getTexture ( const char imagePath)
virtual

Gets or creates a texture associated with the given image path. image path is relative to the MAK data path.

Parameters
texturePathThe image path.
virtual void makVrv::DtWeatherEffectDrawable::releaseGLObjects ( osg::State *  state) const
virtual

Release all gl objects used by this system.

virtual void makVrv::DtWeatherEffectDrawable::drawImplementation ( osg::RenderInfo &  renderInfo) const
virtual

Actually do the drawing.

virtual void makVrv::DtWeatherEffectDrawable::applyState ( DtWeatherEffect::DrawData drawData) const
virtual

Applies common state for drawing.

virtual void makVrv::DtWeatherEffectDrawable::applyHeightMap ( DtWeatherEffect::DrawData drawData) const
virtual

Applies the heightmap state for drawing.

virtual bool makVrv::DtWeatherEffectDrawable::loadShaders ( )
protectedvirtual

Loads shaders used to draw effect objects.

virtual void makVrv::DtWeatherEffectDrawable::connectSignals ( )
protectedvirtual

Connects all the signals, Non-virtural, called in the ctor.

virtual void makVrv::DtWeatherEffectDrawable::slot_reloadShaders ( )
protectedvirtual

Signal handler to reload the shaders.

virtual void makVrv::DtWeatherEffectDrawable::setupSoftness ( osg::Camera *  camera) const
protectedvirtual

Setup softness parameters used when drawing.

camera The current camera being drawn.

virtual float makVrv::DtWeatherEffectDrawable::computeNearClip ( osg::Camera *  camera) const
protectedvirtual

Computes the frustum near clip in meters.

Parameters
cameraThe camera to extract the near clip from.
virtual void makVrv::DtWeatherEffectDrawable::clearTextureLibrary ( ) const
protectedvirtual

Clear out any textures we are referencing.

Member Data Documentation

DtDe& makVrv::DtWeatherEffectDrawable::myDe
protected
DtWeatherLayerGroup* makVrv::DtWeatherEffectDrawable::myWeatherLayerGroup
protected
bool makVrv::DtWeatherEffectDrawable::myInitialized
protected
osg::ref_ptr<osg::Texture2D> makVrv::DtWeatherEffectDrawable::myTexture
protected
osg::ref_ptr<osg::StateSet> makVrv::DtWeatherEffectDrawable::myStateSet
protected
osg::Matrixd makVrv::DtWeatherEffectDrawable::myBasisRot
protected
DtSignalConnectionManager makVrv::DtWeatherEffectDrawable::myConnections
protected
osg::ref_ptr<osg::Uniform> makVrv::DtWeatherEffectDrawable::myMutableInvPersMatrixUniform
mutableprivate

needed for smoothness These are mutable because they are used as part of the const drawImplementation.

osg::ref_ptr<osg::Uniform> makVrv::DtWeatherEffectDrawable::myMutablePersMatrixUniform
mutableprivate
osg::ref_ptr<osg::Uniform> makVrv::DtWeatherEffectDrawable::myMutableViewportUniform
mutableprivate
osg::ref_ptr<osg::Uniform> makVrv::DtWeatherEffectDrawable::myMutableIsReflectionUniform
mutableprivate
osg::ref_ptr<osg::Uniform> makVrv::DtWeatherEffectDrawable::myMutableSoftnessUniform
mutableprivate
osg::ref_ptr<osg::Uniform> makVrv::DtWeatherEffectDrawable::myMutableModelAxisXUniform
mutableprivate

These are mutable because they are used as part of the const drawImplementation.

osg::ref_ptr<osg::Uniform> makVrv::DtWeatherEffectDrawable::myMutableModelAxisZUniform
mutableprivate
osg::ref_ptr<osg::Uniform> makVrv::DtWeatherEffectDrawable::myMutableViewMatrixInvUniform
mutableprivate
std::vector<TextureEntry*> makVrv::DtWeatherEffectDrawable::myTextureLibrary
mutableprivate

This is mutable because it's used as part of the const releaseGLObjects.


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

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)