VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtEntitySettingsRecord.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2023 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
15 
16 #include <limits>
17 #include <string>
18 #include <map>
19 
20 namespace makArchives
21 {
22 
26  {
27  public:
28  enum BuoyancyCullType { BuoyancyCullNone, BuoyancyCullFrontFacing, BuoyancyCullFrustum };
29 
32 
35 
37  DtEntitySettingsRecord& operator = ( const DtEntitySettingsRecord& obj );
38 
41 
44 
45  bool groundClampingEnabled() const;
46  void setGroundClampingEnabled( bool enabled );
47 
48  float groundClampingRadiusScale() const;
49  void setGroundClampingRadiusScale( float scale );
50 
51  bool groundClampingCullingEnabled() const;
52  void setGroundClampingCullingEnabled( bool enabled );
53 
54  bool orientationClampingEnabled() const;
55  void setOrientationClampingEnabled( bool enabled );
56 
57  bool lifeformsUprightEnabled() const;
58  void setLifeformsUprightEnabled( bool enabled );
59 
60  bool smoothingEnabled() const;
61  void setSmoothingEnabled( bool enabled );
62 
63  float smoothingPeriod() const;
64  void setSmoothingPeriod( float period );
65 
68  bool artPartSmoothingEnabled() const;
69  void setArtPartSmoothingEnabled(bool setting);
70 
71  float artPartSmoothingPeriod() const;
72  void setArtPartSmoothingPeriod(float period);
74 
75  bool showEntityLabels() const;
76  void setShowEntityLabels( bool show );
77 
78  bool showEmbarkedEntityLabels() const;
79  void setShowEmbarkedEntityLabels( bool show );
80 
81  bool rotateEntitySymbols() const;
82  void setRotateEntitySymbols( bool show );
83 
84  bool showStealthsEnabled() const;
85  void setShowStealthsEnabled( bool enabled );
86 
87  bool fireDetonateLinesEnabled() const;
88  void setFireDetonateLinesEnabled( bool enabled );
89 
90  bool entityEmitterVolumesEnabled() const;
91  void setEntityEmitterVolumesEnabled( bool enabled );
92 
93  bool entityHeightAboveTerrainLinesEnabled() const;
94  void setEntityHeightAboveTerrainLinesEnabled( bool enabled );
95 
96  unsigned entityHeightAboveTerrainMode() const;
97  void setEntityHeightAboveTerrainMode( unsigned mode );
98 
99  bool entitySimDataEnabled() const;
100  void setEntitySimDataEnabled( bool enabled );
101 
102  unsigned colorizedModelColorType() const;
103  void setColorizedModelColorType( unsigned type );
104 
105  float entityIconScale() const;
106  void setEntityIconScale( float scale );
107 
108  bool fixedEntityIconScalingEnabled() const;
109  void setFixedEntityIconScalingEnabled(bool enabled);
110 
111  void setDynamicScaleCollectionMap(const DtAltitudeBasedScaleConfigurationRecordCollectionMap&);
112  const DtAltitudeBasedScaleConfigurationRecordCollectionMap& dynamicScaleCollectionMap() const;
113  DtAltitudeBasedScaleConfigurationRecordCollectionMap& dynamicScaleCollectionMap();
114 
115  void setHideEmbarked2DObjects( bool b );
116  bool hideEmbarked2DObjects() const;
117 
118  bool entityOceanWakesEnabled() const;
119  void setEntityOceanWakesEnabled( bool enabled );
120 
121  bool entityHullSprayEffectsEnabled() const;
122  void setEntityHullSprayEffectsEnabled( bool enabled );
123 
124  bool entityBuoyancyModelsEnabled() const;
125  void setEntityBuoyancyModelsEnabled( bool enabled );
126 
127  float buoyancyDefaultLODDistance() const;
128  void setBuoyancyDefaultLODDistance( float distance );
129 
130  float wakeDefaultLODDistance() const;
131  void setWakeDefaultLODDistance( float distance );
132 
133  bool buoyAndBeaconIconsEnabled() const;
134  void setBuoyAndBeaconIconsEnabled( bool enabled );
135 
136  unsigned int heightAboveTerrainPeriod() const;
137  void setHeightAboveTerrainPeriod( unsigned int period );
138 
142  float buoyancyMinimumCullDistance() const;
143 
145  void setBuoyancyMinimumCullDistance( float distance );
146 
147  void setBuoyancyCullType( BuoyancyCullType cullType );
148  BuoyancyCullType buoyancyCullType() const;
149 
150  bool rotorWashEnabled() const;
151  void setRotorWashEnabled(bool enabled);
152 
155  bool occupantsVisible() const;
156  void setOccupantsVisible(bool enabled);
157 
159  bool wheelRotationEnabled() const;
160  void setWheelRotationEnabled(bool setting);
162 
164  bool adaptiveTickRateEnabled() const;
165  void setAdaptiveTickRateEnabled(bool setting);
167 
169 
170  protected:
171 
172  friend class boost::serialization::access;
173 
177  template<class Archive>
178  void serialize(Archive & ar, const unsigned int version)
179  {
180  if ( version <= 6 )
181  {
182  //Deprecated
183  bool myTrailingEffectsEnabled;
184  bool myTrackHistoryEnabled;
185  bool myDecalEffectsEnabled;
186  ar & BOOST_SERIALIZATION_NVP(myTrailingEffectsEnabled);
187  ar & BOOST_SERIALIZATION_NVP(myTrackHistoryEnabled);
188  ar & BOOST_SERIALIZATION_NVP(myDecalEffectsEnabled);
189  }
190  ar & BOOST_SERIALIZATION_NVP(myGroundClampingEnabled);
191  ar & BOOST_SERIALIZATION_NVP(myGroundClampingRadiusScale);
192  ar & BOOST_SERIALIZATION_NVP(mySmoothingEnabled);
193  ar & BOOST_SERIALIZATION_NVP(mySmoothingPeriod);
194  if (version >= 24)
195  {
196  ar & BOOST_SERIALIZATION_NVP(myArtPartSmoothingEnabled);
197  ar & BOOST_SERIALIZATION_NVP(myArtPartSmoothingPeriod);
198  }
199  ar & BOOST_SERIALIZATION_NVP(myOrientationClampingEnabled);
200  ar & BOOST_SERIALIZATION_NVP(myLifeformsUprightEnabled);
201 
202  if(version >= 1 && version != 7 )
203  {
204  ar & BOOST_SERIALIZATION_NVP(myShowEntityLabels);
205  }
206 
207  if (version >= 2)
208  {
209  ar & BOOST_SERIALIZATION_NVP(myShowStealthsEnabled);
210  }
211 
212  if (version >= 3 && version < 28)
213  {
214  // depreciated
215  bool myInfoPopupsOnSelectEnabled;
216  ar & BOOST_SERIALIZATION_NVP(myInfoPopupsOnSelectEnabled);
217  }
218 
219  if (version >= 4 && version != 7 )
220  {
221  ar & BOOST_SERIALIZATION_NVP(myFireDetonateLinesEnabled);
222  }
223 
224  if (version >= 5)
225  {
226  if ( version != 7 )
227  {
228  ar & BOOST_SERIALIZATION_NVP(myEntityHeightAboveTerrainLinesEnabled);
229  }
230  ar & BOOST_SERIALIZATION_NVP(myEntityHeightAboveTerrainMode);
231  }
232 
233  if (version >=6)
234  {
235  ar& BOOST_SERIALIZATION_NVP(myEntitySimDataEnabled);
236  }
237 
238  if (version >= 9 )
239  {
240  ar & BOOST_SERIALIZATION_NVP(myColorizedModelColorType);
241  }
242 
243  if (version == 10 )
244  {
245  int myEntityIconScale = 1;
246  ar & BOOST_SERIALIZATION_NVP(myEntityIconScale);
247  myEntityIconScaleFactor =
248  pow(1.25, ((float)myEntityIconScale / 10.0) - 5);
249  }
250 
251  if (version >= 11 )
252  {
253  ar & BOOST_SERIALIZATION_NVP(myHideEmbarked2DObjects);
254  }
255 
256  if (version >= 27)
257  {
258  ar & BOOST_SERIALIZATION_NVP(myFixedEntityIconScalingEnabled);
259  }
260  if (version >= 26)
261  {
262  ar & BOOST_SERIALIZATION_NVP(myDynamicScaleFactorCollectionMap);
263  }
264  if (version >= 12)
265  {
266  ar & BOOST_SERIALIZATION_NVP(myEntityIconScaleFactor);
267  }
268  if ( version >= 13 )
269  {
270  ar & BOOST_SERIALIZATION_NVP(myEntitySensorVolumesEnabled);
271  }
272  if ( version >= 14 )
273  {
274  ar & BOOST_SERIALIZATION_NVP(myGroundClampingCullingEnabled);
275  }
276  else
277  {
278  myGroundClampingCullingEnabled = ( myGroundClampingRadiusScale < 100 );
279  }
280  if ( version >= 15 )
281  {
282  ar & BOOST_SERIALIZATION_NVP(myRotateEntitySymbols);
283  }
284  if ( version >= 16 )
285  {
286  ar & BOOST_SERIALIZATION_NVP(myOceanWakesEnabled);
287  ar & BOOST_SERIALIZATION_NVP(myHullSprayEffectsEnabled);
288  ar & BOOST_SERIALIZATION_NVP(myBuoyancyModelsEnabled);
289  }
290  if ( version >= 17 )
291  {
292  ar & BOOST_SERIALIZATION_NVP( myBuoyAndBeaconIconsEnabled );
293  }
294  if ( version >= 18 )
295  {
296  ar & BOOST_SERIALIZATION_NVP( myHeightAboveTerrainPeriod );
297  }
298  if ( version >= 19 )
299  {
300  ar & BOOST_SERIALIZATION_NVP( myBuoyancyDefaultLODDistance );
301  }
302  if ( version >= 20 )
303  {
304  ar & BOOST_SERIALIZATION_NVP( myBuoyancyMinimumCullDistance );
305  ar & BOOST_SERIALIZATION_NVP( myBuoyancyCullType );
306  }
307  if (version >= 21)
308  {
309  ar & BOOST_SERIALIZATION_NVP(myWakeDefaultLODDistance);
310  }
311  if (version >= 22)
312  {
313  ar & BOOST_SERIALIZATION_NVP(myRotorWashEnabled);
314  }
315  if (version >= 23)
316  {
317  ar & BOOST_SERIALIZATION_NVP(myOccupantsVisible);
318  }
319  if (version >= 24)
320  {
321  ar & BOOST_SERIALIZATION_NVP(myWheelRotationEnabled);
322  }
323  if (version >= 25)
324  {
325  ar& BOOST_SERIALIZATION_NVP(myAdaptiveTickRateEnabled);
326  }
327  if( version >= 29 )
328  {
329  ar& BOOST_SERIALIZATION_NVP( myShowEmbarkedEntityLabels );
330  }
331  }
332 
333  protected:
334 
342 
346 
355  bool myEntitySensorVolumesEnabled; // also referred to as 'EmitterVolumes'.
373  };
374 
375 }
376 
DtAltitudeBasedScaleConfigurationRecordCollectionMap myDynamicScaleFactorCollectionMap
Definition: DtEntitySettingsRecord.h:344
Contains the DtAltitudeBasedScaleConfigurationRecord class declaration.
float myWakeDefaultLODDistance
Definition: DtEntitySettingsRecord.h:366
bool myBuoyancyModelsEnabled
Definition: DtEntitySettingsRecord.h:362
BOOST_CLASS_VERSION(makArchives::DtDiGuySettingsRecord, 3)
BuoyancyCullType myBuoyancyCullType
Definition: DtEntitySettingsRecord.h:368
bool myArtPartSmoothingEnabled
Definition: DtEntitySettingsRecord.h:340
bool myEntitySensorVolumesEnabled
Definition: DtEntitySettingsRecord.h:355
bool myOceanWakesEnabled
Definition: DtEntitySettingsRecord.h:360
bool myRotorWashEnabled
Definition: DtEntitySettingsRecord.h:369
bool myHullSprayEffectsEnabled
Definition: DtEntitySettingsRecord.h:361
float mySmoothingPeriod
Definition: DtEntitySettingsRecord.h:339
unsigned myColorizedModelColorType
Definition: DtEntitySettingsRecord.h:335
Contains DLL export macros.
bool myFireDetonateLinesEnabled
Definition: DtEntitySettingsRecord.h:354
float myBuoyancyMinimumCullDistance
Definition: DtEntitySettingsRecord.h:367
unsigned myEntityHeightAboveTerrainMode
Definition: DtEntitySettingsRecord.h:336
bool myShowStealthsEnabled
Definition: DtEntitySettingsRecord.h:353
bool myOrientationClampingEnabled
Definition: DtEntitySettingsRecord.h:349
bool myShowEntityLabels
Definition: DtEntitySettingsRecord.h:351
bool myRotateEntitySymbols
Definition: DtEntitySettingsRecord.h:359
bool myGroundClampingCullingEnabled
Definition: DtEntitySettingsRecord.h:348
unsigned int myHeightAboveTerrainPeriod
Definition: DtEntitySettingsRecord.h:364
BuoyancyCullType
Definition: DtEntitySettingsRecord.h:28
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...
bool myLifeformsUprightEnabled
Definition: DtEntitySettingsRecord.h:350
bool myOccupantsVisible
Definition: DtEntitySettingsRecord.h:370
std::map< std::string, DtAltitudeBasedScaleConfigurationRecordCollection > DtAltitudeBasedScaleConfigurationRecordCollectionMap
Definition: DtAltitudeBasedScaleConfigurationRecord.h:48
float myArtPartSmoothingPeriod
Definition: DtEntitySettingsRecord.h:341
bool myBuoyAndBeaconIconsEnabled
Definition: DtEntitySettingsRecord.h:363
bool myShowEmbarkedEntityLabels
Definition: DtEntitySettingsRecord.h:352
float myGroundClampingRadiusScale
Definition: DtEntitySettingsRecord.h:337
const char int mode
Definition: ioapi.h:38
bool myFixedEntityIconScalingEnabled
Definition: DtEntitySettingsRecord.h:343
bool mySmoothingEnabled
Definition: DtEntitySettingsRecord.h:338
bool myHideEmbarked2DObjects
Definition: DtEntitySettingsRecord.h:358
bool myEntityHeightAboveTerrainLinesEnabled
Definition: DtEntitySettingsRecord.h:356
float myEntityIconScaleFactor
Definition: DtEntitySettingsRecord.h:345
#define DT_DLL_MAKARCHIVES
Definition: makArchives.h:31
bool myEntitySimDataEnabled
Definition: DtEntitySettingsRecord.h:357
Contains the entity display settings.
Definition: DtEntitySettingsRecord.h:25
void serialize(Archive &ar, const unsigned int version)
When the class Archive corresponds to an output archive, the &amp; operator is defined similar to &lt;&lt;...
Definition: DtEntitySettingsRecord.h:178
bool myAdaptiveTickRateEnabled
Definition: DtEntitySettingsRecord.h:372
bool myWheelRotationEnabled
Definition: DtEntitySettingsRecord.h:371
float myBuoyancyDefaultLODDistance
Definition: DtEntitySettingsRecord.h:365
bool myGroundClampingEnabled
Definition: DtEntitySettingsRecord.h:347

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)