VR-Forces 4.1.1 Class Documentation
DtEntitySettingsRecord.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2013 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 
96 
97  protected:
98 
99  friend class boost::serialization::access;
100 
104  template<class Archive>
105  void serialize(Archive & ar, const unsigned int version)
106  {
107  if ( version <= 6 )
108  {
109  //Deprecated
110  bool myTrailingEffectsEnabled;
111  bool myTrackHistoryEnabled;
112  bool myDecalEffectsEnabled;
113  ar & BOOST_SERIALIZATION_NVP(myTrailingEffectsEnabled);
114  ar & BOOST_SERIALIZATION_NVP(myTrackHistoryEnabled);
115  ar & BOOST_SERIALIZATION_NVP(myDecalEffectsEnabled);
116  }
117  ar & BOOST_SERIALIZATION_NVP(myGroundClampingEnabled);
118  ar & BOOST_SERIALIZATION_NVP(myGroundClampingRadiusScale);
119  ar & BOOST_SERIALIZATION_NVP(mySmoothingEnabled);
120  ar & BOOST_SERIALIZATION_NVP(mySmoothingPeriod);
121  ar & BOOST_SERIALIZATION_NVP(myOrientationClampingEnabled);
122  ar & BOOST_SERIALIZATION_NVP(myLifeformsUprightEnabled);
123 
124  if(version >= 1 && version != 7 )
125  {
126  ar & BOOST_SERIALIZATION_NVP(myShowEntityLabels);
127  }
128 
129  if (version >= 2)
130  {
131  ar & BOOST_SERIALIZATION_NVP(myShowStealthsEnabled);
132  }
133 
134  if (version >= 3)
135  {
136  ar & BOOST_SERIALIZATION_NVP(myInfoPopupsOnSelectEnabled);
137  }
138 
139  if (version >= 4 && version != 7 )
140  {
141  ar & BOOST_SERIALIZATION_NVP(myFireDetonateLinesEnabled);
142  }
143 
144  if (version >= 5)
145  {
146  if ( version != 7 )
147  {
148  ar & BOOST_SERIALIZATION_NVP(myEntityHeightAboveTerrainLinesEnabled);
149  }
150  ar & BOOST_SERIALIZATION_NVP(myEntityHeightAboveTerrainMode);
151  }
152 
153  if (version >=6)
154  {
155  ar& BOOST_SERIALIZATION_NVP(myEntitySimDataEnabled);
156  }
157 
158  if (version >= 9 )
159  {
160  ar & BOOST_SERIALIZATION_NVP(myColorizedModelColorType);
161  }
162 
163  if (version == 10 )
164  {
165  int myEntityIconScale;
166  ar & BOOST_SERIALIZATION_NVP(myEntityIconScale);
167  myEntityIconScaleFactor =
168  pow(1.25, ((float)myEntityIconScale / 10.0) - 5);
169  }
170 
171  if (version >= 11 )
172  {
173  ar & BOOST_SERIALIZATION_NVP(myHideEmbarked2DObjects);
174  }
175 
176  if (version >= 12 )
177  {
178  ar & BOOST_SERIALIZATION_NVP(myEntityIconScaleFactor);
179  }
180  if ( version >= 13 )
181  {
182  ar & BOOST_SERIALIZATION_NVP(myEntitySensorVolumesEnabled);
183  }
184  if ( version >= 14 )
185  {
186  ar & BOOST_SERIALIZATION_NVP(myGroundClampingCullingEnabled);
187  }
188  else
189  {
190  myGroundClampingCullingEnabled = ( myGroundClampingRadiusScale < 100 );
191  }
192  if ( version >= 15 )
193  {
194  ar & BOOST_SERIALIZATION_NVP(myRotateEntitySymbols);
195  }
196  }
197 
198  protected:
199 
211  bool myEntitySensorVolumesEnabled; // also referred to as 'EmitterVolumes'.
219  };
220 
221 }
222 

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)