VR-Forces Developer's Guide
 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 
151  void setPaperMapLayer(const std::string& paperMapLayer);
153  std::string paperMapLayer() const;
155 
156  protected:
157 
158  friend class boost::serialization::access;
159 
163  template<class Archive>
164  void serialize(Archive & ar, const unsigned int version)
165  {
166  ar & BOOST_SERIALIZATION_NVP(myObserverSettingsRecord);
167  ar & BOOST_SERIALIZATION_NVP(myAttachedToDisplayNames);
168  ar & BOOST_SERIALIZATION_NVP(myObserverOffsetVectorX);
169  ar & BOOST_SERIALIZATION_NVP(myObserverOffsetVectorY);
170  ar & BOOST_SERIALIZATION_NVP(myObserverOffsetVectorZ);
171  ar & BOOST_SERIALIZATION_NVP(myObserverRotationOffsetX);
172  ar & BOOST_SERIALIZATION_NVP(myObserverRotationOffsetY);
173  ar & BOOST_SERIALIZATION_NVP(myObserverRotationOffsetZ);
174  ar & BOOST_SERIALIZATION_NVP(myObserverRotationOffsetW);
175  ar & BOOST_SERIALIZATION_NVP(myPosX);
176  ar & BOOST_SERIALIZATION_NVP(myPosY);
177  ar & BOOST_SERIALIZATION_NVP(myPosZ);
178  ar & BOOST_SERIALIZATION_NVP(myOrientationX);
179  ar & BOOST_SERIALIZATION_NVP(myOrientationY);
180  ar & BOOST_SERIALIZATION_NVP(myOrientationZ);
181  ar & BOOST_SERIALIZATION_NVP(myOrientationW);
182 
183  if (version >= 1)
184  {
185  ar & BOOST_SERIALIZATION_NVP(myDisplayName);
186  }
187 
188  if ( version >= 2)
189  {
190  if(version < 6)
191  {
192  ar & boost::serialization::make_nvp("myZoomFactor",myViewResolution);
193  }
194  else
195  {
196  ar & BOOST_SERIALIZATION_NVP(myViewResolution);
197  }
198  }
199 
200  if ( version >= 3)
201  {
202  ar & BOOST_SERIALIZATION_NVP(mySecondaryAttachedToDisplayNames);
203  }
204 
205  if ( version >= 4)
206  {
207  ar & BOOST_SERIALIZATION_NVP(myPartAttachment);
208  }
209 
210  if ( version >= 5 )
211  {
212  ar & BOOST_SERIALIZATION_NVP( myViewMagnification );
213  }
214 
215  if ( version >= 7 )
216  {
217  ar & BOOST_SERIALIZATION_NVP( myLocationTrackAttachmentX );
218  ar & BOOST_SERIALIZATION_NVP( myLocationTrackAttachmentY );
219  ar & BOOST_SERIALIZATION_NVP( myLocationTrackAttachmentZ );
220  }
221  if (version >= 8)
222  {
223  ar & BOOST_SERIALIZATION_NVP(myIsDefaultObserverView);
224  }
225  if (version >= 9)
226  {
227  ar & BOOST_SERIALIZATION_NVP(myLodScale);
228  }
229  if (version >= 10)
230  {
231  ar& BOOST_SERIALIZATION_NVP(myPaperMapLayer);
232  }
233  }
234 
235  protected:
236 
238  std::set<std::string> myAttachedToDisplayNames;
246  double myPosX;
247  double myPosY;
248  double myPosZ;
253  std::string myDisplayName;
255  std::set<std::string> mySecondaryAttachedToDisplayNames;
262  float myLodScale;
263  std::string myPaperMapLayer;
264 
269 
272  };
273 }
274 
276 
277 
double myPosX
Definition: DtObserverStateRecord.h:246
double myOrientationY
Definition: DtObserverStateRecord.h:250
BOOST_CLASS_VERSION(makArchives::DtDiGuySettingsRecord, 3)
DtObserverSettingsRecord myObserverSettingsRecord
Definition: DtObserverStateRecord.h:237
double myObserverRotationOffsetZ
Definition: DtObserverStateRecord.h:244
double myObserverOffsetVectorX
Definition: DtObserverStateRecord.h:239
bool myAssociatedToTerrain
Intentionally not archived into file. Only is taken in count for gui purposes.
Definition: DtObserverStateRecord.h:271
std::string myPaperMapLayer
Definition: DtObserverStateRecord.h:263
double myOrientationW
Definition: DtObserverStateRecord.h:252
std::set< std::string > mySecondaryAttachedToDisplayNames
Definition: DtObserverStateRecord.h:255
double myOrientationX
Definition: DtObserverStateRecord.h:249
A DtObserverSettingsRecord contains the state of an observer.
Definition: DtObserverStateRecord.h:20
Contains DLL export macros.
double myPosY
Definition: DtObserverStateRecord.h:247
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:164
double myLocationTrackAttachmentX
Definition: DtObserverStateRecord.h:258
double myViewResolution
Definition: DtObserverStateRecord.h:254
double myObserverRotationOffsetY
Definition: DtObserverStateRecord.h:243
double myObserverRotationOffsetX
Definition: DtObserverStateRecord.h:242
int myPartAttachment
Definition: DtObserverStateRecord.h:256
double myObserverOffsetVectorY
Definition: DtObserverStateRecord.h:240
double myPosZ
Definition: DtObserverStateRecord.h:248
double myViewMagnification
Definition: DtObserverStateRecord.h:257
double myLocationTrackAttachmentZ
Definition: DtObserverStateRecord.h:260
bool myIsDefaultObserverView
Definition: DtObserverStateRecord.h:261
double myOrientationZ
Definition: DtObserverStateRecord.h:251
bool mySetIntoObserver
Intentionally not archived into file. This is used by the command line argument to determine whether ...
Definition: DtObserverStateRecord.h:268
float myLodScale
Definition: DtObserverStateRecord.h:262
std::set< std::string > myAttachedToDisplayNames
Definition: DtObserverStateRecord.h:238
Contains makArchives::DtObserverSettingsRecord class.
A DtObserverSettingsRecord contains the settings of an observer.
Definition: DtObserverSettingsRecord.h:20
double myObserverOffsetVectorZ
Definition: DtObserverStateRecord.h:241
#define DT_DLL_MAKARCHIVES
Definition: makArchives.h:31
std::string myDisplayName
Definition: DtObserverStateRecord.h:253
double myObserverRotationOffsetW
Definition: DtObserverStateRecord.h:245
double myLocationTrackAttachmentY
Definition: DtObserverStateRecord.h:259

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)