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) 2026 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  bool disableBuoyancyForAttachedEntities() const;
167  void setDisableBuoyancyForAttachedEntities(bool enabled);
169 
171 
172  protected:
173 
174  friend class boost::serialization::access;
175 
179  template<class Archive>
180  void serialize(Archive & ar, const unsigned int version)
181  {
182  if ( version <= 6 )
183  {
184  //Deprecated
185  bool myTrailingEffectsEnabled;
186  bool myTrackHistoryEnabled;
187  bool myDecalEffectsEnabled;
188  ar & BOOST_SERIALIZATION_NVP(myTrailingEffectsEnabled);
189  ar & BOOST_SERIALIZATION_NVP(myTrackHistoryEnabled);
190  ar & BOOST_SERIALIZATION_NVP(myDecalEffectsEnabled);
191  }
192  ar & BOOST_SERIALIZATION_NVP(myGroundClampingEnabled);
193  ar & BOOST_SERIALIZATION_NVP(myGroundClampingRadiusScale);
194  ar & BOOST_SERIALIZATION_NVP(mySmoothingEnabled);
195  ar & BOOST_SERIALIZATION_NVP(mySmoothingPeriod);
196  if (version >= 24)
197  {
198  ar & BOOST_SERIALIZATION_NVP(myArtPartSmoothingEnabled);
199  ar & BOOST_SERIALIZATION_NVP(myArtPartSmoothingPeriod);
200  }
201  ar & BOOST_SERIALIZATION_NVP(myOrientationClampingEnabled);
202  ar & BOOST_SERIALIZATION_NVP(myLifeformsUprightEnabled);
203 
204  if(version >= 1 && version != 7 )
205  {
206  ar & BOOST_SERIALIZATION_NVP(myShowEntityLabels);
207  }
208 
209  if (version >= 2)
210  {
211  ar & BOOST_SERIALIZATION_NVP(myShowStealthsEnabled);
212  }
213 
214  if (version >= 3 && version < 28)
215  {
216  // depreciated
217  bool myInfoPopupsOnSelectEnabled;
218  ar & BOOST_SERIALIZATION_NVP(myInfoPopupsOnSelectEnabled);
219  }
220 
221  if (version >= 4 && version != 7 )
222  {
223  ar & BOOST_SERIALIZATION_NVP(myFireDetonateLinesEnabled);
224  }
225 
226  if (version >= 5)
227  {
228  if ( version != 7 )
229  {
230  ar & BOOST_SERIALIZATION_NVP(myEntityHeightAboveTerrainLinesEnabled);
231  }
232  ar & BOOST_SERIALIZATION_NVP(myEntityHeightAboveTerrainMode);
233  }
234 
235  if (version >=6 && version <= 29)
236  {
237  ar& BOOST_SERIALIZATION_NVP(myEntitySimDataEnabled);
238  }
239 
240  if (version >= 9 )
241  {
242  ar & BOOST_SERIALIZATION_NVP(myColorizedModelColorType);
243  }
244 
245  if (version == 10 )
246  {
247  int myEntityIconScale = 1;
248  ar & BOOST_SERIALIZATION_NVP(myEntityIconScale);
249  myEntityIconScaleFactor =
250  pow(1.25, ((float)myEntityIconScale / 10.0) - 5);
251  }
252 
253  if (version >= 11 )
254  {
255  ar & BOOST_SERIALIZATION_NVP(myHideEmbarked2DObjects);
256  }
257 
258  if (version >= 27)
259  {
260  ar & BOOST_SERIALIZATION_NVP(myFixedEntityIconScalingEnabled);
261  }
262  if (version >= 26)
263  {
264  ar & BOOST_SERIALIZATION_NVP(myDynamicScaleFactorCollectionMap);
265  }
266  if (version >= 12)
267  {
268  ar & BOOST_SERIALIZATION_NVP(myEntityIconScaleFactor);
269  }
270  if ( version >= 13 )
271  {
272  ar & BOOST_SERIALIZATION_NVP(myEntitySensorVolumesEnabled);
273  }
274  if ( version >= 14 )
275  {
276  ar & BOOST_SERIALIZATION_NVP(myGroundClampingCullingEnabled);
277  }
278  else
279  {
280  myGroundClampingCullingEnabled = ( myGroundClampingRadiusScale < 100 );
281  }
282  if ( version >= 15 )
283  {
284  ar & BOOST_SERIALIZATION_NVP(myRotateEntitySymbols);
285  }
286  if ( version >= 16 )
287  {
288  ar & BOOST_SERIALIZATION_NVP(myOceanWakesEnabled);
289  ar & BOOST_SERIALIZATION_NVP(myHullSprayEffectsEnabled);
290  ar & BOOST_SERIALIZATION_NVP(myBuoyancyModelsEnabled);
291  }
292  if ( version >= 17 )
293  {
294  ar & BOOST_SERIALIZATION_NVP( myBuoyAndBeaconIconsEnabled );
295  }
296  if ( version >= 18 )
297  {
298  ar & BOOST_SERIALIZATION_NVP( myHeightAboveTerrainPeriod );
299  }
300  if ( version >= 19 )
301  {
302  ar & BOOST_SERIALIZATION_NVP( myBuoyancyDefaultLODDistance );
303  }
304  if ( version >= 20 )
305  {
306  ar & BOOST_SERIALIZATION_NVP( myBuoyancyMinimumCullDistance );
307  ar & BOOST_SERIALIZATION_NVP( myBuoyancyCullType );
308  }
309  if (version >= 21)
310  {
311  ar & BOOST_SERIALIZATION_NVP(myWakeDefaultLODDistance);
312  }
313  if (version >= 22)
314  {
315  ar & BOOST_SERIALIZATION_NVP(myRotorWashEnabled);
316  }
317  if (version >= 23)
318  {
319  ar & BOOST_SERIALIZATION_NVP(myOccupantsVisible);
320  }
321  if (version >= 24)
322  {
323  ar & BOOST_SERIALIZATION_NVP(myWheelRotationEnabled);
324  }
325  if (version >= 25)
326  {
327  ar& BOOST_SERIALIZATION_NVP(myAdaptiveTickRateEnabled);
328  }
329  if( version >= 29 )
330  {
331  ar& BOOST_SERIALIZATION_NVP( myShowEmbarkedEntityLabels );
332  }
333  if( version >= 31 )
334  {
335  ar& BOOST_SERIALIZATION_NVP( myDisableBuoyancyForAttachedEntities );
336  }
337  }
338 
339  protected:
340 
348 
352 
361  bool myEntitySensorVolumesEnabled; // also referred to as 'EmitterVolumes'.
380  };
381 
382 }
383 
DtAltitudeBasedScaleConfigurationRecordCollectionMap myDynamicScaleFactorCollectionMap
Definition: DtEntitySettingsRecord.h:350
Contains the DtAltitudeBasedScaleConfigurationRecord class declaration.
float myWakeDefaultLODDistance
Definition: DtEntitySettingsRecord.h:372
bool myBuoyancyModelsEnabled
Definition: DtEntitySettingsRecord.h:368
BOOST_CLASS_VERSION(makArchives::DtDiGuySettingsRecord, 3)
BuoyancyCullType myBuoyancyCullType
Definition: DtEntitySettingsRecord.h:374
bool myDisableBuoyancyForAttachedEntities
Definition: DtEntitySettingsRecord.h:379
bool myArtPartSmoothingEnabled
Definition: DtEntitySettingsRecord.h:346
bool myEntitySensorVolumesEnabled
Definition: DtEntitySettingsRecord.h:361
bool myOceanWakesEnabled
Definition: DtEntitySettingsRecord.h:366
bool myRotorWashEnabled
Definition: DtEntitySettingsRecord.h:375
bool myHullSprayEffectsEnabled
Definition: DtEntitySettingsRecord.h:367
float mySmoothingPeriod
Definition: DtEntitySettingsRecord.h:345
unsigned myColorizedModelColorType
Definition: DtEntitySettingsRecord.h:341
Contains DLL export macros.
bool myFireDetonateLinesEnabled
Definition: DtEntitySettingsRecord.h:360
float myBuoyancyMinimumCullDistance
Definition: DtEntitySettingsRecord.h:373
unsigned myEntityHeightAboveTerrainMode
Definition: DtEntitySettingsRecord.h:342
bool myShowStealthsEnabled
Definition: DtEntitySettingsRecord.h:359
bool myOrientationClampingEnabled
Definition: DtEntitySettingsRecord.h:355
bool myShowEntityLabels
Definition: DtEntitySettingsRecord.h:357
bool myRotateEntitySymbols
Definition: DtEntitySettingsRecord.h:365
bool myGroundClampingCullingEnabled
Definition: DtEntitySettingsRecord.h:354
unsigned int myHeightAboveTerrainPeriod
Definition: DtEntitySettingsRecord.h:370
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:356
bool myOccupantsVisible
Definition: DtEntitySettingsRecord.h:376
std::map< std::string, DtAltitudeBasedScaleConfigurationRecordCollection > DtAltitudeBasedScaleConfigurationRecordCollectionMap
Definition: DtAltitudeBasedScaleConfigurationRecord.h:48
float myArtPartSmoothingPeriod
Definition: DtEntitySettingsRecord.h:347
bool myBuoyAndBeaconIconsEnabled
Definition: DtEntitySettingsRecord.h:369
bool myShowEmbarkedEntityLabels
Definition: DtEntitySettingsRecord.h:358
float myGroundClampingRadiusScale
Definition: DtEntitySettingsRecord.h:343
const char int mode
Definition: ioapi.h:38
bool myFixedEntityIconScalingEnabled
Definition: DtEntitySettingsRecord.h:349
bool mySmoothingEnabled
Definition: DtEntitySettingsRecord.h:344
bool myHideEmbarked2DObjects
Definition: DtEntitySettingsRecord.h:364
bool myEntityHeightAboveTerrainLinesEnabled
Definition: DtEntitySettingsRecord.h:362
float myEntityIconScaleFactor
Definition: DtEntitySettingsRecord.h:351
#define DT_DLL_MAKARCHIVES
Definition: makArchives.h:31
bool myEntitySimDataEnabled
Definition: DtEntitySettingsRecord.h:363
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:180
bool myAdaptiveTickRateEnabled
Definition: DtEntitySettingsRecord.h:378
bool myWheelRotationEnabled
Definition: DtEntitySettingsRecord.h:377
float myBuoyancyDefaultLODDistance
Definition: DtEntitySettingsRecord.h:371
bool myGroundClampingEnabled
Definition: DtEntitySettingsRecord.h:353

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)