/src/qtbase/src/gui/math3d/qquaternion.h
Line | Count | Source |
1 | | // Copyright (C) 2016 The Qt Company Ltd. |
2 | | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | | |
4 | | #ifndef QQUATERNION_H |
5 | | #define QQUATERNION_H |
6 | | |
7 | | #include <QtGui/qtguiglobal.h> |
8 | | #include <QtGui/qgenericmatrix.h> |
9 | | #include <QtGui/qvector3d.h> |
10 | | #include <QtGui/qvector4d.h> |
11 | | |
12 | | QT_BEGIN_NAMESPACE |
13 | | |
14 | | |
15 | | #ifndef QT_NO_QUATERNION |
16 | | |
17 | | class QMatrix4x4; |
18 | | class QVariant; |
19 | | |
20 | | class QT6_ONLY(Q_GUI_EXPORT) QQuaternion |
21 | | { |
22 | | public: |
23 | | constexpr QQuaternion() noexcept; |
24 | 0 | explicit QQuaternion(Qt::Initialization) noexcept {} |
25 | | constexpr QQuaternion(float scalar, float xpos, float ypos, float zpos) noexcept; |
26 | | #ifndef QT_NO_VECTOR3D |
27 | | constexpr QQuaternion(float scalar, const QVector3D &vector) noexcept; |
28 | | #endif |
29 | | #ifndef QT_NO_VECTOR4D |
30 | | constexpr explicit QQuaternion(const QVector4D &vector) noexcept; |
31 | | #endif |
32 | | |
33 | | constexpr bool isNull() const noexcept; |
34 | | constexpr bool isIdentity() const noexcept; |
35 | | |
36 | | #ifndef QT_NO_VECTOR3D |
37 | | constexpr QVector3D vector() const noexcept; |
38 | | constexpr void setVector(const QVector3D &vector) noexcept; |
39 | | #endif |
40 | | constexpr void setVector(float x, float y, float z) noexcept; |
41 | | |
42 | | constexpr float x() const noexcept; |
43 | | constexpr float y() const noexcept; |
44 | | constexpr float z() const noexcept; |
45 | | constexpr float scalar() const noexcept; |
46 | | |
47 | | constexpr void setX(float x) noexcept; |
48 | | constexpr void setY(float y) noexcept; |
49 | | constexpr void setZ(float z) noexcept; |
50 | | constexpr void setScalar(float scalar) noexcept; |
51 | | |
52 | | constexpr static float dotProduct(const QQuaternion &q1, const QQuaternion &q2) noexcept; |
53 | | |
54 | | // ### Qt 7: make the next four constexpr |
55 | | // (perhaps using std::hypot, constexpr in C++26, or constexpr qHypot) |
56 | | QT7_ONLY(Q_GUI_EXPORT) float length() const; |
57 | | QT7_ONLY(Q_GUI_EXPORT) float lengthSquared() const; |
58 | | |
59 | | [[nodiscard]] QT7_ONLY(Q_GUI_EXPORT) QQuaternion normalized() const; |
60 | | QT7_ONLY(Q_GUI_EXPORT) void normalize(); |
61 | | |
62 | | constexpr QQuaternion inverted() const noexcept; |
63 | | |
64 | | [[nodiscard]] constexpr QQuaternion conjugated() const noexcept; |
65 | | |
66 | | QT7_ONLY(Q_GUI_EXPORT) QVector3D rotatedVector(const QVector3D &vector) const; |
67 | | |
68 | | constexpr QQuaternion &operator+=(const QQuaternion &quaternion) noexcept; |
69 | | constexpr QQuaternion &operator-=(const QQuaternion &quaternion) noexcept; |
70 | | constexpr QQuaternion &operator*=(float factor) noexcept; |
71 | | constexpr QQuaternion &operator*=(const QQuaternion &quaternion) noexcept; |
72 | | constexpr QQuaternion &operator/=(float divisor); |
73 | | |
74 | | QT_WARNING_PUSH |
75 | | QT_WARNING_DISABLE_FLOAT_COMPARE |
76 | | friend constexpr bool operator==(const QQuaternion &q1, const QQuaternion &q2) noexcept |
77 | 0 | { |
78 | 0 | return q1.wp == q2.wp && q1.xp == q2.xp && q1.yp == q2.yp && q1.zp == q2.zp; |
79 | 0 | } |
80 | | friend constexpr bool operator!=(const QQuaternion &q1, const QQuaternion &q2) noexcept |
81 | 0 | { |
82 | 0 | return !(q1 == q2); |
83 | 0 | } |
84 | | QT_WARNING_POP |
85 | | |
86 | | friend constexpr QQuaternion operator+(const QQuaternion &q1, const QQuaternion &q2) noexcept; |
87 | | friend constexpr QQuaternion operator-(const QQuaternion &q1, const QQuaternion &q2) noexcept; |
88 | | friend constexpr QQuaternion operator*(float factor, const QQuaternion &quaternion) noexcept; |
89 | | friend constexpr QQuaternion operator*(const QQuaternion &quaternion, float factor) noexcept; |
90 | | friend constexpr QQuaternion operator*(const QQuaternion &q1, const QQuaternion &q2) noexcept; |
91 | | friend constexpr QQuaternion operator-(const QQuaternion &quaternion) noexcept; |
92 | | friend constexpr QQuaternion operator/(const QQuaternion &quaternion, float divisor); |
93 | | |
94 | | friend constexpr bool qFuzzyCompare(const QQuaternion &q1, const QQuaternion &q2) noexcept; |
95 | | |
96 | | #ifndef QT_NO_VECTOR4D |
97 | | constexpr QVector4D toVector4D() const noexcept; |
98 | | #endif |
99 | | |
100 | | QT7_ONLY(Q_GUI_EXPORT) operator QVariant() const; |
101 | | |
102 | | struct Axis { |
103 | | float x, y, z; |
104 | | // prevent users from defining them themselves, until we do: |
105 | | friend constexpr bool comparesEqual(Axis lhs, Axis rhs) noexcept |
106 | | Q_DECL_EQ_DELETE_X("Deliberately not implemented. Don't implement it yourself!"); |
107 | | friend bool operator==(Axis, Axis) |
108 | | Q_DECL_EQ_DELETE_X("Deliberately not implemented. Don't implement it yourself!"); |
109 | | friend bool operator!=(Axis, Axis) |
110 | | Q_DECL_EQ_DELETE_X("Deliberately not implemented. Don't implement it yourself!"); |
111 | | friend size_t qHash(const Axis &, size_t) noexcept |
112 | | Q_DECL_EQ_DELETE_X("Deliberately not implemented. Don't implement it yourself!"); |
113 | | friend size_t qHash(const Axis &) noexcept |
114 | | Q_DECL_EQ_DELETE_X("Deliberately not implemented. Don't implement it yourself!"); |
115 | | friend bool qFuzzyIsNull(Axis axis) noexcept |
116 | 0 | { return qFuzzyIsNull(axis.x) && qFuzzyIsNull(axis.y) && qFuzzyIsNull(axis.z); } |
117 | | friend bool qFuzzyCompare(Axis lhs, Axis rhs) noexcept |
118 | | Q_DECL_EQ_DELETE_X("Deliberately not implemented. Don't implement it yourself!"); |
119 | | #ifndef QT_NO_VECTOR3D |
120 | | static constexpr Axis fromVector3D(QVector3D v) noexcept |
121 | 0 | { return {v.x(), v.y(), v.z()}; } |
122 | 0 | constexpr QVector3D toVector3D() const noexcept { return {x, y, z}; } |
123 | | friend constexpr bool comparesEqual(Axis lhs, QVector3D rhs) noexcept |
124 | | Q_DECL_EQ_DELETE_X("Deliberately not implemented. Don't implement it yourself!"); |
125 | | #endif |
126 | | }; |
127 | | |
128 | | #ifndef QT_NO_VECTOR3D |
129 | | inline void getAxisAndAngle(QVector3D *axis, float *angle) const; |
130 | | QT7_ONLY(Q_GUI_EXPORT) static QQuaternion fromAxisAndAngle(const QVector3D &axis, float angle); |
131 | | #endif |
132 | | QT7_ONLY(Q_GUI_EXPORT) void getAxisAndAngle(float *x, float *y, float *z, float *angle) const; |
133 | | QT7_ONLY(Q_GUI_EXPORT) static QQuaternion fromAxisAndAngle(float x, float y, float z, |
134 | | float angle); |
135 | | |
136 | | #ifndef QT_NO_VECTOR3D |
137 | | inline QVector3D toEulerAngles() const; |
138 | | # if !QT_CORE_REMOVED_SINCE(6, 11) |
139 | | Q_WEAK_OVERLOAD |
140 | | # endif |
141 | | static QQuaternion fromEulerAngles(const QVector3D &angles) |
142 | | { return fromEulerAngles(angles.x(), angles.y(), angles.z()); } |
143 | | |
144 | | #endif |
145 | | template <typename T> |
146 | | struct EulerAngles |
147 | | { |
148 | | T pitch, yaw, roll; |
149 | | }; |
150 | | QT7_ONLY(Q_GUI_EXPORT) EulerAngles<float> eulerAngles() const; |
151 | | static QQuaternion fromEulerAngles(EulerAngles<float> angles) |
152 | 0 | { return fromEulerAngles(angles.pitch, angles.yaw, angles.roll); } |
153 | | |
154 | | QT_GUI_INLINE_SINCE(6, 11) |
155 | | void getEulerAngles(float *pitch, float *yaw, float *roll) const; |
156 | | static QQuaternion fromEulerAngles(float pitch, float yaw, float roll); |
157 | | |
158 | | QT7_ONLY(Q_GUI_EXPORT) QMatrix3x3 toRotationMatrix() const; |
159 | | QT7_ONLY(Q_GUI_EXPORT) static QQuaternion fromRotationMatrix(const QMatrix3x3 &rot3x3); |
160 | | |
161 | | struct Axes |
162 | | { |
163 | | Axis x, y, z; |
164 | | }; |
165 | | QT7_ONLY(Q_GUI_EXPORT) Axes toAxes() const; |
166 | | QT7_ONLY(Q_GUI_EXPORT) static QQuaternion fromAxes(Axes axes); // clazy:exclude=function-args-by-ref |
167 | | #ifndef QT_NO_VECTOR3D |
168 | | QT_GUI_INLINE_SINCE(6, 11) |
169 | | void getAxes(QVector3D *xAxis, QVector3D *yAxis, QVector3D *zAxis) const; |
170 | | QT_GUI_INLINE_SINCE(6, 11) |
171 | | static QQuaternion fromAxes(const QVector3D &xAxis, |
172 | | const QVector3D &yAxis, |
173 | | const QVector3D &zAxis); |
174 | | |
175 | | QT7_ONLY(Q_GUI_EXPORT) static QQuaternion fromDirection(const QVector3D &direction, |
176 | | const QVector3D &up); |
177 | | |
178 | | QT7_ONLY(Q_GUI_EXPORT) static QQuaternion rotationTo(const QVector3D &from, |
179 | | const QVector3D &to); |
180 | | #endif // QT_NO_VECTOR3D |
181 | | |
182 | | QT7_ONLY(Q_GUI_EXPORT) static QQuaternion slerp(const QQuaternion &q1, const QQuaternion &q2, |
183 | | float t); |
184 | | QT7_ONLY(Q_GUI_EXPORT) static QQuaternion nlerp(const QQuaternion &q1, const QQuaternion &q2, |
185 | | float t); |
186 | | |
187 | | private: |
188 | | float wp, xp, yp, zp; |
189 | | }; |
190 | | |
191 | | Q_DECLARE_TYPEINFO(QQuaternion, Q_PRIMITIVE_TYPE); |
192 | | |
193 | 0 | constexpr QQuaternion::QQuaternion() noexcept : wp(1.0f), xp(0.0f), yp(0.0f), zp(0.0f) {} |
194 | | |
195 | | constexpr QQuaternion::QQuaternion(float aScalar, float xpos, float ypos, float zpos) noexcept |
196 | 0 | : wp(aScalar), xp(xpos), yp(ypos), zp(zpos) {} |
197 | | |
198 | | QT_WARNING_PUSH |
199 | | QT_WARNING_DISABLE_FLOAT_COMPARE |
200 | | |
201 | | constexpr bool QQuaternion::isNull() const noexcept |
202 | 0 | { |
203 | 0 | return wp == 0.0f && xp == 0.0f && yp == 0.0f && zp == 0.0f; |
204 | 0 | } |
205 | | |
206 | | constexpr bool QQuaternion::isIdentity() const noexcept |
207 | 0 | { |
208 | 0 | return wp == 1.0f && xp == 0.0f && yp == 0.0f && zp == 0.0f; |
209 | 0 | } |
210 | | QT_WARNING_POP |
211 | | |
212 | 0 | constexpr float QQuaternion::x() const noexcept { return xp; } |
213 | 0 | constexpr float QQuaternion::y() const noexcept { return yp; } |
214 | 0 | constexpr float QQuaternion::z() const noexcept { return zp; } |
215 | 0 | constexpr float QQuaternion::scalar() const noexcept { return wp; } |
216 | | |
217 | 0 | constexpr void QQuaternion::setX(float aX) noexcept { xp = aX; } |
218 | 0 | constexpr void QQuaternion::setY(float aY) noexcept { yp = aY; } |
219 | 0 | constexpr void QQuaternion::setZ(float aZ) noexcept { zp = aZ; } |
220 | 0 | constexpr void QQuaternion::setScalar(float aScalar) noexcept { wp = aScalar; } |
221 | | |
222 | | constexpr float QQuaternion::dotProduct(const QQuaternion &q1, const QQuaternion &q2) noexcept |
223 | 0 | { |
224 | 0 | return q1.wp * q2.wp + q1.xp * q2.xp + q1.yp * q2.yp + q1.zp * q2.zp; |
225 | 0 | } |
226 | | |
227 | | constexpr QQuaternion QQuaternion::inverted() const noexcept |
228 | 0 | { |
229 | 0 | // Need some extra precision if the length is very small. |
230 | 0 | double len = double(wp) * double(wp) + |
231 | 0 | double(xp) * double(xp) + |
232 | 0 | double(yp) * double(yp) + |
233 | 0 | double(zp) * double(zp); |
234 | 0 | if (!qFuzzyIsNull(len)) |
235 | 0 | return QQuaternion(float(double(wp) / len), float(double(-xp) / len), |
236 | 0 | float(double(-yp) / len), float(double(-zp) / len)); |
237 | 0 | return QQuaternion(0.0f, 0.0f, 0.0f, 0.0f); |
238 | 0 | } |
239 | | |
240 | | constexpr QQuaternion QQuaternion::conjugated() const noexcept |
241 | 0 | { |
242 | 0 | return QQuaternion(wp, -xp, -yp, -zp); |
243 | 0 | } |
244 | | |
245 | | constexpr QQuaternion &QQuaternion::operator+=(const QQuaternion &quaternion) noexcept |
246 | 0 | { |
247 | 0 | wp += quaternion.wp; |
248 | 0 | xp += quaternion.xp; |
249 | 0 | yp += quaternion.yp; |
250 | 0 | zp += quaternion.zp; |
251 | 0 | return *this; |
252 | 0 | } |
253 | | |
254 | | constexpr QQuaternion &QQuaternion::operator-=(const QQuaternion &quaternion) noexcept |
255 | 0 | { |
256 | 0 | wp -= quaternion.wp; |
257 | 0 | xp -= quaternion.xp; |
258 | 0 | yp -= quaternion.yp; |
259 | 0 | zp -= quaternion.zp; |
260 | 0 | return *this; |
261 | 0 | } |
262 | | |
263 | | constexpr QQuaternion &QQuaternion::operator*=(float factor) noexcept |
264 | 0 | { |
265 | 0 | wp *= factor; |
266 | 0 | xp *= factor; |
267 | 0 | yp *= factor; |
268 | 0 | zp *= factor; |
269 | 0 | return *this; |
270 | 0 | } |
271 | | |
272 | | constexpr QQuaternion operator*(const QQuaternion &q1, const QQuaternion &q2) noexcept |
273 | 0 | { |
274 | 0 | float yy = (q1.wp - q1.yp) * (q2.wp + q2.zp); |
275 | 0 | float zz = (q1.wp + q1.yp) * (q2.wp - q2.zp); |
276 | 0 | float ww = (q1.zp + q1.xp) * (q2.xp + q2.yp); |
277 | 0 | float xx = ww + yy + zz; |
278 | 0 | float qq = 0.5f * (xx + (q1.zp - q1.xp) * (q2.xp - q2.yp)); |
279 | |
|
280 | 0 | float w = qq - ww + (q1.zp - q1.yp) * (q2.yp - q2.zp); |
281 | 0 | float x = qq - xx + (q1.xp + q1.wp) * (q2.xp + q2.wp); |
282 | 0 | float y = qq - yy + (q1.wp - q1.xp) * (q2.yp + q2.zp); |
283 | 0 | float z = qq - zz + (q1.zp + q1.yp) * (q2.wp - q2.xp); |
284 | |
|
285 | 0 | return QQuaternion(w, x, y, z); |
286 | 0 | } |
287 | | |
288 | | constexpr QQuaternion &QQuaternion::operator*=(const QQuaternion &quaternion) noexcept |
289 | 0 | { |
290 | 0 | *this = *this * quaternion; |
291 | 0 | return *this; |
292 | 0 | } |
293 | | |
294 | | constexpr QQuaternion &QQuaternion::operator/=(float divisor) |
295 | 0 | { |
296 | 0 | wp /= divisor; |
297 | 0 | xp /= divisor; |
298 | 0 | yp /= divisor; |
299 | 0 | zp /= divisor; |
300 | 0 | return *this; |
301 | 0 | } |
302 | | |
303 | | constexpr QQuaternion operator+(const QQuaternion &q1, const QQuaternion &q2) noexcept |
304 | 0 | { |
305 | 0 | return QQuaternion(q1.wp + q2.wp, q1.xp + q2.xp, q1.yp + q2.yp, q1.zp + q2.zp); |
306 | 0 | } |
307 | | |
308 | | constexpr QQuaternion operator-(const QQuaternion &q1, const QQuaternion &q2) noexcept |
309 | 0 | { |
310 | 0 | return QQuaternion(q1.wp - q2.wp, q1.xp - q2.xp, q1.yp - q2.yp, q1.zp - q2.zp); |
311 | 0 | } |
312 | | |
313 | | constexpr QQuaternion operator*(float factor, const QQuaternion &quaternion) noexcept |
314 | 0 | { |
315 | 0 | return QQuaternion(quaternion.wp * factor, quaternion.xp * factor, quaternion.yp * factor, quaternion.zp * factor); |
316 | 0 | } |
317 | | |
318 | | constexpr QQuaternion operator*(const QQuaternion &quaternion, float factor) noexcept |
319 | 0 | { |
320 | 0 | return QQuaternion(quaternion.wp * factor, quaternion.xp * factor, quaternion.yp * factor, quaternion.zp * factor); |
321 | 0 | } |
322 | | |
323 | | constexpr QQuaternion operator-(const QQuaternion &quaternion) noexcept |
324 | 0 | { |
325 | 0 | return QQuaternion(-quaternion.wp, -quaternion.xp, -quaternion.yp, -quaternion.zp); |
326 | 0 | } |
327 | | |
328 | | constexpr QQuaternion operator/(const QQuaternion &quaternion, float divisor) |
329 | 0 | { |
330 | 0 | return QQuaternion(quaternion.wp / divisor, quaternion.xp / divisor, quaternion.yp / divisor, quaternion.zp / divisor); |
331 | 0 | } |
332 | | |
333 | | constexpr bool qFuzzyCompare(const QQuaternion &q1, const QQuaternion &q2) noexcept |
334 | 0 | { |
335 | 0 | return QtPrivate::fuzzyCompare(q1.wp, q2.wp) |
336 | 0 | && QtPrivate::fuzzyCompare(q1.xp, q2.xp) |
337 | 0 | && QtPrivate::fuzzyCompare(q1.yp, q2.yp) |
338 | 0 | && QtPrivate::fuzzyCompare(q1.zp, q2.zp); |
339 | 0 | } |
340 | | |
341 | | #if QT_GUI_INLINE_IMPL_SINCE(6, 11) |
342 | | void QQuaternion::getEulerAngles(float *pitch, float *yaw, float *roll) const |
343 | 0 | { |
344 | 0 | Q_PRE(pitch); |
345 | 0 | Q_PRE(yaw); |
346 | 0 | Q_PRE(roll); |
347 | 0 | const auto angles = eulerAngles(); |
348 | 0 | *pitch = angles.pitch; |
349 | 0 | *yaw = angles.yaw; |
350 | 0 | *roll = angles.roll; |
351 | 0 | } |
352 | | #endif // QT_GUI_INLINE_IMPL_SINCE |
353 | | |
354 | | #ifndef QT_NO_VECTOR3D |
355 | | |
356 | | constexpr QQuaternion::QQuaternion(float aScalar, const QVector3D &aVector) noexcept |
357 | 0 | : wp(aScalar), xp(aVector.x()), yp(aVector.y()), zp(aVector.z()) {} |
358 | | |
359 | | constexpr void QQuaternion::setVector(const QVector3D &aVector) noexcept |
360 | 0 | { |
361 | 0 | xp = aVector.x(); |
362 | 0 | yp = aVector.y(); |
363 | 0 | zp = aVector.z(); |
364 | 0 | } |
365 | | |
366 | | constexpr QVector3D QQuaternion::vector() const noexcept |
367 | 0 | { |
368 | 0 | return QVector3D(xp, yp, zp); |
369 | 0 | } |
370 | | |
371 | | inline QVector3D operator*(const QQuaternion &quaternion, const QVector3D &vec) |
372 | 0 | { |
373 | 0 | return quaternion.rotatedVector(vec); |
374 | 0 | } |
375 | | |
376 | | void QQuaternion::getAxisAndAngle(QVector3D *axis, float *angle) const |
377 | 0 | { |
378 | 0 | float aX, aY, aZ; |
379 | 0 | getAxisAndAngle(&aX, &aY, &aZ, angle); |
380 | 0 | *axis = QVector3D(aX, aY, aZ); |
381 | 0 | } |
382 | | |
383 | | QVector3D QQuaternion::toEulerAngles() const |
384 | 0 | { |
385 | 0 | const auto angles = eulerAngles(); |
386 | 0 | return QVector3D{angles.pitch, angles.yaw, angles.roll}; |
387 | 0 | } |
388 | | |
389 | | #if QT_GUI_INLINE_IMPL_SINCE(6, 11) |
390 | | void QQuaternion::getAxes(QVector3D *xAxis, QVector3D *yAxis, QVector3D *zAxis) const |
391 | 0 | { |
392 | 0 | Q_PRE(xAxis); |
393 | 0 | Q_PRE(yAxis); |
394 | 0 | Q_PRE(zAxis); |
395 | 0 | const Axes axes = toAxes(); |
396 | 0 | *xAxis = axes.x.toVector3D(); |
397 | 0 | *yAxis = axes.y.toVector3D(); |
398 | 0 | *zAxis = axes.z.toVector3D(); |
399 | 0 | } |
400 | | |
401 | | QQuaternion QQuaternion::fromAxes(const QVector3D &xAxis, const QVector3D &yAxis, const QVector3D &zAxis) |
402 | 0 | { |
403 | 0 | return fromAxes(Axes{Axis::fromVector3D(xAxis), |
404 | 0 | Axis::fromVector3D(yAxis), |
405 | 0 | Axis::fromVector3D(zAxis)}); |
406 | 0 | } |
407 | | #endif // QT_GUI_INLINE_IMPL_SINCE(6, 11) |
408 | | |
409 | | #endif // QT_NO_VECTOR3D |
410 | | |
411 | | constexpr void QQuaternion::setVector(float aX, float aY, float aZ) noexcept |
412 | 0 | { |
413 | 0 | xp = aX; |
414 | 0 | yp = aY; |
415 | 0 | zp = aZ; |
416 | 0 | } |
417 | | |
418 | | #ifndef QT_NO_VECTOR4D |
419 | | |
420 | | constexpr QQuaternion::QQuaternion(const QVector4D &aVector) noexcept |
421 | | : wp(aVector.w()), xp(aVector.x()), yp(aVector.y()), zp(aVector.z()) {} |
422 | | |
423 | | constexpr QVector4D QQuaternion::toVector4D() const noexcept |
424 | 0 | { |
425 | 0 | return QVector4D(xp, yp, zp, wp); |
426 | 0 | } |
427 | | |
428 | | #endif // QT_NO_VECTOR4D |
429 | | |
430 | | #ifndef QT_NO_DEBUG_STREAM |
431 | | Q_GUI_EXPORT QDebug operator<<(QDebug dbg, const QQuaternion &q); |
432 | | #endif |
433 | | |
434 | | #ifndef QT_NO_DATASTREAM |
435 | | Q_GUI_EXPORT QDataStream &operator<<(QDataStream &, const QQuaternion &); |
436 | | Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QQuaternion &); |
437 | | #endif |
438 | | |
439 | | #endif // QT_NO_QUATERNION |
440 | | |
441 | | QT_END_NAMESPACE |
442 | | |
443 | | #endif // QQUATERNION_H |