VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtWeatherLayer.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/DtDe.h>
13 
14 #include <vrvOsg/vrvOsg.h>
15 #include <vrvOsg/DtWeatherEffect.h>
16 
18 
19 
20 namespace makVrv
21 {
22  // Forward declarations.
23  class DtJobSplitter;
24  class DtWeatherArea;
25  class DtWeatherEffect;
26  class DtWeatherLayerCreator;
27 
48  {
49  public:
50 
53  enum LayerType
54  {
59  LayerTypeHail
60  };
61 
66  {
70  };
71 
73  virtual ~DtWeatherLayer();
74 
75  protected:
76 
79 
80  private:
81 
83  DtWeatherLayer(const DtWeatherLayer &other) = delete;
84 
86  DtWeatherLayer &operator=(const DtWeatherLayer &other) = delete;
87 
88  public:
89 
91  virtual void init(DtDe &de);
92 
94  virtual void releaseGLObjects(osg::State* state) const;
95 
98  virtual DtWeatherLayer::LayerType layerType() const;
99 
103  virtual void setIntensity(float level);
104 
106  float intensity() const;
107 
111  virtual void setWind(float windDirectionRad, float windSpeedMps);
112 
117  virtual void simulationUpdate(float timeStep, double currentTime,
118  DtJobSplitter* jobSplitter);
119 
123  virtual void postSimulationUpdate(float timeStep, double currentTime);
124 
129  virtual void cullUpdate(const osg::Vec3d& camPos,
130  const osg::Matrixd& basis, DtJobSplitter* jobSplitter);
131 
134  virtual void drawWeatherEffects(DtWeatherEffect::DrawData& drawData);
135 
139  virtual void drawAreaWeatherEffects(DtWeatherEffect::DrawData& drawData,
140  DtWeatherArea* area);
141 
144  virtual void addWeatherEffect(DtWeatherEffect* effect);
145 
148  virtual void setCulled(bool culled);
149 
151  virtual bool culled() const;
152 
153  protected:
154 
158  virtual void computeSurfaceParameters(
159  DtWeatherEffect::DrawData& drawData, DtWeatherArea* area);
160 
161  protected:
162 
164 
166  typedef std::vector<DtWeatherEffect*> WeatherEffectSet;
167 
169 
170  float myIntensity;
171 
172  bool myCulled;
173 
175  };
176 
177 
178 
182  {
183  public:
186 
188  virtual ~DtWeatherLayerFactory();
189 
193  static DtWeatherLayerFactory& instance(DtDe& de);
194 
196  static const std::string& theClassName();
197 
199  virtual DtWeatherLayer* create(DtWeatherLayer::LayerType layerType) const;
200 
201  protected:
202 
204  };
205 
206 }
207 
208 
209 
210 
DT_DLL_EXAMPLESCENEROOTPLUGIN void init(DtDe &anIG)
Definition: DtWeatherLayer.h:67
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
Definition: DtWeatherLayer.h:68
Definition: DtWeatherLayer.h:58
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
DtDe & myDe
Definition: DtWeatherLayer.h:203
bool myCulled
Definition: DtWeatherLayer.h:172
DT_DLL_VRVCORE DtTaitBryan level(const DtCoordinateSystem &cs, const DtVector &localOrigin, double topoHeading)
Returns a level orientation with the topographic heading.
float myIntensity
Definition: DtWeatherLayer.h:170
EffectConstrainType
brief Effect constain type enumerations. Effect constrain types define how layer effects are constrai...
Definition: DtWeatherLayer.h:65
Contains makVrv::DtDe class.
this class is used to split work up between threads.
Definition: DtJobSplitter.h:64
EffectConstrainType myEffectConstrainType
Definition: DtWeatherLayer.h:174
WeatherEffectSet myWeatherEffectSet
Definition: DtWeatherLayer.h:168
Factory that is used to create weather layers.
Definition: DtWeatherLayer.h:181
Definition: DtWeatherLayer.h:55
A structure used to hold data for drawing.
Definition: DtWeatherEffect.h:48
Contains makVrv::DtVirtualBaseClass class.
Contains makVrv::DtWeatherEffect class.
this class is used to create weather effects around the eye to represent effects such as mist...
Definition: DtWeatherEffect.h:43
std::vector< DtWeatherEffect * > WeatherEffectSet
This type defines a set of weather effects.
Definition: DtWeatherLayer.h:166
LayerType myLayerType
Definition: DtWeatherLayer.h:163
Definition: DtWeatherLayer.h:57
A weather layer uses one or more weather effects to create a top level visual.
Definition: DtWeatherLayer.h:47
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:70
Definition: DtWeatherLayer.h:56
A weather area represents localized environmental conditions such as blowing dust, blowing sand, or blowing snow. The default (base class) weather area is mainly used as a bounds for localized environmental information such as precipitation intensity. AreaTypeBlowingDust, AreaTypeBlowingSand, AreaTypeBlowingSnow are specialized weather areas that represent 1 specific environmental condition.
Definition: DtWeatherArea.h:54
LayerType
brief Layer type enumerations. Layer types help with descibing the layer for tying layer to areas...
Definition: DtWeatherLayer.h:53

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)