VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtWeatherAreaEnvironmental.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2022 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 
13 #include <vrvCore/DtDe.h>
14 
15 #include <vrvOsg/vrvOsg.h>
16 #include <vrvOsg/DtWeatherArea.h>
17 
19 
20 #include <matrix/vlVector.h>
21 
22 #include <osg/Matrixd>
23 #include <osg/Vec3d>
24 #include <osg/Vec4d>
25 
26 
27 namespace makVrv
28 {
29  // Forward declarations.
30  class DtWeatherAreaGroup;
31  class DtCoordinateSystem;
32 
33 
42  {
43  friend class DtWeatherAreaFactory;
44 
45  public:
46 
48  virtual ~DtWeatherAreaEnvironmental();
49 
51  DtWeatherAreaEnvironmental() = delete;
52 
55 
57  DtWeatherAreaEnvironmental &operator=(const DtWeatherAreaEnvironmental &other) = delete;
58 
59  protected:
60 
63 
64  public:
65 
68  virtual void setEnabled(bool enabled);
69 
73  virtual void setBounds(const DtVector& bounds, float cornerRadius);
74 
79  virtual void setTransform(const DtVector& position, float orientation, bool relativeToCamera = false);
80 
87  virtual void cullUpdate(const osg::Vec3d& camPos,
88  const std::vector<osg::Vec4d>& cullingPlanes, DtJobSplitter* jobSplitter,
89  const osg::Camera* camera) override;
90 
93  virtual void setPrecipitationIntensity(const float intensity);
94 
104  virtual void setPrecipitationType(const DtSkyObject::PrecipitationType type);
105 
108  virtual void setFogColor(const DtVector& color);
109 
112  virtual void setVisibilityDistance(const float distance);
113 
116  virtual void setOvercast(const float overcast);
117 
121  virtual void setGlobalWind(const float windDirectionRad, const float windSpeedMps);
122 
125  virtual void setLightningEnabled(const bool enabled);
126 
130  virtual void cloudLayerAdded(DtCloudLayerId layerId, int cloudType);
131 
134  virtual void cloudLayerRemoved(DtCloudLayerId layerId);
135 
136  protected:
137 
142  virtual void computePrecipitationShaftBounds(osg::Vec3d& position,
143  DtVector& bounds, float& cornerRadius);
144 
149  virtual void computeHeightFogBounds(DtVector& bounds, double& cornerRadius);
150 
152  virtual void onAreaChanged();
153 
157  virtual float computeFogDensity(const float precipitaionIintensity, const float distance) const;
158 
161  virtual void computePrecipitationShaftBaseColor(DtVector& color);
162 
167  virtual void initPrecipitationItems(DtWeatherAreaGroup* areaGroup,
168  bool lightning);
169 
171  virtual void updateHeightFogLighting();
172 
174  virtual void slot_simulationUpdate();
175 
177  virtual void slot_coordinateSystemChanged();
178  protected:
179 
181 
183 
187 
189 
190  std::vector<DtCloudLayerId> myWindCloudLayers;
191 
194  DtCoordinateSystem* myCoordinateSystem = nullptr;
195  };
196 
197 }
198 
199 
200 
Used by the weather system to define an environmental area. These areas can contain items such as pre...
Definition: DtWeatherAreaEnvironmental.h:41
Contains makVrv::DtWeatherArea class.
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
std::vector< DtCloudLayerId > myWindCloudLayers
Definition: DtWeatherAreaEnvironmental.h:190
DtUniqueID myHeightFogId
Definition: DtWeatherAreaEnvironmental.h:185
Factory that is used to create weather areas.
Definition: DtWeatherArea.h:350
Contains makVrv::DtDe class.
this class is used to split work up between threads.
Definition: DtJobSplitter.h:64
A group node which serves as a root for weather areas, patchy ground fog areas and effects...
Definition: DtWeatherAreaGroup.h:72
DtUniqueID myLightningId
Definition: DtWeatherAreaEnvironmental.h:186
DT_DLL_VRVCORE double distance(const makVrv::DtCoordinateSystem &, const DtVector &from, const DtVector &to)
Returns the distance from the two points. Coordinates are in local database coordinates The coordinat...
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
The DtCoordinateSystem is used to manage the current coordinate system of the scene.
Definition: DtCoordinateSystem.h:40
DtDe & myDe
Definition: DtWeatherAreaEnvironmental.h:180
Base class to provide boost signal/slot management.
DtUniqueID myPrecipitationShaftId
Definition: DtWeatherAreaEnvironmental.h:184
long long DtCloudLayerId
Definition: DtCloudLayer.h:26
Contains DLL export macros.
PrecipitationType
Precipitation types.
Definition: DtSkyObject.h:74
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
DtSignalConnectionManager myConnections
Definition: DtWeatherAreaEnvironmental.h:182
DtVector myHeightFogColor
Definition: DtWeatherAreaEnvironmental.h:188
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

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)