VR-Forces 4.3.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtObserverSettingsRecord.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2008 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtObserverSettingsRecord.h,v $ $Revision: 1.5 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #ifndef DtObserverSettingsRecord_H_
14 #define DtObserverSettingsRecord_H_
15 
17 
18 #include <string>
19 
20 namespace makArchives
21 {
25  {
26  public:
27 
29  {
37  AttachTypeSpaceFollow
38  };
39 
42 
45 
47  DtObserverSettingsRecord& operator=(const DtObserverSettingsRecord& orig);
48 
51 
53 
54 
55  void setObserverMode( const std::string& observerMode );
56  const std::string& observerMode() const;
57 
58  void setAttachType( AttachType type );
59  AttachType attachType() const;
60 
61  void setHideModelOnAttach( bool hide );
62  bool hideModelOnAttach() const;
63 
64  void setOrientToTargetConstraint( bool orient );
65  bool orientToTargetConstraint() const;
66 
67  void setOrbitSpeedGain( int gain );
68  int orbitSpeedGain() const;
69 
70  void setRotationSpeedGain( int gain );
71  int rotationSpeedGain() const;
72 
73  void setLinearScaledSpeedGain( int gain );
74  int linearScaledSpeedGain() const;
75 
76  void setLinearUnscaledSpeedGain( int gain );
77  int linearUnscaledSpeedGain() const;
78 
81 
82  void setOrbitSpeed( double speed );
83  double orbitSpeed() const;
84 
85  void setRotationSpeed( double speed );
86  double rotationSpeed() const;
87 
88  void setLinearSpeed( double speed );
89  double linearSpeed() const;
90 
92 
93  void setSpeedScalingMode( unsigned mode );
94  unsigned speedScalingMode() const;
96 
98 
99  void setSpeedScalingAslModeOffset( double offset );
100  double speedScalingAslModeOffset() const;
102 
104 
105 
106  protected:
107 
108  friend class boost::serialization::access;
109 
113  template<class Archive>
114  void serialize(Archive & ar, const unsigned int version)
115  {
116  ar & BOOST_SERIALIZATION_NVP(myAttachType);
117  ar & BOOST_SERIALIZATION_NVP(myHideModelOnAttach);
118  ar & BOOST_SERIALIZATION_NVP(myOrientToTargetConstraint);
119  // no longer used
120  ar & BOOST_SERIALIZATION_NVP(mySpeedScaling);
121  // no longer used
122  ar & BOOST_SERIALIZATION_NVP(myConstrainToTerrain);
123  ar & BOOST_SERIALIZATION_NVP(myOrbitSpeedGain);
124  ar & BOOST_SERIALIZATION_NVP(myRotationSpeedGain);
125  ar & BOOST_SERIALIZATION_NVP(myLinearScaledSpeedGain);
126  ar & BOOST_SERIALIZATION_NVP(myLinearUnscaledSpeedGain);
127  //ar & BOOST_SERIALIZATION_NVP(myGainPrecision);
128  ar & BOOST_SERIALIZATION_NVP(myOrbitSpeed);
129  ar & BOOST_SERIALIZATION_NVP(myRotationSpeed);
130  ar & BOOST_SERIALIZATION_NVP(myLinearSpeed);
131  if ( version >= 2 )
132  {
133  ar & BOOST_SERIALIZATION_NVP(myObserverMode);
134  }
135  if ( version >= 3 )
136  {
137  ar & BOOST_SERIALIZATION_NVP(mySpeedScalingMode);
138  ar & BOOST_SERIALIZATION_NVP(mySpeedScalingAslModeOffset);
139  }
140  }
141 
142  protected:
143 
144  std::string myObserverMode;
154  //int myGainPrecision;
155  double myOrbitSpeed;
160  };
161 }
162 
164 
165 #endif
166 

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)