VR-Forces 4.5 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) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
13 
14 #include <string>
15 
16 namespace makArchives
17 {
21  {
22  public:
23 
25  {
35  AttachTypeMimicLocationTrack
36  };
37 
40 
43 
45  DtObserverSettingsRecord& operator=(const DtObserverSettingsRecord& orig);
46 
49 
51 
52 
53  void setObserverMode( const std::string& observerMode );
54  const std::string& observerMode() const;
55 
56  void setAttachType( AttachType type );
57  AttachType attachType() const;
58 
59  void setHideModelOnAttach( bool hide );
60  bool hideModelOnAttach() const;
61 
62  void setOrientToTargetConstraint( bool orient );
63  bool orientToTargetConstraint() const;
64 
65  void setOrbitSpeedGain( int gain );
66  int orbitSpeedGain() const;
67 
68  void setRotationSpeedGain( int gain );
69  int rotationSpeedGain() const;
70 
71  void setLinearScaledSpeedGain( int gain );
72  int linearScaledSpeedGain() const;
73 
74  void setLinearUnscaledSpeedGain( int gain );
75  int linearUnscaledSpeedGain() const;
76 
79 
80  void setOrbitSpeed( double speed );
81  double orbitSpeed() const;
82 
83  void setRotationSpeed( double speed );
84  double rotationSpeed() const;
85 
86  void setLinearSpeed( double speed );
87  double linearSpeed() const;
88 
90 
91  void setSpeedScalingMode( unsigned mode );
92  unsigned speedScalingMode() const;
94 
96 
97  void setSpeedScalingMslModeOffset( double offset );
98  double speedScalingMslModeOffset() const;
100 
102 
103 
104  protected:
105 
106  friend class boost::serialization::access;
107 
111  template<class Archive>
112  void serialize(Archive & ar, const unsigned int version)
113  {
114  ar & BOOST_SERIALIZATION_NVP(myAttachType);
115  ar & BOOST_SERIALIZATION_NVP(myHideModelOnAttach);
116  ar & BOOST_SERIALIZATION_NVP(myOrientToTargetConstraint);
117  // no longer used
118  ar & BOOST_SERIALIZATION_NVP(mySpeedScaling);
119  // no longer used
120  ar & BOOST_SERIALIZATION_NVP(myConstrainToTerrain);
121  ar & BOOST_SERIALIZATION_NVP(myOrbitSpeedGain);
122  ar & BOOST_SERIALIZATION_NVP(myRotationSpeedGain);
123  ar & BOOST_SERIALIZATION_NVP(myLinearScaledSpeedGain);
124  ar & BOOST_SERIALIZATION_NVP(myLinearUnscaledSpeedGain);
125  //ar & BOOST_SERIALIZATION_NVP(myGainPrecision);
126  ar & BOOST_SERIALIZATION_NVP(myOrbitSpeed);
127  ar & BOOST_SERIALIZATION_NVP(myRotationSpeed);
128  ar & BOOST_SERIALIZATION_NVP(myLinearSpeed);
129  if ( version >= 2 )
130  {
131  ar & BOOST_SERIALIZATION_NVP(myObserverMode);
132  }
133  if ( version >= 3 )
134  {
135  ar & BOOST_SERIALIZATION_NVP(mySpeedScalingMode);
136 
137  if (version == 3)
138  {
139  double mySpeedScalingAslModeOffset = 0;
140  ar & BOOST_SERIALIZATION_NVP(mySpeedScalingAslModeOffset);
141  mySpeedScalingMslModeOffset = mySpeedScalingAslModeOffset;
142  }
143  }
144  if ( version >= 4 )
145  {
146  ar & BOOST_SERIALIZATION_NVP(mySpeedScalingMslModeOffset);
147  }
148  }
149 
150  protected:
151 
152  std::string myObserverMode;
162  //int myGainPrecision;
163  double myOrbitSpeed;
168  };
169 }
170 
172 
173 

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)