VR-Forces 4.3 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) 2008 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtObserverStateRecord.h,v $ $Revision: 1.6 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #ifndef DtObserverStateRecord_H_
14 #define DtObserverStateRecord_H_
15 
18 #include <set>
19 
20 namespace makArchives
21 {
25  {
26 
27  public:
28 
31 
34 
36  DtObserverStateRecord& operator=(const DtObserverStateRecord& orig);
37 
40 
42 
43 
44  void setObserverSettingsRecord(const DtObserverSettingsRecord& rec);
45  const DtObserverSettingsRecord& observerSettingsRecord() const;
46 
47  void setAttachedToDisplayNames( const std::set<std::string>& displayNames );
48  const std::set<std::string>& attachedToDisplayNames() const;
49 
50  void setSecondaryAttachedToDisplayNames( const std::set<std::string>& displayNames );
51  const std::set<std::string>& secondaryAttachedToDisplayNames() const;
52 
53  void getObserverOffsetVector( double& x, double& y, double& z ) const;
54  void setObserverOffsetVector( double x, double y, double z );
55 
56  void getObserverRotationOffset( double& x, double& y, double& z, double& w ) const;
57  void setObserverRotationOffset( double x, double y, double z, double w );
58 
59  void getPosition( double &x, double &y, double& z ) const;
60  void setPosition( double x, double y, double z );
61 
62  void getOrientation( double& x, double& y, double& z, double& w ) const;
63  void setOrientation( double x, double y, double z, double w );
64 
65  void setDisplayName(const std::string&);
66  const std::string& displayName() const;
67 
68  void setViewResolution(double resolution);
69  double viewResolution() const;
70 
72  void setViewMagnification( double magnification );
73 
75  double viewMagnification() const;
76 
77  void setSetIntoObserver(bool);
78  bool setIntoObserver() const;
79 
80  void setPartAttachment(int partId);
81  int partAttachment() const;
82 
84 
85  protected:
86 
87  friend class boost::serialization::access;
88 
92  template<class Archive>
93  void serialize(Archive & ar, const unsigned int version)
94  {
95  ar & BOOST_SERIALIZATION_NVP(myObserverSettingsRecord);
96  ar & BOOST_SERIALIZATION_NVP(myAttachedToDisplayNames);
97  ar & BOOST_SERIALIZATION_NVP(myObserverOffsetVectorX);
98  ar & BOOST_SERIALIZATION_NVP(myObserverOffsetVectorY);
99  ar & BOOST_SERIALIZATION_NVP(myObserverOffsetVectorZ);
100  ar & BOOST_SERIALIZATION_NVP(myObserverRotationOffsetX);
101  ar & BOOST_SERIALIZATION_NVP(myObserverRotationOffsetY);
102  ar & BOOST_SERIALIZATION_NVP(myObserverRotationOffsetZ);
103  ar & BOOST_SERIALIZATION_NVP(myObserverRotationOffsetW);
104  ar & BOOST_SERIALIZATION_NVP(myPosX);
105  ar & BOOST_SERIALIZATION_NVP(myPosY);
106  ar & BOOST_SERIALIZATION_NVP(myPosZ);
107  ar & BOOST_SERIALIZATION_NVP(myOrientationX);
108  ar & BOOST_SERIALIZATION_NVP(myOrientationY);
109  ar & BOOST_SERIALIZATION_NVP(myOrientationZ);
110  ar & BOOST_SERIALIZATION_NVP(myOrientationW);
111 
112  if (version >= 1)
113  {
114  ar & BOOST_SERIALIZATION_NVP(myDisplayName);
115  }
116 
117  if ( version >= 2)
118  {
119  if(version < 6)
120  {
121  ar & boost::serialization::make_nvp("myZoomFactor",myViewResolution);
122  }
123  else
124  {
125  ar & BOOST_SERIALIZATION_NVP(myViewResolution);
126  }
127  }
128 
129  if ( version >= 3)
130  {
131  ar & BOOST_SERIALIZATION_NVP(mySecondaryAttachedToDisplayNames);
132  }
133 
134  if ( version >= 4)
135  {
136  ar & BOOST_SERIALIZATION_NVP(myPartAttachment);
137  }
138 
139  if ( version >= 5 )
140  {
141  ar & BOOST_SERIALIZATION_NVP( myViewMagnification );
142  }
143  }
144 
145  protected:
146 
148  std::set<std::string> myAttachedToDisplayNames;
156  double myPosX;
157  double myPosY;
158  double myPosZ;
163  std::string myDisplayName;
165  std::set<std::string> mySecondaryAttachedToDisplayNames;
168 
169 
170 
175  };
176 }
177 
179 
180 #endif
181 

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)