VR-Forces 4.3.1 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  enum BuoyancyCullType { FrontFacing, Frustum };
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  bool buoyAndBeaconIconsEnabled() const;
109  void setBuoyAndBeaconIconsEnabled( bool enabled );
110 
111  unsigned int heightAboveTerrainPeriod() const;
112  void setHeightAboveTerrainPeriod( unsigned int period );
113 
117  float buoyancyMinimumCullDistance() const;
118 
120  void setBuoyancyMinimumCullDistance( float distance );
121 
122  void setBuoyancyCullType( BuoyancyCullType cullType );
123  BuoyancyCullType buoyancyCullType() const;
124 
126 
127  protected:
128 
129  friend class boost::serialization::access;
130 
134  template<class Archive>
135  void serialize(Archive & ar, const unsigned int version)
136  {
137  if ( version <= 6 )
138  {
139  //Deprecated
140  bool myTrailingEffectsEnabled;
141  bool myTrackHistoryEnabled;
142  bool myDecalEffectsEnabled;
143  ar & BOOST_SERIALIZATION_NVP(myTrailingEffectsEnabled);
144  ar & BOOST_SERIALIZATION_NVP(myTrackHistoryEnabled);
145  ar & BOOST_SERIALIZATION_NVP(myDecalEffectsEnabled);
146  }
147  ar & BOOST_SERIALIZATION_NVP(myGroundClampingEnabled);
148  ar & BOOST_SERIALIZATION_NVP(myGroundClampingRadiusScale);
149  ar & BOOST_SERIALIZATION_NVP(mySmoothingEnabled);
150  ar & BOOST_SERIALIZATION_NVP(mySmoothingPeriod);
151  ar & BOOST_SERIALIZATION_NVP(myOrientationClampingEnabled);
152  ar & BOOST_SERIALIZATION_NVP(myLifeformsUprightEnabled);
153 
154  if(version >= 1 && version != 7 )
155  {
156  ar & BOOST_SERIALIZATION_NVP(myShowEntityLabels);
157  }
158 
159  if (version >= 2)
160  {
161  ar & BOOST_SERIALIZATION_NVP(myShowStealthsEnabled);
162  }
163 
164  if (version >= 3)
165  {
166  ar & BOOST_SERIALIZATION_NVP(myInfoPopupsOnSelectEnabled);
167  }
168 
169  if (version >= 4 && version != 7 )
170  {
171  ar & BOOST_SERIALIZATION_NVP(myFireDetonateLinesEnabled);
172  }
173 
174  if (version >= 5)
175  {
176  if ( version != 7 )
177  {
178  ar & BOOST_SERIALIZATION_NVP(myEntityHeightAboveTerrainLinesEnabled);
179  }
180  ar & BOOST_SERIALIZATION_NVP(myEntityHeightAboveTerrainMode);
181  }
182 
183  if (version >=6)
184  {
185  ar& BOOST_SERIALIZATION_NVP(myEntitySimDataEnabled);
186  }
187 
188  if (version >= 9 )
189  {
190  ar & BOOST_SERIALIZATION_NVP(myColorizedModelColorType);
191  }
192 
193  if (version == 10 )
194  {
195  int myEntityIconScale = 1;
196  ar & BOOST_SERIALIZATION_NVP(myEntityIconScale);
197  myEntityIconScaleFactor =
198  pow(1.25, ((float)myEntityIconScale / 10.0) - 5);
199  }
200 
201  if (version >= 11 )
202  {
203  ar & BOOST_SERIALIZATION_NVP(myHideEmbarked2DObjects);
204  }
205 
206  if (version >= 12 )
207  {
208  ar & BOOST_SERIALIZATION_NVP(myEntityIconScaleFactor);
209  }
210  if ( version >= 13 )
211  {
212  ar & BOOST_SERIALIZATION_NVP(myEntitySensorVolumesEnabled);
213  }
214  if ( version >= 14 )
215  {
216  ar & BOOST_SERIALIZATION_NVP(myGroundClampingCullingEnabled);
217  }
218  else
219  {
220  myGroundClampingCullingEnabled = ( myGroundClampingRadiusScale < 100 );
221  }
222  if ( version >= 15 )
223  {
224  ar & BOOST_SERIALIZATION_NVP(myRotateEntitySymbols);
225  }
226  if ( version >= 16 )
227  {
228  ar & BOOST_SERIALIZATION_NVP(myOceanWakesEnabled);
229  ar & BOOST_SERIALIZATION_NVP(myHullSprayEffectsEnabled);
230  ar & BOOST_SERIALIZATION_NVP(myBuoyancyModelsEnabled);
231  }
232  if ( version >= 17 )
233  {
234  ar & BOOST_SERIALIZATION_NVP( myBuoyAndBeaconIconsEnabled );
235  }
236  if ( version >= 18 )
237  {
238  ar & BOOST_SERIALIZATION_NVP( myHeightAboveTerrainPeriod );
239  }
240  if ( version >= 19 )
241  {
242  ar & BOOST_SERIALIZATION_NVP( myBuoyancyDefaultLODDistance );
243  }
244  if ( version >= 20 )
245  {
246  ar & BOOST_SERIALIZATION_NVP( myBuoyancyMinimumCullDistance );
247  ar & BOOST_SERIALIZATION_NVP( myBuoyancyCullType );
248  }
249 
250  }
251 
252  protected:
253 
268  bool myEntitySensorVolumesEnabled; // also referred to as 'EmitterVolumes'.
281  };
282 
283 }
284 

Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)