VR-Forces 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) 2026 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 
124  virtual void postSimulationUpdate(float timeStep, double currentTime);
125 
130  virtual void cullUpdate(const osg::Vec3d& camPos,
131  const osg::Matrixd& basis, DtJobSplitter* jobSplitter);
132 
136  virtual void drawWeatherEffects(DtWeatherEffect::DrawData& drawData, float cullFade);
137 
141  virtual void drawAreaWeatherEffects(DtWeatherEffect::DrawData& drawData,
142  DtWeatherArea* area);
143 
146  virtual void addWeatherEffect(DtWeatherEffect* effect);
147 
150  virtual void setCulled(bool culled);
151 
153  virtual bool culled() const;
154 
155  protected:
156 
160  virtual void computeSurfaceParameters(
161  DtWeatherEffect::DrawData& drawData, DtWeatherArea* area);
162 
163  protected:
164 
166 
168  typedef std::vector<DtWeatherEffect*> WeatherEffectSet;
169 
171 
172  float myIntensity;
173 
174  bool myCulled;
175 
177  };
178 
179 
180 
184  {
185  public:
188 
190  virtual ~DtWeatherLayerFactory();
191 
195  static DtWeatherLayerFactory& instance(DtDe& de);
196 
198  static const std::string& theClassName();
199 
201  virtual DtWeatherLayer* create(DtWeatherLayer::LayerType layerType) const;
202 
203  protected:
204 
206  };
207 
208 }
209 
210 
211 
212 
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:205
bool myCulled
Definition: DtWeatherLayer.h:174
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:172
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:176
WeatherEffectSet myWeatherEffectSet
Definition: DtWeatherLayer.h:170
Factory that is used to create weather layers.
Definition: DtWeatherLayer.h:183
Definition: DtWeatherLayer.h:55
A structure used to hold data for drawing.
Definition: DtWeatherEffect.h:72
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:67
std::vector< DtWeatherEffect * > WeatherEffectSet
This type defines a set of weather effects.
Definition: DtWeatherLayer.h:168
LayerType myLayerType
Definition: DtWeatherLayer.h:165
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:76
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:56
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 Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)