VR-Forces 4.1 Class Documentation
DtEntitySettingsRecord.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2012 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 showStealthsEnabled() const;
63  void setShowStealthsEnabled( bool enabled );
64 
65  bool infoPopupsOnSelectEnabled() const;
66  void setInfoPopupsOnSelectEnabled( bool enabled );
67 
68  bool fireDetonateLinesEnabled() const;
69  void setFireDetonateLinesEnabled( bool enabled );
70 
71  bool entityEmitterVolumesEnabled() const;
72  void setEntityEmitterVolumesEnabled( bool enabled );
73 
74  bool entityHeightAboveTerrainLinesEnabled() const;
75  void setEntityHeightAboveTerrainLinesEnabled( bool enabled );
76 
77  unsigned entityHeightAboveTerrainMode() const;
78  void setEntityHeightAboveTerrainMode( unsigned mode );
79 
80  bool entitySimDataEnabled() const;
81  void setEntitySimDataEnabled( bool enabled );
82 
83  unsigned colorizedModelColorType() const;
84  void setColorizedModelColorType( unsigned type );
85 
86  float entityIconScale() const;
87  void setEntityIconScale( float scale );
88 
89  void setHideEmbarked2DObjects( bool b );
90  bool hideEmbarked2DObjects() const;
91 
93 
94  protected:
95 
96  friend class boost::serialization::access;
97 
101  template<class Archive>
102  void serialize(Archive & ar, const unsigned int version)
103  {
104  if ( version <= 6 )
105  {
106  //Deprecated
107  bool myTrailingEffectsEnabled;
108  bool myTrackHistoryEnabled;
109  bool myDecalEffectsEnabled;
110  ar & BOOST_SERIALIZATION_NVP(myTrailingEffectsEnabled);
111  ar & BOOST_SERIALIZATION_NVP(myTrackHistoryEnabled);
112  ar & BOOST_SERIALIZATION_NVP(myDecalEffectsEnabled);
113  }
114  ar & BOOST_SERIALIZATION_NVP(myGroundClampingEnabled);
115  ar & BOOST_SERIALIZATION_NVP(myGroundClampingRadiusScale);
116  ar & BOOST_SERIALIZATION_NVP(mySmoothingEnabled);
117  ar & BOOST_SERIALIZATION_NVP(mySmoothingPeriod);
118  ar & BOOST_SERIALIZATION_NVP(myOrientationClampingEnabled);
119  ar & BOOST_SERIALIZATION_NVP(myLifeformsUprightEnabled);
120 
121  if(version >= 1 && version != 7 )
122  {
123  ar & BOOST_SERIALIZATION_NVP(myShowEntityLabels);
124  }
125 
126  if (version >= 2)
127  {
128  ar & BOOST_SERIALIZATION_NVP(myShowStealthsEnabled);
129  }
130 
131  if (version >= 3)
132  {
133  ar & BOOST_SERIALIZATION_NVP(myInfoPopupsOnSelectEnabled);
134  }
135 
136  if (version >= 4 && version != 7 )
137  {
138  ar & BOOST_SERIALIZATION_NVP(myFireDetonateLinesEnabled);
139  }
140 
141  if (version >= 5)
142  {
143  if ( version != 7 )
144  {
145  ar & BOOST_SERIALIZATION_NVP(myEntityHeightAboveTerrainLinesEnabled);
146  }
147  ar & BOOST_SERIALIZATION_NVP(myEntityHeightAboveTerrainMode);
148  }
149 
150  if (version >=6)
151  {
152  ar& BOOST_SERIALIZATION_NVP(myEntitySimDataEnabled);
153  }
154 
155  if (version >= 9 )
156  {
157  ar & BOOST_SERIALIZATION_NVP(myColorizedModelColorType);
158  }
159 
160  if (version == 10 )
161  {
162  int myEntityIconScale;
163  ar & BOOST_SERIALIZATION_NVP(myEntityIconScale);
164  myEntityIconScaleFactor =
165  pow(1.25, ((float)myEntityIconScale / 10.0) - 5);
166  }
167 
168  if (version >= 11 )
169  {
170  ar & BOOST_SERIALIZATION_NVP(myHideEmbarked2DObjects);
171  }
172 
173  if (version >= 12 )
174  {
175  ar & BOOST_SERIALIZATION_NVP(myEntityIconScaleFactor);
176  }
177  if ( version >= 13 )
178  {
179  ar & BOOST_SERIALIZATION_NVP(myEntitySensorVolumesEnabled);
180  }
181  if ( version >= 14 )
182  {
183  ar & BOOST_SERIALIZATION_NVP(myGroundClampingCullingEnabled);
184  }
185  else
186  {
187  myGroundClampingCullingEnabled = ( myGroundClampingRadiusScale < 100 );
188  }
189 
190  }
191 
192  protected:
193 
205  bool myEntitySensorVolumesEnabled; // also referred to as 'EmitterVolumes'.
212 
213  };
214 
215 }
216 

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)