summaryrefslogtreecommitdiffstats
path: root/src/animation/backend/skeleton_p.h
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2017-08-26 14:53:20 +0100
committerSean Harmer <sean.harmer@kdab.com>2017-09-02 18:10:31 +0000
commitbbb9b6c25650fc17868c47d9c82501f9068dd158 (patch)
treee70e6658ad0efc1f654a1045caa5a39d3c6a31fa /src/animation/backend/skeleton_p.h
parent9a14388cd5f3e509658e8ec1a1c582f9215f53ca (diff)
Extend buildRequiredChannelsAndTypes to handle indexed targets
Specifically, this is needed for animating joints of a skeleton. If we later find other such indexed targets we can rename the jointIndex member to something more generic. For now this naming helps with reasoning as there are many kinds of index in play within the animation system. Change-Id: I348f255ee622aa11f26e5a3c1055bf5c12071c17 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/animation/backend/skeleton_p.h')
-rw-r--r--src/animation/backend/skeleton_p.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/animation/backend/skeleton_p.h b/src/animation/backend/skeleton_p.h
index 0674a28a1..19da98261 100644
--- a/src/animation/backend/skeleton_p.h
+++ b/src/animation/backend/skeleton_p.h
@@ -64,7 +64,14 @@ public:
void cleanup();
void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e) Q_DECL_OVERRIDE;
+ int jointCount() const { return m_jointLocalPoses.size(); }
+
#if defined(QT_BUILD_INTERNAL)
+ void setJointCount(int jointCount)
+ {
+ m_jointNames.resize(jointCount);
+ m_jointLocalPoses.resize(jointCount);
+ }
void setJointNames(const QVector<QString> &names) { m_jointNames = names; }
QVector<QString> jointNames() const { return m_jointNames; }
void setJointLocalPoses(const QVector<Qt3DCore::Sqt> &localPoses) { m_jointLocalPoses = localPoses; }