VR-Forces 4.6 Class Documentation
 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) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
13 
14 #include <string>
15 #include <map>
16 
17 namespace makArchives
18 {
24  {
25  public:
26 
27  typedef std::map< std::string, bool> ObserverSettingsMap;
28 
31 
34 
37 
39  DtObserverModeRecord& operator=( const DtObserverModeRecord& orig );
40 
45  void setModeKey( const std::string& modeKey );
46 
48  const std::string& modeKey() const;
49 
51  void setName( const std::string& name );
52 
54  const std::string& name() const;
55 
58  void setIs2D( bool trueOrFalse );
59 
61  bool is2D() const;
62 
64  void setModelSet( int modelSet );
65 
67  int modelSet() const;
68 
70  void setKeyMap( const std::string& keyMap );
71 
73  const std::string& keyMap() const;
74 
76 
77  const std::string& sensor() const;
78  void setSensor(const std::string& sensor);
80 
82 
83  int gainPrecision() const;
84  void setGainPrecision( int amt );
86 
88 
89  int orbitSpeedGain() const;
90  void setOrbitSpeedGain( int gain );
92 
94 
95  int linearScaledSpeedGain() const;
96  void setLinearScaledSpeedGain( int gain );
98 
100 
101  int linearUnscaledSpeedGain() const;
102  void setLinearUnscaledSpeedGain( int gain );
104 
106 
107  int rotationSpeedGain() const;
108  void setRotationSpeedGain( int gain );
110 
112 
113  double modelScaleFactor() const;
114  void setModelScaleFactor( double modelScaleFactor );
116 
118 
119  unsigned modelScaleType() const;
120  void setModelScaleType( unsigned modelScaleFactor );
122 
124 
125  double maxModelScaleFactor() const;
126  void setMaxModelScaleFactor( double maxModelScaleFactor );
128 
130 
131  void setObserverSetting( const std::string& key, bool enabled );
132  bool observerSetting( const std::string& key ) const;
134 
136 
137  void setSpeedScalingMode( unsigned int mode );
138  unsigned int speedScalingMode() const;
140 
142 
143  void setSpeedScalingMslModeOffset( double offset );
144  double speedScalingMslModeOffset() const;
146 
148 
149  void setCameraShakeEnabled( bool enabled );
150  bool cameraShakeEnabled() const;
152 
154 
155  void setCameraShakeIntensity( double offset );
156  double cameraShakeIntensity() const;
158 
159  const ObserverSettingsMap& observerSettingsMap() const;
160 
161 
162  protected:
163  friend class boost::serialization::access;
164 
165  template <typename Archive>
166  void serialize(Archive& ar, unsigned int version)
167  {
168  ar & BOOST_SERIALIZATION_NVP(myModeKey);
169  ar & BOOST_SERIALIZATION_NVP(myName);
170  ar & BOOST_SERIALIZATION_NVP(myIs2D);
171  ar & BOOST_SERIALIZATION_NVP(myModelSet);
172  ar & BOOST_SERIALIZATION_NVP(myKeyMap);
173  ar & BOOST_SERIALIZATION_NVP(myOrbitSpeedGain);
174  ar & BOOST_SERIALIZATION_NVP(myLinearScaledSpeedGain);
175  ar & BOOST_SERIALIZATION_NVP(myLinearUnscaledSpeedGain);
176  ar & BOOST_SERIALIZATION_NVP(myRotationSpeedGain);
177  ar & BOOST_SERIALIZATION_NVP(myGainPrecision);
178  if ( version >= 1 )
179  {
180  ar & BOOST_SERIALIZATION_NVP(myModelScaleFactor);
181  }
182  if ( version >= 2 )
183  {
184  ar & BOOST_SERIALIZATION_NVP(myModelScaleType);
185  ar & BOOST_SERIALIZATION_NVP(myMaxModelScaleFactor);
186  }
187  if ( version >= 3 )
188  {
189  ar & BOOST_SERIALIZATION_NVP(mySensor);
190  }
191  ar & BOOST_SERIALIZATION_NVP(myObserverSettingsMap);
192  if ( version >= 4 )
193  {
194  ar & BOOST_SERIALIZATION_NVP(mySpeedScalingMode);
195  ar & BOOST_SERIALIZATION_NVP(mySpeedScalingMslModeOffset);
196  }
197  if ( version >= 5 )
198  {
199  ar & BOOST_SERIALIZATION_NVP(myCameraShakeEnabled);
200  ar & BOOST_SERIALIZATION_NVP(myCameraShakeIntensity);
201  }
202  }
203 
204  protected:
205  std::string myModeKey;
206  std::string myName;
207  std::string mySensor;
208  bool myIs2D;
209  std::string myKeyMap;
224  };
225 }
226 

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)