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  , myBlowingParticulateMatter(0)
33  , mySeaLevelWaterConcentration(0.)
34  , myLightningPresent(false)
35  , myFogHeight(0.)
36  , myFogColor()
37  , myPriority(0)
38  , myPrecipitationIntensity(0.)
39  , myPrecipitationType(DtVrfWeatherPrecipitationNone)
40  {};
41 
43  {
44  *this = orig;
45  };
46 
48  {
49  myBlowingParticulateMatter = orig.myBlowingParticulateMatter;
50  mySnowAccumulation = orig.mySnowAccumulation;
51  myRainAccumulation = orig.myRainAccumulation;
52  myAmbientAirPressure = orig.myAmbientAirPressure;
53  myAmbientAirTemperature = orig.myAmbientAirTemperature;
54  myAirPressureAltitude = orig.myAirPressureAltitude;
55  myAirTemperatureAltitude = orig.myAirTemperatureAltitude;
56  mySnowMinimumAltitude = orig.mySnowMinimumAltitude;
57  mySnowRoadAccumulation = orig.mySnowRoadAccumulation;
58  mySeaLevelWaterConcentration = orig.mySeaLevelWaterConcentration;
59  myLightningPresent = orig.myLightningPresent;
60  myFogHeight = orig.myFogHeight;
61  myFogColor = orig.myFogColor;
62  myPriority = orig.myPriority;
63  myPrecipitationIntensity = orig.myPrecipitationIntensity;
64  myPrecipitationType = orig.myPrecipitationType;
65 
66  return *this;
67  };
68  ACCESSOR_MUTATOR_MEMBER(double, snowAccumulation, SnowAccumulation);
69  ACCESSOR_MUTATOR_MEMBER(double, rainAccumulation, RainAccumulation);
70  ACCESSOR_MUTATOR_MEMBER(double, ambientAirPressure, AmbientAirPressure);
71  ACCESSOR_MUTATOR_MEMBER(double, ambientAirTemperature, AmbientAirTemperature);
72  ACCESSOR_MUTATOR_MEMBER(double, airPressureAltitude, AirPressureAltitude);
73  ACCESSOR_MUTATOR_MEMBER(double, airTemperatureAltitude, AirTemperatureAltitude);
74  ACCESSOR_MUTATOR_MEMBER(double, snowMinimumAltitude, SnowMinimumAltitude);
75  ACCESSOR_MUTATOR_MEMBER(double, snowRoadAccumulation, SnowRoadAccumulation);
76  ACCESSOR_MUTATOR_MEMBER(double, seaLevelWaterConcentration, SeaLevelWaterConcentration);
77  ACCESSOR_MUTATOR_MEMBER(bool, lightningPresent, LightningPresent);
78  ACCESSOR_MUTATOR_MEMBER(double, fogHeight, FogHeight);
79  ACCESSOR_MUTATOR_MEMBER(DtVector, fogColor, FogColor);
80  ACCESSOR_MUTATOR_MEMBER(int, priority, Priority);
81  ACCESSOR_MUTATOR_MEMBER(int, blowingParticulateMatter, BlowingParticulateMatter);
82  ACCESSOR_MUTATOR_MEMBER(double, precipitationIntensity, PrecipitationIntensity);
83  ACCESSOR_MUTATOR_MEMBER(DtVrfWeatherPrecipitationType, precipitationType, PrecipitationType);
84  };
85 
89  {
90  public:
92 
94  : DtFrameStateInterface(storage)
95  {
96  }
97 
98  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, snowAccumulation, SnowAccumulation);
99  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, rainAccumulation, RainAccumulation);
100  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, ambientAirPressure, AmbientAirPressure);
101  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, ambientAirTemperature, AmbientAirTemperature);
102  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, airPressureAltitude, AirPressureAltitude);
103  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, airTemperatureAltitude, AirTemperatureAltitude);
104  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, snowMinimumAltitude, SnowMinimumAltitude);
105  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, snowRoadAccumulation, SnowRoadAccumulation);
106  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, seaLevelWaterConcentration, SeaLevelWaterConcentration);
107  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(bool, lightningPresent, LightningPresent);
108  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, fogHeight, FogHeight);
109  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(DtVector, fogColor, FogColor);
110  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(int, priority, Priority);
111  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(int, blowingParticulateMatter, BlowingParticulateMatter);
112  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(double, precipitationIntensity, PrecipitationIntensity);
113  UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(DtVrfWeatherPrecipitationType, precipitationType, PrecipitationType);
114 
115  void setIsRemoteComponent(bool b) { myIsRemoteComponent = b; };
116 
117  protected:
118  bool myIsRemoteComponent = false;
119  };
120 
122  class DT_DLL_vrfStateData DtLandSurfaceStateComponentNextFrame : public DtStateComponentNextFrameTemplate< DtLandSurfaceStateComponent, DtLandSurfaceStateComponentData >
123  {
124  public:
127  {
128 
129  };
131  NEXTFRAME_ACCESSOR_MUTATOR(double, snowAccumulation, SnowAccumulation);
132  NEXTFRAME_ACCESSOR_MUTATOR(double, rainAccumulation, RainAccumulation);
133  NEXTFRAME_ACCESSOR_MUTATOR(double, ambientAirPressure, AmbientAirPressure);
134  NEXTFRAME_ACCESSOR_MUTATOR(double, ambientAirTemperature, AmbientAirTemperature);
135  NEXTFRAME_ACCESSOR_MUTATOR(double, airPressureAltitude, AirPressureAltitude);
136  NEXTFRAME_ACCESSOR_MUTATOR(double, airTemperatureAltitude, AirTemperatureAltitude);
137  NEXTFRAME_ACCESSOR_MUTATOR(double, snowMinimumAltitude, SnowMinimumAltitude);
138  NEXTFRAME_ACCESSOR_MUTATOR(double, snowRoadAccumulation, SnowRoadAccumulation);
139  NEXTFRAME_ACCESSOR_MUTATOR(double, seaLevelWaterConcentration, SeaLevelWaterConcentration);
140  NEXTFRAME_ACCESSOR_MUTATOR(bool, lightningPresent, LightningPresent);
141  NEXTFRAME_ACCESSOR_MUTATOR(double, fogHeight, FogHeight);
142  NEXTFRAME_ACCESSOR_MUTATOR(DtVector, fogColor, FogColor);
143  NEXTFRAME_ACCESSOR_MUTATOR(int, priority, Priority);
144  NEXTFRAME_ACCESSOR_MUTATOR(int, blowingParticulateMatter, BlowingParticulateMatter);
145  NEXTFRAME_ACCESSOR_MUTATOR(double, precipitationIntensity, PrecipitationIntensity);
146  NEXTFRAME_ACCESSOR_MUTATOR(DtVrfWeatherPrecipitationType, precipitationType, PrecipitationType);
147 
148  };
149 
151  class DT_DLL_vrfStateData DtLandSurfaceStateComponentCurrentFrame : public DtStateComponentCurrentFrameTemplate< DtLandSurfaceStateComponent, DtLandSurfaceStateComponentNextFrame, DtLandSurfaceStateComponentData>
152  {
153  public:
156  {
157  };
158 
159  CURRENTFRAME_ACCESSOR(double, snowAccumulation, SnowAccumulation);
160  CURRENTFRAME_ACCESSOR(double, rainAccumulation, RainAccumulation);
161  CURRENTFRAME_ACCESSOR(double, ambientAirPressure, AmbientAirPressure);
162  CURRENTFRAME_ACCESSOR(double, ambientAirTemperature, AmbientAirTemperature);
163  CURRENTFRAME_ACCESSOR(double, airPressureAltitude, AirPressureAltitude);
164  CURRENTFRAME_ACCESSOR(double, airTemperatureAltitude, AirTemperatureAltitude);
165  CURRENTFRAME_ACCESSOR(double, snowMinimumAltitude, SnowMinimumAltitude);
166  CURRENTFRAME_ACCESSOR(double, snowRoadAccumulation, SnowRoadAccumulation);
167  CURRENTFRAME_ACCESSOR(double, seaLevelWaterConcentration, SeaLevelWaterConcentration);
168  CURRENTFRAME_ACCESSOR(bool, lightningPresent, LightningPresent);
169  CURRENTFRAME_ACCESSOR(double, fogHeight, FogHeight);
170  CURRENTFRAME_ACCESSOR(DtVector, fogColor, FogColor);
171  CURRENTFRAME_ACCESSOR(int, priority, Priority);
172  CURRENTFRAME_ACCESSOR(int, blowingParticulateMatter, BlowingParticulateMatter);
173  CURRENTFRAME_ACCESSOR(double, precipitationIntensity, PrecipitationIntensity);
174  CURRENTFRAME_ACCESSOR(DtVrfWeatherPrecipitationType, precipitationType, PrecipitationType);
175  };
176 
180 
184 
185 }
DtVrfWeatherPrecipitationType
Definition: vrfWeatherStateEnums.h:13
Definition: stateComponentImplementationTemplate.h:68
Definition: stateComponent.h:269
DtLandSurfaceStateComponentData(const DtLandSurfaceStateComponentData &orig)
Definition: landSurfaceStateComponent.h:42
DtStateComponentCreator< DtLandSurfaceStateComponentImplementation > DtLandSurfaceStateComponentCreator
5) Define the creator. This will need to be registered with the REGISTER_STATE_COMPONENT macro in the...
Definition: landSurfaceStateComponent.h:183
#define CURRENTFRAME_ACCESSOR(MemberType, Accessor, MutatorAndMember)
Definition: stateComponentImplementationTemplate.h:61
Definition: stateComponentImplementationTemplate.h:87
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:398
#define DEFINE_STATE_COMPONENT_TYPE(CreatedComponent)
Definition: stateComponent.h:231
#define NEXTFRAME_ACCESSOR_MUTATOR(MemberType, Accessor, MutatorAndMember)
Definition: stateComponentImplementationTemplate.h:49
void setIsRemoteComponent(bool b)
Definition: landSurfaceStateComponent.h:115
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:122
DtLandSurfaceStateComponentCurrentFrame(DtStateData *sd)
Definition: landSurfaceStateComponent.h:154
Definition: vrfWeatherStateEnums.h:15
DtLandSurfaceStateComponentNextFrame(DtStateData *sd)
Definition: landSurfaceStateComponent.h:125
DtLandSurfaceStateComponentData()
Definition: landSurfaceStateComponent.h:23
1) Define the interface class that will be used to represent the next and current frames...
Definition: landSurfaceStateComponent.h:88
#define ACCESSOR_MUTATOR_MEMBER(MemberType, Accessor, MutatorAndMember)
Definition: stateComponentImplementationTemplate.h:25
#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
virtual ~DtLandSurfaceStateComponentNextFrame() override
Definition: landSurfaceStateComponent.h:130
3) Define the current frame class. This will be used for read access.
Definition: landSurfaceStateComponent.h:151
Contains the DtStateComponent class declaration.
DtLandSurfaceStateComponentData & operator=(const DtLandSurfaceStateComponentData &orig)
Definition: landSurfaceStateComponent.h:47
This is a simple base class that will be used to return a pointer to current or next frame state...
Definition: stateComponent.h:294
Definition: stateComponentImplementationTemplate.h:135

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)