diff options
author | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-08-21 12:00:07 (GMT) |
---|---|---|
committer | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-08-21 12:00:07 (GMT) |
commit | 8d00a0a21f245d15962191e0690d3619735d118b (patch) | |
tree | 7aaa66528f0ee40d0d2d885f94835d0f09ea4a68 /src/gui/math3d/qquaternion.cpp | |
parent | 97cec103793a4b9aae8337ffc2ce9a2bd98fb5fc (diff) | |
parent | 508b447075fb852e61ddf88c92c9099dad292747 (diff) | |
download | Qt-8d00a0a21f245d15962191e0690d3619735d118b.zip Qt-8d00a0a21f245d15962191e0690d3619735d118b.tar.gz Qt-8d00a0a21f245d15962191e0690d3619735d118b.tar.bz2 |
Merge commit 'qt/master' into kinetic-graphicseffect
Conflicts:
src/gui/graphicsview/graphicsview.pri
Diffstat (limited to 'src/gui/math3d/qquaternion.cpp')
-rw-r--r-- | src/gui/math3d/qquaternion.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gui/math3d/qquaternion.cpp b/src/gui/math3d/qquaternion.cpp index b2c598f..f279388 100644 --- a/src/gui/math3d/qquaternion.cpp +++ b/src/gui/math3d/qquaternion.cpp @@ -41,6 +41,7 @@ #include "qquaternion.h" #include <QtCore/qmath.h> +#include <QtCore/qvariant.h> #include <QtCore/qdebug.h> QT_BEGIN_NAMESPACE @@ -560,6 +561,14 @@ QQuaternion QQuaternion::nlerp return (q1 * (1.0f - t) + q2b * t).normalized(); } +/*! + Returns the quaternion as a QVariant. +*/ +QQuaternion::operator QVariant() const +{ + return QVariant(QVariant::Quaternion, this); +} + #ifndef QT_NO_DEBUG_STREAM QDebug operator<<(QDebug dbg, const QQuaternion &q) |