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  unsigned colorizedModelColorType() const;
100  void setColorizedModelColorType( unsigned type );
101 
102  float entityIconScale() const;
103  void setEntityIconScale( float scale );
104 
105  bool fixedEntityIconScalingEnabled() const;
106  void setFixedEntityIconScalingEnabled(bool enabled);
107 
108  void setDynamicScaleCollectionMap(const DtAltitudeBasedScaleConfigurationRecordCollectionMap&);
109  const DtAltitudeBasedScaleConfigurationRecordCollectionMap& dynamicScaleCollectionMap() const;
110  DtAltitudeBasedScaleConfigurationRecordCollectionMap& dynamicScaleCollectionMap();
111 
112  void setHideEmbarked2DObjects( bool b );
113  bool hideEmbarked2DObjects() const;
114 
115  bool entityOceanWakesEnabled() const;
116  void setEntityOceanWakesEnabled( bool enabled );
117 
118  bool entityHullSprayEffectsEnabled() const;
119  void setEntityHullSprayEffectsEnabled( bool enabled );
120 
121  bool entityBuoyancyModelsEnabled() const;
122  void setEntityBuoyancyModelsEnabled( bool enabled );
123 
124  float buoyancyDefaultLODDistance() const;
125  void setBuoyancyDefaultLODDistance( float distance );
126 
127  float wakeDefaultLODDistance() const;
128  void setWakeDefaultLODDistance( float distance );
129 
130  bool buoyAndBeaconIconsEnabled() const;
131  void setBuoyAndBeaconIconsEnabled( bool enabled );
132 
133  unsigned int heightAboveTerrainPeriod() const;
134  void setHeightAboveTerrainPeriod( unsigned int period );
135 
139  float buoyancyMinimumCullDistance() const;
140 
142  void setBuoyancyMinimumCullDistance( float distance );
143 
144  void setBuoyancyCullType( BuoyancyCullType cullType );
145  BuoyancyCullType buoyancyCullType() const;
146 
147  bool rotorWashEnabled() const;
148  void setRotorWashEnabled(bool enabled);
149 
152  bool occupantsVisible() const;
153  void setOccupantsVisible(bool enabled);
154 
156  bool wheelRotationEnabled() const;
157  void setWheelRotationEnabled(bool setting);
159 
161  bool adaptiveTickRateEnabled() const;
162  void setAdaptiveTickRateEnabled(bool setting);
164 
166 
167  protected:
168 
169  friend class boost::serialization::access;
170 
174  template<class Archive>
175  void serialize(Archive & ar, const unsigned int version)
176  {
177  if ( version <= 6 )
178  {
179  //Deprecated
180  bool myTrailingEffectsEnabled;
181  bool myTrackHistoryEnabled;
182  bool myDecalEffectsEnabled;
183  ar & BOOST_SERIALIZATION_NVP(myTrailingEffectsEnabled);
184  ar & BOOST_SERIALIZATION_NVP(myTrackHistoryEnabled);
185  ar & BOOST_SERIALIZATION_NVP(myDecalEffectsEnabled);
186  }
187  ar & BOOST_SERIALIZATION_NVP(myGroundClampingEnabled);
188  ar & BOOST_SERIALIZATION_NVP(myGroundClampingRadiusScale);
189  ar & BOOST_SERIALIZATION_NVP(mySmoothingEnabled);
190  ar & BOOST_SERIALIZATION_NVP(mySmoothingPeriod);
191  if (version >= 24)
192  {
193  ar & BOOST_SERIALIZATION_NVP(myArtPartSmoothingEnabled);
194  ar & BOOST_SERIALIZATION_NVP(myArtPartSmoothingPeriod);
195  }
196  ar & BOOST_SERIALIZATION_NVP(myOrientationClampingEnabled);
197  ar & BOOST_SERIALIZATION_NVP(myLifeformsUprightEnabled);
198 
199  if(version >= 1 && version != 7 )
200  {
201  ar & BOOST_SERIALIZATION_NVP(myShowEntityLabels);
202  }
203 
204  if (version >= 2)
205  {
206  ar & BOOST_SERIALIZATION_NVP(myShowStealthsEnabled);
207  }
208 
209  if (version >= 3 && version < 28)
210  {
211  // depreciated
212  bool myInfoPopupsOnSelectEnabled;
213  ar & BOOST_SERIALIZATION_NVP(myInfoPopupsOnSelectEnabled);
214  }
215 
216  if (version >= 4 && version != 7 )
217  {
218  ar & BOOST_SERIALIZATION_NVP(myFireDetonateLinesEnabled);
219  }
220 
221  if (version >= 5)
222  {
223  if ( version != 7 )
224  {
225  ar & BOOST_SERIALIZATION_NVP(myEntityHeightAboveTerrainLinesEnabled);
226  }
227  ar & BOOST_SERIALIZATION_NVP(myEntityHeightAboveTerrainMode);
228  }
229 
230  if (version >=6 && version <= 29)
231  {
232  ar& BOOST_SERIALIZATION_NVP(myEntitySimDataEnabled);
233  }
234 
235  if (version >= 9 )
236  {
237  ar & BOOST_SERIALIZATION_NVP(myColorizedModelColorType);
238  }
239 
240  if (version == 10 )
241  {
242  int myEntityIconScale = 1;
243  ar & BOOST_SERIALIZATION_NVP(myEntityIconScale);
244  myEntityIconScaleFactor =
245  pow(1.25, ((float)myEntityIconScale / 10.0) - 5);
246  }
247 
248  if (version >= 11 )
249  {
250  ar & BOOST_SERIALIZATION_NVP(myHideEmbarked2DObjects);
251  }
252 
253  if (version >= 27)
254  {
255  ar & BOOST_SERIALIZATION_NVP(myFixedEntityIconScalingEnabled);
256  }
257  if (version >= 26)
258  {
259  ar & BOOST_SERIALIZATION_NVP(myDynamicScaleFactorCollectionMap);
260  }
261  if (version >= 12)
262  {
263  ar & BOOST_SERIALIZATION_NVP(myEntityIconScaleFactor);
264  }
265  if ( version >= 13 )
266  {
267  ar & BOOST_SERIALIZATION_NVP(myEntitySensorVolumesEnabled);
268  }
269  if ( version >= 14 )
270  {
271  ar & BOOST_SERIALIZATION_NVP(myGroundClampingCullingEnabled);
272  }
273  else
274  {
275  myGroundClampingCullingEnabled = ( myGroundClampingRadiusScale < 100 );
276  }
277  if ( version >= 15 )
278  {
279  ar & BOOST_SERIALIZATION_NVP(myRotateEntitySymbols);
280  }
281  if ( version >= 16 )
282  {
283  ar & BOOST_SERIALIZATION_NVP(myOceanWakesEnabled);
284  ar & BOOST_SERIALIZATION_NVP(myHullSprayEffectsEnabled);
285  ar & BOOST_SERIALIZATION_NVP(myBuoyancyModelsEnabled);
286  }
287  if ( version >= 17 )
288  {
289  ar & BOOST_SERIALIZATION_NVP( myBuoyAndBeaconIconsEnabled );
290  }
291  if ( version >= 18 )
292  {
293  ar & BOOST_SERIALIZATION_NVP( myHeightAboveTerrainPeriod );
294  }
295  if ( version >= 19 )
296  {
297  ar & BOOST_SERIALIZATION_NVP( myBuoyancyDefaultLODDistance );
298  }
299  if ( version >= 20 )
300  {
301  ar & BOOST_SERIALIZATION_NVP( myBuoyancyMinimumCullDistance );
302  ar & BOOST_SERIALIZATION_NVP( myBuoyancyCullType );
303  }
304  if (version >= 21)
305  {
306  ar & BOOST_SERIALIZATION_NVP(myWakeDefaultLODDistance);
307  }
308  if (version >= 22)
309  {
310  ar & BOOST_SERIALIZATION_NVP(myRotorWashEnabled);
311  }
312  if (version >= 23)
313  {
314  ar & BOOST_SERIALIZATION_NVP(myOccupantsVisible);
315  }
316  if (version >= 24)
317  {
318  ar & BOOST_SERIALIZATION_NVP(myWheelRotationEnabled);
319  }
320  if (version >= 25)
321  {
322  ar& BOOST_SERIALIZATION_NVP(myAdaptiveTickRateEnabled);
323  }
324  if( version >= 29 )
325  {
326  ar& BOOST_SERIALIZATION_NVP( myShowEmbarkedEntityLabels );
327  }
328  }
329 
330  protected:
331 
339 
343 
352  bool myEntitySensorVolumesEnabled; // also referred to as 'EmitterVolumes'.
370  };
371 
372 }
373 
DtAltitudeBasedScaleConfigurationRecordCollectionMap myDynamicScaleFactorCollectionMap
Definition: DtEntitySettingsRecord.h:341
Contains the DtAltitudeBasedScaleConfigurationRecord class declaration.
float myWakeDefaultLODDistance
Definition: DtEntitySettingsRecord.h:363
bool myBuoyancyModelsEnabled
Definition: DtEntitySettingsRecord.h:359
BOOST_CLASS_VERSION(makArchives::DtDiGuySettingsRecord, 3)
BuoyancyCullType myBuoyancyCullType
Definition: DtEntitySettingsRecord.h:365
bool myArtPartSmoothingEnabled
Definition: DtEntitySettingsRecord.h:337
bool myEntitySensorVolumesEnabled
Definition: DtEntitySettingsRecord.h:352
bool myOceanWakesEnabled
Definition: DtEntitySettingsRecord.h:357
bool myRotorWashEnabled
Definition: DtEntitySettingsRecord.h:366
bool myHullSprayEffectsEnabled
Definition: DtEntitySettingsRecord.h:358
float mySmoothingPeriod
Definition: DtEntitySettingsRecord.h:336
unsigned myColorizedModelColorType
Definition: DtEntitySettingsRecord.h:332
Contains DLL export macros.
bool myFireDetonateLinesEnabled
Definition: DtEntitySettingsRecord.h:351
float myBuoyancyMinimumCullDistance
Definition: DtEntitySettingsRecord.h:364
unsigned myEntityHeightAboveTerrainMode
Definition: DtEntitySettingsRecord.h:333
bool myShowStealthsEnabled
Definition: DtEntitySettingsRecord.h:350
bool myOrientationClampingEnabled
Definition: DtEntitySettingsRecord.h:346
bool myShowEntityLabels
Definition: DtEntitySettingsRecord.h:348
bool myRotateEntitySymbols
Definition: DtEntitySettingsRecord.h:356
bool myGroundClampingCullingEnabled
Definition: DtEntitySettingsRecord.h:345
unsigned int myHeightAboveTerrainPeriod
Definition: DtEntitySettingsRecord.h:361
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:347
bool myOccupantsVisible
Definition: DtEntitySettingsRecord.h:367
std::map< std::string, DtAltitudeBasedScaleConfigurationRecordCollection > DtAltitudeBasedScaleConfigurationRecordCollectionMap
Definition: DtAltitudeBasedScaleConfigurationRecord.h:48
float myArtPartSmoothingPeriod
Definition: DtEntitySettingsRecord.h:338
bool myBuoyAndBeaconIconsEnabled
Definition: DtEntitySettingsRecord.h:360
bool myShowEmbarkedEntityLabels
Definition: DtEntitySettingsRecord.h:349
float myGroundClampingRadiusScale
Definition: DtEntitySettingsRecord.h:334
const char int mode
Definition: ioapi.h:38
bool myFixedEntityIconScalingEnabled
Definition: DtEntitySettingsRecord.h:340
bool mySmoothingEnabled
Definition: DtEntitySettingsRecord.h:335
bool myHideEmbarked2DObjects
Definition: DtEntitySettingsRecord.h:355
bool myEntityHeightAboveTerrainLinesEnabled
Definition: DtEntitySettingsRecord.h:353
float myEntityIconScaleFactor
Definition: DtEntitySettingsRecord.h:342
#define DT_DLL_MAKARCHIVES
Definition: makArchives.h:31
bool myEntitySimDataEnabled
Definition: DtEntitySettingsRecord.h:354
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:175
bool myAdaptiveTickRateEnabled
Definition: DtEntitySettingsRecord.h:369
bool myWheelRotationEnabled
Definition: DtEntitySettingsRecord.h:368
float myBuoyancyDefaultLODDistance
Definition: DtEntitySettingsRecord.h:362
bool myGroundClampingEnabled
Definition: DtEntitySettingsRecord.h:344

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)