VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
landSurfaceStateComponent.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2023 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
12 #include <matrix/vlVector.h>
13 
14 
15 
16 
17 namespace makVrf
18 {
19 
22  {
24  : mySnowAccumulation(0.)
25  , myRainAccumulation(0.)
26  , myAmbientAirPressure(0.)
27  , myAmbientAirTemperature(0.)
28  , myAirPressureAltitude(0.)
29  , myAirTemperatureAltitude(0)
30  , mySnowMinimumAltitude(0.)
31  , mySnowRoadAccumulation(0)
32  , mySeaLevelWaterConcentration(0.)
33  , myLightningPresent(false)
34  , myFogHeight(0.)
35  , myFogColor()
36  , myPriority(0)
37  , myPrecipitationIntensity(0.)
38  , myPrecipitationType(DtVrfWeatherPrecipitationNone)
39  {};
40 
42  {
43  *this = orig;
44  };
45 
47  {
48  {
49  mySnowAccumulation = orig.mySnowAccumulation;
50  myRainAccumulation = orig.myRainAccumulation;
51  myAmbientAirPressure = orig.myAmbientAirPressure;
52  myAmbientAirTemperature = orig.myAmbientAirTemperature;
53  myAirPressureAltitude = orig.myAirPressureAltitude;
54  myAirTemperatureAltitude = orig.myAirTemperatureAltitude;
55  mySnowMinimumAltitude = orig.mySnowMinimumAltitude;
56  mySnowRoadAccumulation = orig.mySnowRoadAccumulation;
57  mySeaLevelWaterConcentration = orig.mySeaLevelWaterConcentration;
58  myLightningPresent = orig.myLightningPresent;
59  myFogHeight = orig.myFogHeight;
60  myFogColor = orig.myFogColor;
61  myPriority = orig.myPriority;
62  myPrecipitationIntensity = orig.myPrecipitationIntensity;
63  myPrecipitationType = orig.myPrecipitationType;
64  }
65  return *this;
66  };
67  ACCESSOR_MUTATOR_MEMBER(double, snowAccumulation, SnowAccumulation);
68  ACCESSOR_MUTATOR_MEMBER(double, rainAccumulation, RainAccumulation);
69  ACCESSOR_MUTATOR_MEMBER(double, ambientAirPressure, AmbientAirPressure);
70  ACCESSOR_MUTATOR_MEMBER(double, ambientAirTemperature, AmbientAirTemperature);
71  ACCESSOR_MUTATOR_MEMBER(double, airPressureAltitude, AirPressureAltitude);
72  ACCESSOR_MUTATOR_MEMBER(double, airTemperatureAltitude, AirTemperatureAltitude);
73  ACCESSOR_MUTATOR_MEMBER(double, snowMinimumAltitude, SnowMinimumAltitude);
74  ACCESSOR_MUTATOR_MEMBER(double, snowRoadAccumulation, SnowRoadAccumulation);
75  ACCESSOR_MUTATOR_MEMBER(double, seaLevelWaterConcentration, SeaLevelWaterConcentration);
76  ACCESSOR_MUTATOR_MEMBER(bool, lightningPresent, LightningPresent);
77  ACCESSOR_MUTATOR_MEMBER(double, fogHeight, FogHeight);
78  ACCESSOR_MUTATOR_MEMBER(DtVector, fogColor, FogColor);
79  ACCESSOR_MUTATOR_MEMBER(int, priority, Priority);
80  ACCESSOR_MUTATOR_MEMBER(double, precipitationIntensity, PrecipitationIntensity);
81  ACCESSOR_MUTATOR_MEMBER(DtVrfWeatherPrecipitationType, precipitationType, PrecipitationType);
82  };
83 
87  {
88  public:
90 
92  : DtFrameStateInterface(storage)
93  {
94  }
95 
96  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, snowAccumulation, SnowAccumulation);
97  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, rainAccumulation, RainAccumulation);
98  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, ambientAirPressure, AmbientAirPressure);
99  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, ambientAirTemperature, AmbientAirTemperature);
100  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, airPressureAltitude, AirPressureAltitude);
101  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, airTemperatureAltitude, AirTemperatureAltitude);
102  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, snowMinimumAltitude, SnowMinimumAltitude);
103  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, snowRoadAccumulation, SnowRoadAccumulation);
104  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, seaLevelWaterConcentration, SeaLevelWaterConcentration);
105  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(bool, lightningPresent, LightningPresent);
106  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, fogHeight, FogHeight);
108  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(int, priority, Priority);
109  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, precipitationIntensity, PrecipitationIntensity);
110  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(DtVrfWeatherPrecipitationType, precipitationType, PrecipitationType);
111 
112  void setIsRemoteComponent(bool b) { myIsRemoteComponent = b; };
113 
114  protected:
115  bool myIsRemoteComponent = false;
116  };
117 
119  class DT_DLL_vrfStateData DtLandSurfaceStateComponentNextFrame : public DtStateComponentNextFrameTemplate< DtLandSurfaceStateComponent, DtLandSurfaceStateComponentData >
120  {
121  public:
124  {
125 
126  };
128  {};
129  NEXTFRAME_ACCESSOR_MUTATOR(double, snowAccumulation, SnowAccumulation);
130  NEXTFRAME_ACCESSOR_MUTATOR(double, rainAccumulation, RainAccumulation);
131  NEXTFRAME_ACCESSOR_MUTATOR(double, ambientAirPressure, AmbientAirPressure);
132  NEXTFRAME_ACCESSOR_MUTATOR(double, ambientAirTemperature, AmbientAirTemperature);
133  NEXTFRAME_ACCESSOR_MUTATOR(double, airPressureAltitude, AirPressureAltitude);
134  NEXTFRAME_ACCESSOR_MUTATOR(double, airTemperatureAltitude, AirTemperatureAltitude);
135  NEXTFRAME_ACCESSOR_MUTATOR(double, snowMinimumAltitude, SnowMinimumAltitude);
136  NEXTFRAME_ACCESSOR_MUTATOR(double, snowRoadAccumulation, SnowRoadAccumulation);
137  NEXTFRAME_ACCESSOR_MUTATOR(double, seaLevelWaterConcentration, SeaLevelWaterConcentration);
138  NEXTFRAME_ACCESSOR_MUTATOR(bool, lightningPresent, LightningPresent);
139  NEXTFRAME_ACCESSOR_MUTATOR(double, fogHeight, FogHeight);
140  NEXTFRAME_ACCESSOR_MUTATOR(DtVector, fogColor, FogColor);
141  NEXTFRAME_ACCESSOR_MUTATOR(int, priority, Priority);
142  NEXTFRAME_ACCESSOR_MUTATOR(double, precipitationIntensity, PrecipitationIntensity);
143  NEXTFRAME_ACCESSOR_MUTATOR(DtVrfWeatherPrecipitationType, precipitationType, PrecipitationType);
144 
145  };
146 
148  class DT_DLL_vrfStateData DtLandSurfaceStateComponentCurrentFrame : public DtStateComponentCurrentFrameTemplate< DtLandSurfaceStateComponent, DtLandSurfaceStateComponentNextFrame, DtLandSurfaceStateComponentData>
149  {
150  public:
153  {
154  };
155 
156  CURRENTFRAME_ACCESSOR(double, snowAccumulation, SnowAccumulation);
157  CURRENTFRAME_ACCESSOR(double, rainAccumulation, RainAccumulation);
158  CURRENTFRAME_ACCESSOR(double, ambientAirPressure, AmbientAirPressure);
159  CURRENTFRAME_ACCESSOR(double, ambientAirTemperature, AmbientAirTemperature);
160  CURRENTFRAME_ACCESSOR(double, airPressureAltitude, AirPressureAltitude);
161  CURRENTFRAME_ACCESSOR(double, airTemperatureAltitude, AirTemperatureAltitude);
162  CURRENTFRAME_ACCESSOR(double, snowMinimumAltitude, SnowMinimumAltitude);
163  CURRENTFRAME_ACCESSOR(double, snowRoadAccumulation, SnowRoadAccumulation);
164  CURRENTFRAME_ACCESSOR(double, seaLevelWaterConcentration, SeaLevelWaterConcentration);
165  CURRENTFRAME_ACCESSOR(bool, lightningPresent, LightningPresent);
166  CURRENTFRAME_ACCESSOR(double, fogHeight, FogHeight);
167  CURRENTFRAME_ACCESSOR(DtVector, fogColor, FogColor);
168  CURRENTFRAME_ACCESSOR(int, priority, Priority);
169  CURRENTFRAME_ACCESSOR(double, precipitationIntensity, PrecipitationIntensity);
170  CURRENTFRAME_ACCESSOR(DtVrfWeatherPrecipitationType, precipitationType, PrecipitationType);
171  };
172 
176 
180 
181 }
DtVrfWeatherPrecipitationType
Definition: vrfWeatherStateEnums.h:13
virtual ~DtLandSurfaceStateComponentNextFrame()
Definition: landSurfaceStateComponent.h:127
Definition: stateComponentImplementationTemplate.h:68
Definition: stateComponent.h:266
DtLandSurfaceStateComponentData(const DtLandSurfaceStateComponentData &orig)
Definition: landSurfaceStateComponent.h:41
DtStateComponentCreator< DtLandSurfaceStateComponentImplementation > DtLandSurfaceStateComponentCreator
5) Define the creator. This will need to be registered with the REGISTER_STATE_COMPONENT macro in the...
Definition: landSurfaceStateComponent.h:179
#define CURRENTFRAME_ACCESSOR(MemberType, Accessor, MutatorAndMember)
Definition: stateComponentImplementationTemplate.h:61
Definition: stateComponentImplementationTemplate.h:89
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:339
#define DEFINE_STATE_COMPONENT_TYPE(CreatedComponent)
Definition: stateComponent.h:228
#define NEXTFRAME_ACCESSOR_MUTATOR(MemberType, Accessor, MutatorAndMember)
Definition: stateComponentImplementationTemplate.h:49
void setIsRemoteComponent(bool b)
Definition: landSurfaceStateComponent.h:112
ACCESSOR_MUTATOR_MEMBER(double, snowAccumulation, SnowAccumulation)
0) Define the State Component Data. This struct replaces the legion stuff
Definition: landSurfaceStateComponent.h:21
#define UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(Type, Member, Set)
Definition: doubleBufferedDataStorage.h:53
2) Define the next frame class. This will be used for write access.
Definition: landSurfaceStateComponent.h:119
DtLandSurfaceStateComponentCurrentFrame(DtStateData *sd)
Definition: landSurfaceStateComponent.h:151
Definition: vrfWeatherStateEnums.h:15
DtStateComponentImplementationTemplate< DtLandSurfaceStateComponent, DtLandSurfaceStateComponentCurrentFrame, DtLandSurfaceStateComponentNextFrame > DtLandSurfaceStateComponentImplementation
4) Define the state component that will contain the wrappers to the next and current frame states tha...
Definition: landSurfaceStateComponent.h:175
DtLandSurfaceStateComponentNextFrame(DtStateData *sd)
Definition: landSurfaceStateComponent.h:122
DtLandSurfaceStateComponentData()
Definition: landSurfaceStateComponent.h:23
1) Define the interface class that will be used to represent the next and current frames...
Definition: landSurfaceStateComponent.h:86
#define DT_DLL_vrfStateData
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfStateDataDefines.h:26
3) Define the current frame class. This will be used for read access.
Definition: landSurfaceStateComponent.h:148
Contains the DtStateComponent class declaration.
DtLandSurfaceStateComponentData & operator=(const DtLandSurfaceStateComponentData &orig)
Definition: landSurfaceStateComponent.h:46
This is a simple base class that will be used to return a pointer to current or next frame state...
Definition: stateComponent.h:291
Definition: stateComponentImplementationTemplate.h:137

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)