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 | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
makVrv::DtWeatherEffectDrawable Class Reference

A drawable for drawing weather effects such as hail. More...

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

Classes

struct  TextureEntry
 brief A structure used to hold information about a texture. More...
 

Public Member Functions

 DtWeatherEffectDrawable (makVrv::DtDe &de, DtWeatherLayerGroup *weatherLayerGroup)
 CTOR. More...
 
 DtWeatherEffectDrawable (const DtWeatherEffectDrawable &orig, const osg::CopyOp &opr)
 Copy constructor needed because it is derived from osg::Drawable. More...
 
virtual ~DtWeatherEffectDrawable ()
 DTOR. More...
 
virtual osg::Object * clone (const osg::CopyOp &copyop) const
 required functions for derriving from osg::Drawable More...
 
virtual osg::Object * cloneType () const
 
virtual bool init ()
 Initializes the uniforms and state attributes for the drawable. More...
 
virtual void SetCameraBasis (const osg::Matrixd &basisRot)
 Sets the earth basis rotation for the current camera being rendered. More...
 
virtual void SetCulled (bool culled)
 Called during scene culling to set the drawable culled state. More...
 
virtual osg::Texture2D * getTexture (const char *imagePath)
 Gets or creates a texture associated with the given image path. More...
 
virtual void releaseGLObjects (osg::State *state) const
 Release all gl objects used by this system. More...
 
virtual void drawImplementation (osg::RenderInfo &renderInfo) const
 Actually do the drawing. More...
 
virtual void applyState (DtWeatherEffect::DrawData &drawData) const
 Applies common state for drawing. More...
 
virtual void applyHeightMap (DtWeatherEffect::DrawData &drawData) const
 Applies the heightmap state for drawing. More...
 

Protected Member Functions

virtual bool loadShaders ()
 Loads shaders used to draw effect objects. More...
 
virtual void connectSignals ()
 Connects all the signals, Non-virtural, called in the ctor. More...
 
virtual void disconnectSignals ()
 Disconnects all the signals, called in the dtor. More...
 
virtual void slot_reloadShaders ()
 Signal handler to reload the shaders. More...
 
virtual void setupSoftness (osg::Camera *camera) const
 Setup softness parameters used when drawing. More...
 
virtual float computeNearClip (osg::Camera *camera) const
 Computes the frustum near clip in meters. More...
 
virtual void clearTextureLibrary () const
 Clear out any textures we are referencing. More...
 

Protected Attributes

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

Private Member Functions

 DtWeatherEffectDrawable ()=delete
 Default Constructor not implemented. More...
 
 DtWeatherEffectDrawable (const DtWeatherEffectDrawable &other)=delete
 Copy Constructor not implemented - Copy not allowed. More...
 
DtWeatherEffectDrawableoperator= (const DtWeatherEffectDrawable &other)=delete
 Assignment Operator not implemented - Assignment not allowed. More...
 

Private Attributes

osg::ref_ptr< osg::Uniform > myMutableInvPersMatrixUniform
 needed for smoothness These are mutable because they are used as part of the const drawImplementation. More...
 
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
 These are mutable because they are used as part of the const drawImplementation. More...
 
osg::ref_ptr< osg::Uniform > myMutableModelAxisZUniform
 
osg::ref_ptr< osg::Uniform > myMutableViewMatrixInvUniform
 
std::vector< TextureEntry * > myTextureLibrary
 This is mutable because it's used as part of the const releaseGLObjects. More...
 

Detailed Description

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.

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 void makVrv::DtWeatherEffectDrawable::SetCulled ( bool  culled)
virtual

Called during scene culling to set the drawable culled state.

Parameters
culledSet to true if the drawable should be culled.
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::disconnectSignals ( )
protectedvirtual

Disconnects all the signals, called in the dtor.

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
bool makVrv::DtWeatherEffectDrawable::myCulled
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 Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)