VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Friends
makVrv::DtWeatherLayer Class Reference

A weather layer uses one or more weather effects to create a top level visual. More...

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

Public Member Functions

 DtWeatherLayer (DtUniqueID id)
 CTOR. More...
 
virtual ~DtWeatherLayer ()
 DTOR. More...
 
DtUniqueID id () const
 Gets the layer unique id. More...
 
virtual void releaseGLObjects (osg::State *state) const
 Release all gl objects used by items in this layer. More...
 
virtual void setIntensity (float level)
 Sets the weather intensity for this layer. More...
 
float intensity () const
 Gets the weather intensity for this layer. More...
 
virtual void setWind (float windDirectionRad, float windSpeedMps)
 Sets the current wind. More...
 
virtual void simulationUpdate (float timeStep, double currentTime, DtJobSplitter *jobSplitter)
 Run a simulation update for weather effects in this layer. More...
 
virtual void postSimulationUpdate (float timeStep, double currentTime)
 Run a post simulation update. More...
 
virtual void cullUpdate (const osg::Vec3d &camPos, const osg::Matrixd &basis, DtJobSplitter *jobSplitter)
 Prepares the layer for drawing based on the camera position. More...
 
virtual void drawWeatherEffects (DtWeatherEffect::DrawData &drawData)
 Draw all weather effects in this layer. More...
 
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 Do nothing constructor. More...
 
virtual ~DtVirtualBaseClass ()
 Virtual do nothing destructor. More...
 

Protected Types

typedef std::vector
< DtWeatherEffect * > 
WeatherEffectSet
 This type defines a set of weather effects. More...
 

Protected Member Functions

void addWeatherEffect (DtWeatherEffect *effect)
 Adds the given weather effect to this layer. More...
 

Protected Attributes

DtUniqueID myId
 
WeatherEffectSet myWeatherEffectSet
 
float myIntensity
 

Private Member Functions

 DtWeatherLayer ()
 Default Constructor not implemented. More...
 
 DtWeatherLayer (const DtWeatherLayer &other)
 Copy Constructor not implemented - Copy not allowed. More...
 
DtWeatherLayeroperator= (const DtWeatherLayer &other)
 Assignment Operator not implemented - Assignment not allowed. More...
 

Friends

class DtHailWeatherLayerCreator
 

Detailed Description

A weather layer uses one or more weather effects to create a top level visual.

This class has a simulation update which updates all active weather effects in the layer. Weather effects queue update jobs to a job splitter which is provided by the update caller. There is also a post update for each weather effect for items that cannot use multithreading (currently intersection tests).

During scenegraph culling, this class calls cull methods on individual weather effects. If a weather effect is not culled, it submits a sort job to a job splitter

Member Typedef Documentation

This type defines a set of weather effects.

Constructor & Destructor Documentation

makVrv::DtWeatherLayer::DtWeatherLayer ( DtUniqueID  id)

CTOR.

virtual makVrv::DtWeatherLayer::~DtWeatherLayer ( )
virtual

DTOR.

makVrv::DtWeatherLayer::DtWeatherLayer ( )
private

Default Constructor not implemented.

makVrv::DtWeatherLayer::DtWeatherLayer ( const DtWeatherLayer other)
private

Copy Constructor not implemented - Copy not allowed.

Member Function Documentation

DtUniqueID makVrv::DtWeatherLayer::id ( ) const

Gets the layer unique id.

virtual void makVrv::DtWeatherLayer::releaseGLObjects ( osg::State *  state) const
virtual

Release all gl objects used by items in this layer.

virtual void makVrv::DtWeatherLayer::setIntensity ( float  level)
virtual

Sets the weather intensity for this layer.

This will control the intensity of weather effects.

Parameters
levelThe intensity value (0.0 - 1.0).
float makVrv::DtWeatherLayer::intensity ( ) const

Gets the weather intensity for this layer.

virtual void makVrv::DtWeatherLayer::setWind ( float  windDirectionRad,
float  windSpeedMps 
)
virtual

Sets the current wind.

Parameters
windDirectionRadThe wind direction in radians.
windSpeedMpsThe wind speed in meters per second.
virtual void makVrv::DtWeatherLayer::simulationUpdate ( float  timeStep,
double  currentTime,
DtJobSplitter jobSplitter 
)
virtual

Run a simulation update for weather effects in this layer.

Parameters
timeStepThe time step to simulate.
currentTimeThe current simulation time.
jobSplitterA job splitter to add simulation jobs to.
virtual void makVrv::DtWeatherLayer::postSimulationUpdate ( float  timeStep,
double  currentTime 
)
virtual

Run a post simulation update.

This is specifically here to update things that might not be job thread safe.

Parameters
timeStepThe time step to simulate.
virtual void makVrv::DtWeatherLayer::cullUpdate ( const osg::Vec3d &  camPos,
const osg::Matrixd &  basis,
DtJobSplitter jobSplitter 
)
virtual

Prepares the layer for drawing based on the camera position.

Parameters
camPosThe camera position.
basisRotThe basis rotation at the camera location.
jobSplitterA job splitter to add predraw jobs to.
virtual void makVrv::DtWeatherLayer::drawWeatherEffects ( DtWeatherEffect::DrawData drawData)
virtual

Draw all weather effects in this layer.

void makVrv::DtWeatherLayer::addWeatherEffect ( DtWeatherEffect effect)
protected

Adds the given weather effect to this layer.

Parameters
effectThe effect to add.
DtWeatherLayer& makVrv::DtWeatherLayer::operator= ( const DtWeatherLayer other)
private

Assignment Operator not implemented - Assignment not allowed.

Friends And Related Function Documentation

friend class DtHailWeatherLayerCreator
friend

Member Data Documentation

DtUniqueID makVrv::DtWeatherLayer::myId
protected
WeatherEffectSet makVrv::DtWeatherLayer::myWeatherEffectSet
protected
float makVrv::DtWeatherLayer::myIntensity
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)