VR-Forces 4.10 Class Documentation
 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) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/DtUniqueID.h>
13 #include <vrvCore/DtDe.h>
14 
15 #include <vrvOsg/vrvOsg.h>
16 #include <vrvOsg/DtWeatherEffect.h>
17 
19 
20 
21 namespace makVrv
22 {
23  // Forward declarations.
24  class DtJobSplitter;
25  class DtWeatherArea;
26  class DtWeatherEffect;
27  class DtWeatherLayerCreator;
28 
44  {
45  public:
46 
49  enum LayerType
50  {
55  LayerTypeHail
56  };
57 
59  virtual ~DtWeatherLayer();
60 
61  protected:
62 
65 
66  private:
67 
69  DtWeatherLayer() = delete;
70 
72  DtWeatherLayer(const DtWeatherLayer &other) = delete;
73 
75  DtWeatherLayer &operator=(const DtWeatherLayer &other) = delete;
76 
77  public:
78 
80  virtual void init(DtDe &de);
81 
83  DtUniqueID id() const;
84 
86  virtual void releaseGLObjects(osg::State* state) const;
87 
90  virtual DtWeatherLayer::LayerType layerType() const;
91 
95  virtual void setIntensity(float level);
96 
98  float intensity() const;
99 
103  virtual void setWind(float windDirectionRad, float windSpeedMps);
104 
109  virtual void simulationUpdate(float timeStep, double currentTime, DtJobSplitter* jobSplitter);
110 
114  virtual void postSimulationUpdate(float timeStep, double currentTime);
115 
120  virtual void cullUpdate(const osg::Vec3d& camPos, const osg::Matrixd& basis, DtJobSplitter* jobSplitter);
121 
123  virtual void drawWeatherEffects(DtWeatherEffect::DrawData& drawData);
124 
127  virtual void addWeatherEffect(DtWeatherEffect* effect);
128 
129  protected:
130 
134  virtual void drawAreaWeatherEffectsForLayerType(DtWeatherEffect::DrawData& drawData, DtWeatherLayer::LayerType layerType);
135 
139  virtual void computeSurfaceParameters(DtWeatherEffect::DrawData& drawData, DtWeatherArea* area);
140 
141  protected:
142 
145 
147  typedef std::vector<DtWeatherEffect*> WeatherEffectSet;
148 
150 
151  float myIntensity;
152  };
153 
154 
155 
159  {
160  public:
163 
165  virtual ~DtWeatherLayerFactory();
166 
169  static DtWeatherLayerFactory& instance(DtDe& de);
170 
172  static const std::string& theClassName();
173 
175  virtual DtWeatherLayer* create(DtWeatherLayer::LayerType layerType) const;
176 
177  protected:
178 
180  };
181 
182 }
183 
184 
185 
186 
DT_DLL_EXAMPLESCENEROOTPLUGIN void init(DtDe &anIG)
Virtual base class.
Definition: DtVirtualBaseClass.h:19
DtUniqueID myId
Definition: DtWeatherLayer.h:143
Definition: DtWeatherLayer.h:54
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
DtDe & myDe
Definition: DtWeatherLayer.h:179
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:151
Contains makVrv::DtDe class.
this class is used to split work up between threads.
Definition: DtJobSplitter.h:64
WeatherEffectSet myWeatherEffectSet
Definition: DtWeatherLayer.h:149
Factory that is used to create weather layers.
Definition: DtWeatherLayer.h:158
Definition: DtWeatherLayer.h:51
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:147
LayerType myLayerType
Definition: DtWeatherLayer.h:144
Definition: DtWeatherLayer.h:53
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
A weather layer uses one or more weather effects to create a top level visual.
Definition: DtWeatherLayer.h:43
Contains makVrv::DtUniqueID type.
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
Definition: DtWeatherLayer.h:52
A weather area represents localized environmental conditions such as blowing dust, blowing sand, or blowing snow.
Definition: DtWeatherArea.h:53
LayerType
brief Layer type enumerations.
Definition: DtWeatherLayer.h:49

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)