VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtObserverSettingsRecord.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2017 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 
105 
106  void setProjectionIs2D( bool is2D );
107  bool projectionIs2D() const;
109 
110 
111  protected:
112 
113  friend class boost::serialization::access;
114 
118  template<class Archive>
119  void serialize(Archive & ar, const unsigned int version)
120  {
121  ar & BOOST_SERIALIZATION_NVP(myAttachType);
122  ar & BOOST_SERIALIZATION_NVP(myHideModelOnAttach);
123  ar & BOOST_SERIALIZATION_NVP(myOrientToTargetConstraint);
124  // no longer used
125  ar & BOOST_SERIALIZATION_NVP(mySpeedScaling);
126  // no longer used
127  ar & BOOST_SERIALIZATION_NVP(myConstrainToTerrain);
128  ar & BOOST_SERIALIZATION_NVP(myOrbitSpeedGain);
129  ar & BOOST_SERIALIZATION_NVP(myRotationSpeedGain);
130  ar & BOOST_SERIALIZATION_NVP(myLinearScaledSpeedGain);
131  ar & BOOST_SERIALIZATION_NVP(myLinearUnscaledSpeedGain);
132  //ar & BOOST_SERIALIZATION_NVP(myGainPrecision);
133  ar & BOOST_SERIALIZATION_NVP(myOrbitSpeed);
134  ar & BOOST_SERIALIZATION_NVP(myRotationSpeed);
135  ar & BOOST_SERIALIZATION_NVP(myLinearSpeed);
136  if ( version >= 2 )
137  {
138  ar & BOOST_SERIALIZATION_NVP(myObserverMode);
139  }
140  if ( version >= 3 )
141  {
142  ar & BOOST_SERIALIZATION_NVP(mySpeedScalingMode);
143 
144  if (version == 3)
145  {
146  double mySpeedScalingAslModeOffset = 0;
147  ar & BOOST_SERIALIZATION_NVP(mySpeedScalingAslModeOffset);
148  mySpeedScalingMslModeOffset = mySpeedScalingAslModeOffset;
149  }
150  }
151  if (version >= 4)
152  {
153  ar & BOOST_SERIALIZATION_NVP(mySpeedScalingMslModeOffset);
154  }
155  if (version >= 5)
156  {
157  ar & BOOST_SERIALIZATION_NVP(myProjectionIs2D);
158  }
159  }
160 
161  protected:
162 
163  std::string myObserverMode;
173  //int myGainPrecision;
174  double myOrbitSpeed;
180  };
181 }
182 
184 
185 

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)