VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtObserverModeRecord.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2025 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
13 
14 #include <string>
15 #include <map>
16 #include <bitset>
17 
18 namespace makArchives
19 {
25  {
26  public:
30  {
31  MinDistance,
32  MaxDistance
33  };
34 
35  public:
36 
37  typedef std::map< std::string, bool> ObserverSettingsMap;
38 
41 
44 
47 
49  DtObserverModeRecord& operator=( const DtObserverModeRecord& orig );
50 
55  void setModeKey( const std::string& modeKey );
56 
58  const std::string& modeKey() const;
59 
61  void setName( const std::string& name );
62 
64  const std::string& name() const;
65 
68  void setIs2D( bool trueOrFalse );
69 
71  bool is2D() const;
72 
74  void setModelSet( int modelSet );
75 
77  int modelSet() const;
78 
80  void setKeyMap( const std::string& keyMap );
81 
83  const std::string& keyMap() const;
84 
86  const std::string& sensor() const;
88  void setSensor(const std::string& sensor);
90 
92  int gainPrecision() const;
94  void setGainPrecision( int amt );
96 
98  int orbitSpeedGain() const;
100  void setOrbitSpeedGain( int gain );
102 
104  int linearScaledSpeedGain() const;
106  void setLinearScaledSpeedGain( int gain );
108 
110  int linearUnscaledSpeedGain() const;
112  void setLinearUnscaledSpeedGain( int gain );
114 
116  int rotationSpeedGain() const;
118  void setRotationSpeedGain( int gain );
120 
122  double modelScaleFactor() const;
124  void setModelScaleFactor( double modelScaleFactor );
126 
128  const std::string& modelScaleType() const;
130  void setModelScaleType( const std::string& modelScaleType );
132 
134  double maxModelScaleFactor() const;
136  void setMaxModelScaleFactor( double maxModelScaleFactor );
138 
140  void setObserverSetting( const std::string& key, bool enabled );
142  bool observerSetting( const std::string& key ) const;
144 
146  void setSpeedScalingMode( unsigned int mode );
148  unsigned int speedScalingMode() const;
150 
152  void setSpeedScalingMslModeOffset( double offset );
154  double speedScalingMslModeOffset() const;
156 
158  void setCameraShakeEnabled( bool enabled );
160  bool cameraShakeEnabled() const;
162 
164  void setCameraShakeIntensity( double offset );
166  double cameraShakeIntensity() const;
168 
170  void setLodScaleCenterEnabled(bool enabled);
172  bool lodScaleCenterEnabled() const;
174 
176  void setLodScaleCenterMagMinLimit(double limit);
178  double lodScaleCenterMagMinLimit() const;
180 
182  void setIsCameraLocationIncluded(bool includeCameraLocation);
184  double isCameraLocationIncluded() const;
186 
188  void setIncludedFocusPoints(std::bitset<7> includedFocusPoints);
190  std::bitset<7> includedFocusPoints() const;
192 
194  void setLodCenterDistanceToUse(DtLodCenterDistanceToUseFunction limit);
196  DtLodCenterDistanceToUseFunction lodCenterDistanceToUse() const;
198 
200  void setIsScaledCameraDistanceUsed(double limit);
202  double isScaledCameraDistanceUsed() const;
204 
206  void setLodCenterMinimumAngleFromViewVector(double minAngle);
208  double lodCenterMinimumAngleFromViewVector() const;
210 
212  unsigned int northType() const;
214  void setNorthType(unsigned int northType);
216 
218  void setColorControlEnabled(bool enabled);
220  bool colorControlEnabled() const;
222 
224  void setColorControlInvert(bool enabled);
226  bool colorControlInvert() const;
228 
230  void setColorControlContrast(double value);
232  double colorControlContrast() const;
234 
236  void setColorControlBrightness(double value);
238  double colorControlBrightness() const;
240 
242  void setColorControlColorMix(double value);
244  double colorControlColorMix() const;
246 
247  const ObserverSettingsMap& observerSettingsMap() const;
248 
249 
250  protected:
251  friend class boost::serialization::access;
252 
253  template <typename Archive>
254  void serialize(Archive& ar, unsigned int version)
255  {
256  ar & BOOST_SERIALIZATION_NVP(myModeKey);
257  ar & BOOST_SERIALIZATION_NVP(myName);
258  ar & BOOST_SERIALIZATION_NVP(myIs2D);
259  ar & BOOST_SERIALIZATION_NVP(myModelSet);
260  ar & BOOST_SERIALIZATION_NVP(myKeyMap);
261  ar & BOOST_SERIALIZATION_NVP(myOrbitSpeedGain);
262  ar & BOOST_SERIALIZATION_NVP(myLinearScaledSpeedGain);
263  ar & BOOST_SERIALIZATION_NVP(myLinearUnscaledSpeedGain);
264  ar & BOOST_SERIALIZATION_NVP(myRotationSpeedGain);
265  ar & BOOST_SERIALIZATION_NVP(myGainPrecision);
266  if ( version >= 1 )
267  {
268  ar & BOOST_SERIALIZATION_NVP(myModelScaleFactor);
269  }
270  if ( version >= 2 )
271  {
272  if ( version < 6 )
273  {
274  ar & BOOST_SERIALIZATION_NVP(myModelScaleType);
275  }
276  ar & BOOST_SERIALIZATION_NVP(myMaxModelScaleFactor);
277  }
278  if ( version >= 3 )
279  {
280  ar & BOOST_SERIALIZATION_NVP(mySensor);
281  }
282  ar & BOOST_SERIALIZATION_NVP(myObserverSettingsMap);
283  if ( version >= 4 )
284  {
285  ar & BOOST_SERIALIZATION_NVP(mySpeedScalingMode);
286  ar & BOOST_SERIALIZATION_NVP(mySpeedScalingMslModeOffset);
287  }
288  if ( version >= 5 )
289  {
290  ar & BOOST_SERIALIZATION_NVP(myCameraShakeEnabled);
291  ar & BOOST_SERIALIZATION_NVP(myCameraShakeIntensity);
292  }
293  if ( version >= 6 )
294  {
295  ar & BOOST_SERIALIZATION_NVP(myMutableModelScaleTypeString);
296  }
297  if (version >= 7)
298  {
299  ar & BOOST_SERIALIZATION_NVP(myLodScaleCenterEnabled);
300  ar & BOOST_SERIALIZATION_NVP(myLodScaleCenterMagMinLimit);
301  }
302  if (version >= 8)
303  {
304  ar & BOOST_SERIALIZATION_NVP(myNorthType);
305  }
306  if (version >= 9)
307  {
308  ar& BOOST_SERIALIZATION_NVP(myColorControlEnabled);
309  ar& BOOST_SERIALIZATION_NVP(myColorControlInvert);
310  ar& BOOST_SERIALIZATION_NVP(myColorControlContrast);
311  ar& BOOST_SERIALIZATION_NVP(myColorControlBrightness);
312  ar& BOOST_SERIALIZATION_NVP(myColorControlColorMix);
313  }
314  if (version >= 10)
315  {
316  ar & BOOST_SERIALIZATION_NVP(myLodCenterIsCameraLocationUsed);
317  ar & BOOST_SERIALIZATION_NVP(myLodCenterIncludedFocusPoints);
318  ar & BOOST_SERIALIZATION_NVP(myLodCenterDistanceToUseFunction);
319  ar & BOOST_SERIALIZATION_NVP(myLodCenterIsScaledCameraDistanceUsed);
320  ar & BOOST_SERIALIZATION_NVP(myLodCenterMinimumAngleFromViewVector);
321  }
322  }
323 
324  protected:
325  std::string myModeKey;
326  std::string myName;
327  std::string mySensor;
328  bool myIs2D;
329  std::string myKeyMap;
346  unsigned int myNorthType;
352 
358 
359  private:
360  // Mutable so that we can provide backward compatibility with settings files that contain
361  // the old enum instead of the new string
362  mutable std::string myMutableModelScaleTypeString;
363  };
364 }
365 
int myLinearUnscaledSpeedGain
Definition: DtObserverModeRecord.h:333
bool myColorControlEnabled
Definition: DtObserverModeRecord.h:347
bool myLodScaleCenterEnabled
Definition: DtObserverModeRecord.h:344
void serialize(Archive &ar, unsigned int version)
Definition: DtObserverModeRecord.h:254
BOOST_CLASS_VERSION(makArchives::DtDiGuySettingsRecord, 3)
DtObserverModeRecord is the serializable record used to read and write a Visual Mode&#39;s Configuration ...
Definition: DtObserverModeRecord.h:24
std::string myKeyMap
Definition: DtObserverModeRecord.h:329
double myModelScaleFactor
Definition: DtObserverModeRecord.h:336
float myColorControlColorMix
Definition: DtObserverModeRecord.h:351
unsigned myModelScaleType
Definition: DtObserverModeRecord.h:338
double myCameraShakeIntensity
Definition: DtObserverModeRecord.h:343
unsigned int myNorthType
Definition: DtObserverModeRecord.h:346
DtLodCenterDistanceToUseFunction
Enumeration which defines the functions that can be used when picking between the camera distance and...
Definition: DtObserverModeRecord.h:29
bool myLodCenterIsCameraLocationUsed
Definition: DtObserverModeRecord.h:353
bool myIs2D
Definition: DtObserverModeRecord.h:328
Contains DLL export macros.
int myGainPrecision
Definition: DtObserverModeRecord.h:335
ObserverSettingsMap myObserverSettingsMap
Definition: DtObserverModeRecord.h:337
std::string mySensor
Definition: DtObserverModeRecord.h:327
int myModelSet
Definition: DtObserverModeRecord.h:330
std::string myModeKey
Definition: DtObserverModeRecord.h:325
int myOrbitSpeedGain
Definition: DtObserverModeRecord.h:331
float myColorControlBrightness
Definition: DtObserverModeRecord.h:350
int myRotationSpeedGain
Definition: DtObserverModeRecord.h:334
double myMaxModelScaleFactor
Definition: DtObserverModeRecord.h:339
bool myCameraShakeEnabled
Definition: DtObserverModeRecord.h:342
bool myLodCenterIsScaledCameraDistanceUsed
Definition: DtObserverModeRecord.h:356
std::string myName
Definition: DtObserverModeRecord.h:326
double mySpeedScalingMslModeOffset
Definition: DtObserverModeRecord.h:341
std::string myMutableModelScaleTypeString
Definition: DtObserverModeRecord.h:362
std::map< std::string, bool > ObserverSettingsMap
Definition: DtObserverModeRecord.h:37
const char int mode
Definition: ioapi.h:38
float myColorControlContrast
Definition: DtObserverModeRecord.h:349
double myLodScaleCenterMagMinLimit
Definition: DtObserverModeRecord.h:345
std::string myLodCenterIncludedFocusPoints
Definition: DtObserverModeRecord.h:354
voidpf uLong offset
Definition: ioapi.h:42
unsigned mySpeedScalingMode
Definition: DtObserverModeRecord.h:340
#define DT_DLL_MAKARCHIVES
Definition: makArchives.h:31
double myLodCenterMinimumAngleFromViewVector
Definition: DtObserverModeRecord.h:357
int myLinearScaledSpeedGain
Definition: DtObserverModeRecord.h:332
std::string myLodCenterDistanceToUseFunction
Definition: DtObserverModeRecord.h:355
bool myColorControlInvert
Definition: DtObserverModeRecord.h:348

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)