VR-Forces 4.6 Class Documentation
 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) 2018 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
13 
14 namespace makArchives
15 {
16 
20  {
21  public:
22  enum BuoyancyCullType { BuoyancyCullNone, BuoyancyCullFrontFacing, BuoyancyCullFrustum };
23 
26 
29 
31  DtEntitySettingsRecord& operator = ( const DtEntitySettingsRecord& obj );
32 
35 
38 
39  bool groundClampingEnabled() const;
40  void setGroundClampingEnabled( bool enabled );
41 
42  float groundClampingRadiusScale() const;
43  void setGroundClampingRadiusScale( float scale );
44 
45  bool groundClampingCullingEnabled() const;
46  void setGroundClampingCullingEnabled( bool enabled );
47 
48  bool orientationClampingEnabled() const;
49  void setOrientationClampingEnabled( bool enabled );
50 
51  bool lifeformsUprightEnabled() const;
52  void setLifeformsUprightEnabled( bool enabled );
53 
54  bool smoothingEnabled() const;
55  void setSmoothingEnabled( bool enabled );
56 
57  float smoothingPeriod() const;
58  void setSmoothingPeriod( float period );
59 
60  bool showEntityLabels() const;
61  void setShowEntityLabels( bool show );
62 
63  bool rotateEntitySymbols() const;
64  void setRotateEntitySymbols( bool show );
65 
66  bool showStealthsEnabled() const;
67  void setShowStealthsEnabled( bool enabled );
68 
69  bool infoPopupsOnSelectEnabled() const;
70  void setInfoPopupsOnSelectEnabled( bool enabled );
71 
72  bool fireDetonateLinesEnabled() const;
73  void setFireDetonateLinesEnabled( bool enabled );
74 
75  bool entityEmitterVolumesEnabled() const;
76  void setEntityEmitterVolumesEnabled( bool enabled );
77 
78  bool entityHeightAboveTerrainLinesEnabled() const;
79  void setEntityHeightAboveTerrainLinesEnabled( bool enabled );
80 
81  unsigned entityHeightAboveTerrainMode() const;
82  void setEntityHeightAboveTerrainMode( unsigned mode );
83 
84  bool entitySimDataEnabled() const;
85  void setEntitySimDataEnabled( bool enabled );
86 
87  unsigned colorizedModelColorType() const;
88  void setColorizedModelColorType( unsigned type );
89 
90  float entityIconScale() const;
91  void setEntityIconScale( float scale );
92 
93  void setHideEmbarked2DObjects( bool b );
94  bool hideEmbarked2DObjects() const;
95 
96  bool entityOceanWakesEnabled() const;
97  void setEntityOceanWakesEnabled( bool enabled );
98 
99  bool entityHullSprayEffectsEnabled() const;
100  void setEntityHullSprayEffectsEnabled( bool enabled );
101 
102  bool entityBuoyancyModelsEnabled() const;
103  void setEntityBuoyancyModelsEnabled( bool enabled );
104 
105  float buoyancyDefaultLODDistance() const;
106  void setBuoyancyDefaultLODDistance( float distance );
107 
108  float wakeDefaultLODDistance() const;
109  void setWakeDefaultLODDistance( float distance );
110 
111  bool buoyAndBeaconIconsEnabled() const;
112  void setBuoyAndBeaconIconsEnabled( bool enabled );
113 
114  unsigned int heightAboveTerrainPeriod() const;
115  void setHeightAboveTerrainPeriod( unsigned int period );
116 
120  float buoyancyMinimumCullDistance() const;
121 
123  void setBuoyancyMinimumCullDistance( float distance );
124 
125  void setBuoyancyCullType( BuoyancyCullType cullType );
126  BuoyancyCullType buoyancyCullType() const;
127 
128  bool rotorWashEnabled() const;
129  void setRotorWashEnabled(bool enabled);
130 
132 
133  protected:
134 
135  friend class boost::serialization::access;
136 
140  template<class Archive>
141  void serialize(Archive & ar, const unsigned int version)
142  {
143  if ( version <= 6 )
144  {
145  //Deprecated
146  bool myTrailingEffectsEnabled;
147  bool myTrackHistoryEnabled;
148  bool myDecalEffectsEnabled;
149  ar & BOOST_SERIALIZATION_NVP(myTrailingEffectsEnabled);
150  ar & BOOST_SERIALIZATION_NVP(myTrackHistoryEnabled);
151  ar & BOOST_SERIALIZATION_NVP(myDecalEffectsEnabled);
152  }
153  ar & BOOST_SERIALIZATION_NVP(myGroundClampingEnabled);
154  ar & BOOST_SERIALIZATION_NVP(myGroundClampingRadiusScale);
155  ar & BOOST_SERIALIZATION_NVP(mySmoothingEnabled);
156  ar & BOOST_SERIALIZATION_NVP(mySmoothingPeriod);
157  ar & BOOST_SERIALIZATION_NVP(myOrientationClampingEnabled);
158  ar & BOOST_SERIALIZATION_NVP(myLifeformsUprightEnabled);
159 
160  if(version >= 1 && version != 7 )
161  {
162  ar & BOOST_SERIALIZATION_NVP(myShowEntityLabels);
163  }
164 
165  if (version >= 2)
166  {
167  ar & BOOST_SERIALIZATION_NVP(myShowStealthsEnabled);
168  }
169 
170  if (version >= 3)
171  {
172  ar & BOOST_SERIALIZATION_NVP(myInfoPopupsOnSelectEnabled);
173  }
174 
175  if (version >= 4 && version != 7 )
176  {
177  ar & BOOST_SERIALIZATION_NVP(myFireDetonateLinesEnabled);
178  }
179 
180  if (version >= 5)
181  {
182  if ( version != 7 )
183  {
184  ar & BOOST_SERIALIZATION_NVP(myEntityHeightAboveTerrainLinesEnabled);
185  }
186  ar & BOOST_SERIALIZATION_NVP(myEntityHeightAboveTerrainMode);
187  }
188 
189  if (version >=6)
190  {
191  ar& BOOST_SERIALIZATION_NVP(myEntitySimDataEnabled);
192  }
193 
194  if (version >= 9 )
195  {
196  ar & BOOST_SERIALIZATION_NVP(myColorizedModelColorType);
197  }
198 
199  if (version == 10 )
200  {
201  int myEntityIconScale = 1;
202  ar & BOOST_SERIALIZATION_NVP(myEntityIconScale);
203  myEntityIconScaleFactor =
204  pow(1.25, ((float)myEntityIconScale / 10.0) - 5);
205  }
206 
207  if (version >= 11 )
208  {
209  ar & BOOST_SERIALIZATION_NVP(myHideEmbarked2DObjects);
210  }
211 
212  if (version >= 12 )
213  {
214  ar & BOOST_SERIALIZATION_NVP(myEntityIconScaleFactor);
215  }
216  if ( version >= 13 )
217  {
218  ar & BOOST_SERIALIZATION_NVP(myEntitySensorVolumesEnabled);
219  }
220  if ( version >= 14 )
221  {
222  ar & BOOST_SERIALIZATION_NVP(myGroundClampingCullingEnabled);
223  }
224  else
225  {
226  myGroundClampingCullingEnabled = ( myGroundClampingRadiusScale < 100 );
227  }
228  if ( version >= 15 )
229  {
230  ar & BOOST_SERIALIZATION_NVP(myRotateEntitySymbols);
231  }
232  if ( version >= 16 )
233  {
234  ar & BOOST_SERIALIZATION_NVP(myOceanWakesEnabled);
235  ar & BOOST_SERIALIZATION_NVP(myHullSprayEffectsEnabled);
236  ar & BOOST_SERIALIZATION_NVP(myBuoyancyModelsEnabled);
237  }
238  if ( version >= 17 )
239  {
240  ar & BOOST_SERIALIZATION_NVP( myBuoyAndBeaconIconsEnabled );
241  }
242  if ( version >= 18 )
243  {
244  ar & BOOST_SERIALIZATION_NVP( myHeightAboveTerrainPeriod );
245  }
246  if ( version >= 19 )
247  {
248  ar & BOOST_SERIALIZATION_NVP( myBuoyancyDefaultLODDistance );
249  }
250  if ( version >= 20 )
251  {
252  ar & BOOST_SERIALIZATION_NVP( myBuoyancyMinimumCullDistance );
253  ar & BOOST_SERIALIZATION_NVP( myBuoyancyCullType );
254  }
255  if (version >= 21)
256  {
257  ar & BOOST_SERIALIZATION_NVP(myWakeDefaultLODDistance);
258  }
259  if (version >= 22)
260  {
261  ar & BOOST_SERIALIZATION_NVP(myRotorWashEnabled);
262  }
263  }
264 
265  protected:
266 
281  bool myEntitySensorVolumesEnabled; // also referred to as 'EmitterVolumes'.
296  };
297 
298 }
299 

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)