summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2017-09-28 12:50:28 +0100
committerSean Harmer <sean.harmer@kdab.com>2017-10-06 10:27:35 +0000
commitbff7d2aaa74cb6d576e56b44617949f29c36cead (patch)
tree022933ab4ecb0040e336a1eb834436ac3e3d6b7c /tests
parente743158b0b17335ef321c2c378bacfe2697ba5f1 (diff)
Decompose a new quaternion rotation into euler angles
Same as in QTransform. Change-Id: Ia1dca19c8faf996629ecbf8832e5625e7b22532c Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/core/qjoint/tst_qjoint.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/core/qjoint/tst_qjoint.cpp b/tests/auto/core/qjoint/tst_qjoint.cpp
index a63d275c5..ec1a45f90 100644
--- a/tests/auto/core/qjoint/tst_qjoint.cpp
+++ b/tests/auto/core/qjoint/tst_qjoint.cpp
@@ -65,6 +65,7 @@ private Q_SLOTS:
{
// WHEN
+ joint.setToIdentity();
QSignalSpy spy(&joint, SIGNAL(scaleChanged(QVector3D)));
const QVector3D newValue(2.5f, 2.0f, 1.3f);
joint.setScale(newValue);
@@ -85,6 +86,7 @@ private Q_SLOTS:
{
// WHEN
+ joint.setToIdentity();
QSignalSpy spy(&joint, SIGNAL(rotationChanged(QQuaternion)));
const auto newValue = QQuaternion::fromAxisAndAngle(0.0f, 1.0f, 0.0f, 45.0f);
joint.setRotation(newValue);
@@ -105,6 +107,7 @@ private Q_SLOTS:
{
// WHEN
+ joint.setToIdentity();
QSignalSpy spy(&joint, SIGNAL(translationChanged(QVector3D)));
const QVector3D newValue(1.0f, 2.0f, 3.0f);
joint.setTranslation(newValue);
@@ -125,6 +128,7 @@ private Q_SLOTS:
{
// WHEN
+ joint.setToIdentity();
QSignalSpy spy(&joint, SIGNAL(inverseBindMatrixChanged(QMatrix4x4)));
QMatrix4x4 newValue;
newValue.scale(3.5f);
@@ -146,6 +150,7 @@ private Q_SLOTS:
{
// WHEN
+ joint.setToIdentity();
QSignalSpy spy(&joint, SIGNAL(rotationChanged(QQuaternion)));
QSignalSpy spyEuler(&joint, SIGNAL(rotationXChanged(float)));
const auto newValue = 45.0f;
@@ -176,6 +181,7 @@ private Q_SLOTS:
{
// WHEN
+ joint.setToIdentity();
QSignalSpy spy(&joint, SIGNAL(rotationChanged(QQuaternion)));
QSignalSpy spyEuler(&joint, SIGNAL(rotationYChanged(float)));
const auto newValue = 45.0f;
@@ -206,6 +212,7 @@ private Q_SLOTS:
{
// WHEN
+ joint.setToIdentity();
QSignalSpy spy(&joint, SIGNAL(rotationChanged(QQuaternion)));
QSignalSpy spyEuler(&joint, SIGNAL(rotationZChanged(float)));
const auto newValue = 45.0f;