VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtObserverStateRecord.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 
14 #include <set>
15 
16 namespace makArchives
17 {
21  {
22 
23  public:
24 
27 
30 
32  DtObserverStateRecord& operator=(const DtObserverStateRecord& orig);
33 
36 
38  void setObserverSettingsRecord(const DtObserverSettingsRecord& rec);
39 
41  const DtObserverSettingsRecord& observerSettingsRecord() const;
42 
44  void setAttachedToDisplayNames( const std::set<std::string>& displayNames );
45 
48  const std::set<std::string>& attachedToDisplayNames() const;
49 
51  void setSecondaryAttachedToDisplayNames( const std::set<std::string>& displayNames );
52 
55  const std::set<std::string>& secondaryAttachedToDisplayNames() const;
56 
59  void getLocationTrackAttachment( double& x, double& y, double& z ) const;
60 
63  void setLocationTrackAttachment( double x, double y, double z );
64 
67  void getObserverOffsetVector( double& x, double& y, double& z ) const;
68 
70  void setObserverOffsetVector( double x, double y, double z );
71 
74  void getObserverRotationOffset( double& x, double& y, double& z, double& w ) const;
75 
77  void setObserverRotationOffset( double x, double y, double z, double w );
78 
80  void getPosition( double &x, double &y, double& z ) const;
81 
83  void setPosition( double x, double y, double z );
84 
86  void getOrientation( double& x, double& y, double& z, double& w ) const;
87 
89  void setOrientation( double x, double y, double z, double w );
90 
92  void setDisplayName(const std::string&);
93 
96  const std::string& displayName() const;
97 
99  void setViewResolution(double resolution);
100 
103  double viewResolution() const;
104 
107  void setViewMagnification( double magnification );
108 
111  double viewMagnification() const;
112 
117  void setSetIntoObserver(bool);
118 
121  bool setIntoObserver() const;
122 
125  void setPartAttachment(int partId);
126 
129  int partAttachment() const;
130 
131  protected:
132 
133  friend class boost::serialization::access;
134 
138  template<class Archive>
139  void serialize(Archive & ar, const unsigned int version)
140  {
141  ar & BOOST_SERIALIZATION_NVP(myObserverSettingsRecord);
142  ar & BOOST_SERIALIZATION_NVP(myAttachedToDisplayNames);
143  ar & BOOST_SERIALIZATION_NVP(myObserverOffsetVectorX);
144  ar & BOOST_SERIALIZATION_NVP(myObserverOffsetVectorY);
145  ar & BOOST_SERIALIZATION_NVP(myObserverOffsetVectorZ);
146  ar & BOOST_SERIALIZATION_NVP(myObserverRotationOffsetX);
147  ar & BOOST_SERIALIZATION_NVP(myObserverRotationOffsetY);
148  ar & BOOST_SERIALIZATION_NVP(myObserverRotationOffsetZ);
149  ar & BOOST_SERIALIZATION_NVP(myObserverRotationOffsetW);
150  ar & BOOST_SERIALIZATION_NVP(myPosX);
151  ar & BOOST_SERIALIZATION_NVP(myPosY);
152  ar & BOOST_SERIALIZATION_NVP(myPosZ);
153  ar & BOOST_SERIALIZATION_NVP(myOrientationX);
154  ar & BOOST_SERIALIZATION_NVP(myOrientationY);
155  ar & BOOST_SERIALIZATION_NVP(myOrientationZ);
156  ar & BOOST_SERIALIZATION_NVP(myOrientationW);
157 
158  if (version >= 1)
159  {
160  ar & BOOST_SERIALIZATION_NVP(myDisplayName);
161  }
162 
163  if ( version >= 2)
164  {
165  if(version < 6)
166  {
167  ar & boost::serialization::make_nvp("myZoomFactor",myViewResolution);
168  }
169  else
170  {
171  ar & BOOST_SERIALIZATION_NVP(myViewResolution);
172  }
173  }
174 
175  if ( version >= 3)
176  {
177  ar & BOOST_SERIALIZATION_NVP(mySecondaryAttachedToDisplayNames);
178  }
179 
180  if ( version >= 4)
181  {
182  ar & BOOST_SERIALIZATION_NVP(myPartAttachment);
183  }
184 
185  if ( version >= 5 )
186  {
187  ar & BOOST_SERIALIZATION_NVP( myViewMagnification );
188  }
189 
190  if ( version >= 7 )
191  {
192  ar & BOOST_SERIALIZATION_NVP( myLocationTrackAttachmentX );
193  ar & BOOST_SERIALIZATION_NVP( myLocationTrackAttachmentY );
194  ar & BOOST_SERIALIZATION_NVP( myLocationTrackAttachmentZ );
195  }
196  }
197 
198  protected:
199 
201  std::set<std::string> myAttachedToDisplayNames;
209  double myPosX;
210  double myPosY;
211  double myPosZ;
216  std::string myDisplayName;
218  std::set<std::string> mySecondaryAttachedToDisplayNames;
224 
225 
226 
231  };
232 }
233 
235 
236 

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)