VR-Forces 4.8 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 DtWeatherEffect;
26  class DtWeatherLayerCreator;
27 
40  {
42 
43  public:
44 
47 
49  virtual ~DtWeatherLayer();
50 
52  DtUniqueID id() const;
53 
55  virtual void releaseGLObjects(osg::State* state) const;
56 
60  virtual void setIntensity(float level);
61 
63  float intensity() const;
64 
68  virtual void setWind(float windDirectionRad, float windSpeedMps);
69 
74  virtual void simulationUpdate(float timeStep, double currentTime, DtJobSplitter* jobSplitter);
75 
79  virtual void postSimulationUpdate(float timeStep, double currentTime);
80 
85  virtual void cullUpdate(const osg::Vec3d& camPos, const osg::Matrixd& basis, DtJobSplitter* jobSplitter);
86 
88  virtual void drawWeatherEffects(DtWeatherEffect::DrawData& drawData);
89 
90  protected:
91 
94  void addWeatherEffect(DtWeatherEffect* effect);
95 
96  private:
97 
100 
102  DtWeatherLayer(const DtWeatherLayer &other);
103 
105  DtWeatherLayer &operator=(const DtWeatherLayer &other);
106 
107  protected:
108 
110 
112  typedef std::vector<DtWeatherEffect*> WeatherEffectSet;
113 
115 
116  float myIntensity;
117  };
118 
119 
120 
124  {
125  public:
128 
130  virtual ~DtWeatherLayerFactory();
131 
134  static DtWeatherLayerFactory& instance(DtDe& de);
135 
137  static const std::string& theClassName();
138 
140  virtual void registerCreator(const std::string& name, DtWeatherLayerCreator* creator);
141 
143  virtual DtWeatherLayer* create(const std::string& name) const;
144 
145  protected:
146 
148 
149  typedef boost::unordered_map<std::string, DtWeatherLayerCreator*> RegistrationMap;
150 
152  };
153 
154 
155 
159  {
160  public:
161 
163  virtual DtWeatherLayer* create(DtDe&) = 0;
164  };
165 
166 
167 
172  {
173  public:
174 
176  virtual DtWeatherLayer* create(DtDe&);
177  };
178 }
179 
180 
181 
182 
RegistrationMap myCreators
Definition: DtWeatherLayer.h:151
Virtual base class.
Definition: DtVirtualBaseClass.h:22
Creator that is used to create hail weather layers.
Definition: DtWeatherLayer.h:171
DtUniqueID myId
Definition: DtWeatherLayer.h:109
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
DtDe & myDe
Definition: DtWeatherLayer.h:147
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:116
Contains makVrv::DtDe class.
this class is used to split work up between threads.
Definition: DtJobSplitter.h:64
boost::unordered_map< std::string, DtWeatherLayerCreator * > RegistrationMap
Definition: DtWeatherLayer.h:149
WeatherEffectSet myWeatherEffectSet
Definition: DtWeatherLayer.h:114
Factory that is used to create weather layers.
Definition: DtWeatherLayer.h:123
A structure used to hold data for drawing.
Definition: DtWeatherEffect.h:45
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:40
std::vector< DtWeatherEffect * > WeatherEffectSet
This type defines a set of weather effects.
Definition: DtWeatherLayer.h:112
This is the base class for a weather layer creator.
Definition: DtWeatherLayer.h:158
unsigned long long DtUniqueID
Definition: DtUniqueID.h:22
A weather layer uses one or more weather effects to create a top level visual.
Definition: DtWeatherLayer.h:39
Contains makVrv::DtUniqueID type.
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69

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)