![]() |
VR-Forces 4.10 Class Documentation
|
A weather layer uses one or more weather effects to create a top level visual. More...

Public Types | |
| enum | LayerType { LayerTypeNone, LayerTypeBlowingDust, LayerTypeBlowingSand, LayerTypeBlowingSnow, LayerTypeHail } |
| brief Layer type enumerations. More... | |
Public Member Functions | |
| virtual | ~DtWeatherLayer () |
| DTOR. More... | |
| virtual void | init (DtDe &de) |
| Called after creation to initialize effects. 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 DtWeatherLayer::LayerType | layerType () const |
| Gets a type for 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... | |
| virtual void | addWeatherEffect (DtWeatherEffect *effect) |
| Adds the given weather effect to 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 | |
| DtWeatherLayer (DtUniqueID id) | |
| CTOR. More... | |
| virtual void | drawAreaWeatherEffectsForLayerType (DtWeatherEffect::DrawData &drawData, DtWeatherLayer::LayerType layerType) |
| Draw all weather effects in areas that match the given layer type. More... | |
| virtual void | computeSurfaceParameters (DtWeatherEffect::DrawData &drawData, DtWeatherArea *area) |
| Computes and sets up effect surface drawing parameters. More... | |
Protected Attributes | |
| DtUniqueID | myId |
| LayerType | myLayerType |
| WeatherEffectSet | myWeatherEffectSet |
| float | myIntensity |
Private Member Functions | |
| DtWeatherLayer ()=delete | |
| Default Constructor not implemented. More... | |
| DtWeatherLayer (const DtWeatherLayer &other)=delete | |
| Copy Constructor not implemented - Copy not allowed. More... | |
| DtWeatherLayer & | operator= (const DtWeatherLayer &other)=delete |
| Assignment Operator not implemented - Assignment not allowed. More... | |
A weather layer uses one or more weather effects to create a top level visual.
A weather layer simulates an environmental condition such as blowing snow or rain. Weather layers can be globally visible or visible based on weather areas (see DtWeatherArea).
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
|
protected |
This type defines a set of weather effects.
|
virtual |
DTOR.
|
protected |
CTOR.
|
privatedelete |
Default Constructor not implemented.
|
privatedelete |
Copy Constructor not implemented - Copy not allowed.
|
privatedelete |
Assignment Operator not implemented - Assignment not allowed.
|
virtual |
Called after creation to initialize effects.
Reimplemented in makVrv::DtWeatherLayerBlowingDust, makVrv::DtWeatherLayerBlowingSand, makVrv::DtWeatherLayerBlowingSnow, and makVrv::DtWeatherLayerHail.
| DtUniqueID makVrv::DtWeatherLayer::id | ( | ) | const |
Gets the layer unique id.
|
virtual |
Release all gl objects used by items in this layer.
|
virtual |
Gets a type for this layer.
The layer type is used for determining things like tying layers to weather areas.
|
virtual |
Sets the weather intensity for this layer.
This will control the intensity of weather effects.
| level | The intensity value (0.0 - 1.0). |
| float makVrv::DtWeatherLayer::intensity | ( | ) | const |
Gets the weather intensity for this layer.
|
virtual |
Sets the current wind.
| windDirectionRad | The wind direction in radians. |
| windSpeedMps | The wind speed in meters per second. |
|
virtual |
Run a simulation update for weather effects in this layer.
| timeStep | The time step to simulate. |
| currentTime | The current simulation time. |
| jobSplitter | A job splitter to add simulation jobs to. |
|
virtual |
Run a post simulation update.
This is specifically here to update things that might not be job thread safe.
| timeStep | The time step to simulate. |
|
virtual |
Prepares the layer for drawing based on the camera position.
| camPos | The camera position. |
| basisRot | The basis rotation at the camera location. |
| jobSplitter | A job splitter to add predraw jobs to. |
|
virtual |
Draw all weather effects in this layer.
Reimplemented in makVrv::DtWeatherLayerBlowingDust, makVrv::DtWeatherLayerBlowingSand, and makVrv::DtWeatherLayerBlowingSnow.
|
virtual |
Adds the given weather effect to this layer.
| effect | The effect to add. |
|
protectedvirtual |
Draw all weather effects in areas that match the given layer type.
| drawData | The drawing data that contains areas and data used for drawing. |
| layerType | The desired layer type for matching areas. |
|
protectedvirtual |
Computes and sets up effect surface drawing parameters.
| drawData | The drawing data structure containing draw parameters. |
| area | The area containing a surface. |
|
protected |
|
protected |
|
protected |
|
protected |