VR-Link API Documentation for DIS
vlQuaternion.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 *********************************************************************/
5 
6 
7 #ifndef vlQuaternion_H_
8 #define vlQuaternion_H_
9 
10 #include <vlutil/vlMachineTypes.h>
11 #include <vlutil/vlString.h>
12 #include "vlDcm.h"
13 #include <iosfwd>
14 
19 
20 #ifdef DtUSE_UTILITIES_NAMESPACE
21 namespace DtUSE_UTILITIES_NAMESPACE
22 {
23 #endif
24 
25 class DtTaitBryan;
26 
31 {
32 public:
33 
35  DtQuaternion();
36 
38  DtQuaternion(double w, double x, double y, double z);
39 
41  DtQuaternion(const DtQuaternion &other);
42 
44  DtQuaternion(const DtTaitBryan &tb);
45 
47  DtQuaternion &operator=(const DtQuaternion&other);
48 
49 
51  DtString string() const;
52 
53  void printDataToStream(std::ostream &str) const;
54 
55  double w() const;
56  void setW(double w);
57 
58  double x() const;
59  void setX(double x);
60 
61  double y() const;
62  void setY(double y);
63 
64  double z() const;
65  void setZ(double z);
66 
67 public:
68 
71  double DtQ0;
72  double DtQ1;
73  double DtQ2;
74  double DtQ3;
75 };
76 
77 DT_DLL_MATRIX std::ostream & operator << (std::ostream &str, const DtQuaternion &sr);
78 
80  DtQuaternion *qresult, const DtQuaternion *DtQ1, const DtQuaternion *DtQ2);
81 
84 
85 inline double DtQuaternion::w() const
86 {
87  return DtQ0;
88 }
89 
90 inline void DtQuaternion::setW(double w)
91 {
92  DtQ0 = w;
93 }
94 
95 inline double DtQuaternion::x() const
96 {
97  return DtQ1;
98 }
99 
100 inline void DtQuaternion::setX(double x)
101 {
102  DtQ1 = x;
103 }
104 
105 inline double DtQuaternion::y() const
106 {
107  return DtQ2;
108 }
109 
110 inline void DtQuaternion::setY(double y)
111 {
112  DtQ2 = y;
113 }
114 
115 inline double DtQuaternion::z() const
116 {
117  return DtQ3;
118 }
119 
120 inline void DtQuaternion::setZ(double z)
121 {
122  DtQ3 = z;
123 }
124 
125 #ifdef DtUSE_UTILITIES_NAMESPACE
126 }
127 #endif
128 #endif
129 
130 
131 
132 
133 
134 
135 

Document ID: Generated on Wed Aug 14 15:35:11 EDT 2013 from SVN revision 130445
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)