VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtObserverStateRecord.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2020 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  DtObserverSettingsRecord& observerSettingsRecord();
43 
45  void setAttachedToDisplayNames( const std::set<std::string>& displayNames );
46 
49  const std::set<std::string>& attachedToDisplayNames() const;
50 
52  void setSecondaryAttachedToDisplayNames( const std::set<std::string>& displayNames );
53 
56  const std::set<std::string>& secondaryAttachedToDisplayNames() const;
57 
60  void getLocationTrackAttachment( double& x, double& y, double& z ) const;
61 
64  void setLocationTrackAttachment( double x, double y, double z );
65 
68  void getObserverOffsetVector( double& x, double& y, double& z ) const;
69 
71  void setObserverOffsetVector( double x, double y, double z );
72 
75  void getObserverRotationOffset( double& x, double& y, double& z, double& w ) const;
76 
78  void setObserverRotationOffset( double x, double y, double z, double w );
79 
81  void getPosition( double &x, double &y, double& z ) const;
82 
84  void setPosition( double x, double y, double z );
85 
87  void getOrientation( double& x, double& y, double& z, double& w ) const;
88 
90  void setOrientation( double x, double y, double z, double w );
91 
93  void setDisplayName(const std::string&);
94 
97  const std::string& displayName() const;
98 
100  void setViewResolution(double resolution);
101 
104  double viewResolution() const;
105 
108  void setViewMagnification( double magnification );
109 
112  double viewMagnification() const;
113 
118  void setSetIntoObserver(bool);
119 
122  bool setIntoObserver() const;
123 
126  void setPartAttachment(int partId);
127 
130  int partAttachment() const;
131 
133  void setIsDefaultObserverView(bool useICO);
134 
136  bool isDefaultObserverView() const;
137 
139  bool associatedToTerrain() const;
140 
142  void setAssociatedToTerrain(bool val);
143 
145  void setLodScale(float scale);
147  float lodScale() const;
149 
150 
151  protected:
152 
153  friend class boost::serialization::access;
154 
158  template<class Archive>
159  void serialize(Archive & ar, const unsigned int version)
160  {
161  ar & BOOST_SERIALIZATION_NVP(myObserverSettingsRecord);
162  ar & BOOST_SERIALIZATION_NVP(myAttachedToDisplayNames);
163  ar & BOOST_SERIALIZATION_NVP(myObserverOffsetVectorX);
164  ar & BOOST_SERIALIZATION_NVP(myObserverOffsetVectorY);
165  ar & BOOST_SERIALIZATION_NVP(myObserverOffsetVectorZ);
166  ar & BOOST_SERIALIZATION_NVP(myObserverRotationOffsetX);
167  ar & BOOST_SERIALIZATION_NVP(myObserverRotationOffsetY);
168  ar & BOOST_SERIALIZATION_NVP(myObserverRotationOffsetZ);
169  ar & BOOST_SERIALIZATION_NVP(myObserverRotationOffsetW);
170  ar & BOOST_SERIALIZATION_NVP(myPosX);
171  ar & BOOST_SERIALIZATION_NVP(myPosY);
172  ar & BOOST_SERIALIZATION_NVP(myPosZ);
173  ar & BOOST_SERIALIZATION_NVP(myOrientationX);
174  ar & BOOST_SERIALIZATION_NVP(myOrientationY);
175  ar & BOOST_SERIALIZATION_NVP(myOrientationZ);
176  ar & BOOST_SERIALIZATION_NVP(myOrientationW);
177 
178  if (version >= 1)
179  {
180  ar & BOOST_SERIALIZATION_NVP(myDisplayName);
181  }
182 
183  if ( version >= 2)
184  {
185  if(version < 6)
186  {
187  ar & boost::serialization::make_nvp("myZoomFactor",myViewResolution);
188  }
189  else
190  {
191  ar & BOOST_SERIALIZATION_NVP(myViewResolution);
192  }
193  }
194 
195  if ( version >= 3)
196  {
197  ar & BOOST_SERIALIZATION_NVP(mySecondaryAttachedToDisplayNames);
198  }
199 
200  if ( version >= 4)
201  {
202  ar & BOOST_SERIALIZATION_NVP(myPartAttachment);
203  }
204 
205  if ( version >= 5 )
206  {
207  ar & BOOST_SERIALIZATION_NVP( myViewMagnification );
208  }
209 
210  if ( version >= 7 )
211  {
212  ar & BOOST_SERIALIZATION_NVP( myLocationTrackAttachmentX );
213  ar & BOOST_SERIALIZATION_NVP( myLocationTrackAttachmentY );
214  ar & BOOST_SERIALIZATION_NVP( myLocationTrackAttachmentZ );
215  }
216  if (version >= 8)
217  {
218  ar & BOOST_SERIALIZATION_NVP(myIsDefaultObserverView);
219  }
220  if (version >= 9)
221  {
222  ar & BOOST_SERIALIZATION_NVP(myLodScale);
223  }
224  }
225 
226  protected:
227 
229  std::set<std::string> myAttachedToDisplayNames;
237  double myPosX;
238  double myPosY;
239  double myPosZ;
244  std::string myDisplayName;
246  std::set<std::string> mySecondaryAttachedToDisplayNames;
253  float myLodScale;
254 
259 
262  };
263 }
264 
266 
267 
double myPosX
Definition: DtObserverStateRecord.h:237
double myOrientationY
Definition: DtObserverStateRecord.h:241
DtObserverSettingsRecord myObserverSettingsRecord
Definition: DtObserverStateRecord.h:228
double myObserverRotationOffsetZ
Definition: DtObserverStateRecord.h:235
double myObserverOffsetVectorX
Definition: DtObserverStateRecord.h:230
bool myAssociatedToTerrain
Intentionally not archived into file. Only is taken in count for gui purposes.
Definition: DtObserverStateRecord.h:261
double myOrientationW
Definition: DtObserverStateRecord.h:243
std::set< std::string > mySecondaryAttachedToDisplayNames
Definition: DtObserverStateRecord.h:246
double myOrientationX
Definition: DtObserverStateRecord.h:240
A DtObserverSettingsRecord contains the state of an observer.
Definition: DtObserverStateRecord.h:20
Contains DLL export macros.
double myPosY
Definition: DtObserverStateRecord.h:238
BOOST_CLASS_VERSION(makArchives::DtDiGuySettingsRecord, 2)
void serialize(Archive &ar, const unsigned int version)
When the class Archive corresponds to an output archive, the &amp; operator is defined similar to &lt;&lt;...
Definition: DtObserverStateRecord.h:159
double myLocationTrackAttachmentX
Definition: DtObserverStateRecord.h:249
double myViewResolution
Definition: DtObserverStateRecord.h:245
double myObserverRotationOffsetY
Definition: DtObserverStateRecord.h:234
double myObserverRotationOffsetX
Definition: DtObserverStateRecord.h:233
int myPartAttachment
Definition: DtObserverStateRecord.h:247
double myObserverOffsetVectorY
Definition: DtObserverStateRecord.h:231
double myPosZ
Definition: DtObserverStateRecord.h:239
double myViewMagnification
Definition: DtObserverStateRecord.h:248
double myLocationTrackAttachmentZ
Definition: DtObserverStateRecord.h:251
bool myIsDefaultObserverView
Definition: DtObserverStateRecord.h:252
double myOrientationZ
Definition: DtObserverStateRecord.h:242
bool mySetIntoObserver
Intentionally not archived into file.
Definition: DtObserverStateRecord.h:258
float myLodScale
Definition: DtObserverStateRecord.h:253
std::set< std::string > myAttachedToDisplayNames
Definition: DtObserverStateRecord.h:229
Contains makArchives::DtObserverSettingsRecord class.
A DtObserverSettingsRecord contains the settings of an observer.
Definition: DtObserverSettingsRecord.h:20
double myObserverOffsetVectorZ
Definition: DtObserverStateRecord.h:232
#define DT_DLL_MAKARCHIVES
Definition: makArchives.h:31
std::string myDisplayName
Definition: DtObserverStateRecord.h:244
double myObserverRotationOffsetW
Definition: DtObserverStateRecord.h:236
double myLocationTrackAttachmentY
Definition: DtObserverStateRecord.h:250

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)