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

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)