VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtEntitySettingsRecord.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2015 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
13 
14 namespace makArchives
15 {
16 
20  {
21  public:
22 
25 
28 
30  DtEntitySettingsRecord& operator = ( const DtEntitySettingsRecord& obj );
31 
34 
37 
38  bool groundClampingEnabled() const;
39  void setGroundClampingEnabled( bool enabled );
40 
41  float groundClampingRadiusScale() const;
42  void setGroundClampingRadiusScale( float scale );
43 
44  bool groundClampingCullingEnabled() const;
45  void setGroundClampingCullingEnabled( bool enabled );
46 
47  bool orientationClampingEnabled() const;
48  void setOrientationClampingEnabled( bool enabled );
49 
50  bool lifeformsUprightEnabled() const;
51  void setLifeformsUprightEnabled( bool enabled );
52 
53  bool smoothingEnabled() const;
54  void setSmoothingEnabled( bool enabled );
55 
56  float smoothingPeriod() const;
57  void setSmoothingPeriod( float period );
58 
59  bool showEntityLabels() const;
60  void setShowEntityLabels( bool show );
61 
62  bool rotateEntitySymbols() const;
63  void setRotateEntitySymbols( bool show );
64 
65  bool showStealthsEnabled() const;
66  void setShowStealthsEnabled( bool enabled );
67 
68  bool infoPopupsOnSelectEnabled() const;
69  void setInfoPopupsOnSelectEnabled( bool enabled );
70 
71  bool fireDetonateLinesEnabled() const;
72  void setFireDetonateLinesEnabled( bool enabled );
73 
74  bool entityEmitterVolumesEnabled() const;
75  void setEntityEmitterVolumesEnabled( bool enabled );
76 
77  bool entityHeightAboveTerrainLinesEnabled() const;
78  void setEntityHeightAboveTerrainLinesEnabled( bool enabled );
79 
80  unsigned entityHeightAboveTerrainMode() const;
81  void setEntityHeightAboveTerrainMode( unsigned mode );
82 
83  bool entitySimDataEnabled() const;
84  void setEntitySimDataEnabled( bool enabled );
85 
86  unsigned colorizedModelColorType() const;
87  void setColorizedModelColorType( unsigned type );
88 
89  float entityIconScale() const;
90  void setEntityIconScale( float scale );
91 
92  void setHideEmbarked2DObjects( bool b );
93  bool hideEmbarked2DObjects() const;
94 
95  bool entityOceanWakesEnabled() const;
96  void setEntityOceanWakesEnabled( bool enabled );
97 
98  bool entityHullSprayEffectsEnabled() const;
99  void setEntityHullSprayEffectsEnabled( bool enabled );
100 
101  bool entityBuoyancyModelsEnabled() const;
102  void setEntityBuoyancyModelsEnabled( bool enabled );
103 
104  bool buoyAndBeaconIconsEnabled() const;
105  void setBuoyAndBeaconIconsEnabled( bool enabled );
106 
108 
109  protected:
110 
111  friend class boost::serialization::access;
112 
116  template<class Archive>
117  void serialize(Archive & ar, const unsigned int version)
118  {
119  if ( version <= 6 )
120  {
121  //Deprecated
122  bool myTrailingEffectsEnabled;
123  bool myTrackHistoryEnabled;
124  bool myDecalEffectsEnabled;
125  ar & BOOST_SERIALIZATION_NVP(myTrailingEffectsEnabled);
126  ar & BOOST_SERIALIZATION_NVP(myTrackHistoryEnabled);
127  ar & BOOST_SERIALIZATION_NVP(myDecalEffectsEnabled);
128  }
129  ar & BOOST_SERIALIZATION_NVP(myGroundClampingEnabled);
130  ar & BOOST_SERIALIZATION_NVP(myGroundClampingRadiusScale);
131  ar & BOOST_SERIALIZATION_NVP(mySmoothingEnabled);
132  ar & BOOST_SERIALIZATION_NVP(mySmoothingPeriod);
133  ar & BOOST_SERIALIZATION_NVP(myOrientationClampingEnabled);
134  ar & BOOST_SERIALIZATION_NVP(myLifeformsUprightEnabled);
135 
136  if(version >= 1 && version != 7 )
137  {
138  ar & BOOST_SERIALIZATION_NVP(myShowEntityLabels);
139  }
140 
141  if (version >= 2)
142  {
143  ar & BOOST_SERIALIZATION_NVP(myShowStealthsEnabled);
144  }
145 
146  if (version >= 3)
147  {
148  ar & BOOST_SERIALIZATION_NVP(myInfoPopupsOnSelectEnabled);
149  }
150 
151  if (version >= 4 && version != 7 )
152  {
153  ar & BOOST_SERIALIZATION_NVP(myFireDetonateLinesEnabled);
154  }
155 
156  if (version >= 5)
157  {
158  if ( version != 7 )
159  {
160  ar & BOOST_SERIALIZATION_NVP(myEntityHeightAboveTerrainLinesEnabled);
161  }
162  ar & BOOST_SERIALIZATION_NVP(myEntityHeightAboveTerrainMode);
163  }
164 
165  if (version >=6)
166  {
167  ar& BOOST_SERIALIZATION_NVP(myEntitySimDataEnabled);
168  }
169 
170  if (version >= 9 )
171  {
172  ar & BOOST_SERIALIZATION_NVP(myColorizedModelColorType);
173  }
174 
175  if (version == 10 )
176  {
177  int myEntityIconScale = 1;
178  ar & BOOST_SERIALIZATION_NVP(myEntityIconScale);
179  myEntityIconScaleFactor =
180  pow(1.25, ((float)myEntityIconScale / 10.0) - 5);
181  }
182 
183  if (version >= 11 )
184  {
185  ar & BOOST_SERIALIZATION_NVP(myHideEmbarked2DObjects);
186  }
187 
188  if (version >= 12 )
189  {
190  ar & BOOST_SERIALIZATION_NVP(myEntityIconScaleFactor);
191  }
192  if ( version >= 13 )
193  {
194  ar & BOOST_SERIALIZATION_NVP(myEntitySensorVolumesEnabled);
195  }
196  if ( version >= 14 )
197  {
198  ar & BOOST_SERIALIZATION_NVP(myGroundClampingCullingEnabled);
199  }
200  else
201  {
202  myGroundClampingCullingEnabled = ( myGroundClampingRadiusScale < 100 );
203  }
204  if ( version >= 15 )
205  {
206  ar & BOOST_SERIALIZATION_NVP(myRotateEntitySymbols);
207  }
208  if ( version >= 16 )
209  {
210  ar & BOOST_SERIALIZATION_NVP(myOceanWakesEnabled);
211  ar & BOOST_SERIALIZATION_NVP(myHullSprayEffectsEnabled);
212  ar & BOOST_SERIALIZATION_NVP(myBuoyancyModelsEnabled);
213  }
214  if ( version >= 17 )
215  {
216  ar & BOOST_SERIALIZATION_NVP( myBuoyAndBeaconIconsEnabled );
217  }
218  }
219 
220  protected:
221 
236  bool myEntitySensorVolumesEnabled; // also referred to as 'EmitterVolumes'.
245  };
246 
247 }
248 

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)