diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2017-08-22 17:04:34 +0100 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2017-08-30 12:59:23 +0000 |
commit | d0f45d9819c556bb5e3ec5bfd848db630f26638e (patch) | |
tree | 4fecb165af9068da8e108beb466dda813ed0d8e0 /src/core/transforms | |
parent | 9fc405b68e8dd60ed2cd957d85147017621b85f9 (diff) |
Send joint names and local poses from render to animation aspect
This will allow the animation aspect to easily update the local poses
of all joints in a skeleton without needing to be able to address any
frontend QJoint objects.
Change-Id: Id2137f2533702387dc68296aba1dd8627b0599d6
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/core/transforms')
-rw-r--r-- | src/core/transforms/sqt_p.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/core/transforms/sqt_p.h b/src/core/transforms/sqt_p.h index baf0cb8fc..262e3a645 100644 --- a/src/core/transforms/sqt_p.h +++ b/src/core/transforms/sqt_p.h @@ -54,6 +54,7 @@ #include <QtGui/qmatrix4x4.h> #include <QtGui/qquaternion.h> #include <QtGui/qvector3d.h> +#include <QtCore/qvector.h> QT_BEGIN_NAMESPACE @@ -81,10 +82,25 @@ struct Sqt m.scale(scale); return m; } + + bool operator == (const Sqt &rhs) const + { + return rotation == rhs.rotation + && scale == rhs.scale + && translation == rhs.translation; + } +}; + +struct JointNamesAndLocalPoses +{ + QVector<QString> names; + QVector<Sqt> localPoses; }; } // namespace Qt3DCore QT_END_NAMESPACE +Q_DECLARE_METATYPE(Qt3DCore::JointNamesAndLocalPoses) + #endif // QT3DCORE_SQT_P_H |