diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2017-01-29 09:13:56 +0100 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2017-01-29 18:56:11 +0000 |
commit | 89766b24b5f071eaf390eadce6ba635d423201e1 (patch) | |
tree | b231e02518c4dce3f4e73eafaa5e4a5a242b3e5d /src/animation/backend/blendedclipanimator_p.h | |
parent | d555d63084ac13866a78772b43b4ac6b6d9bed9b (diff) |
Build blend trees and execute them
Also added loops property to the blendedclipanimator as mandated by rebase.
Note: only handles LERP with single node for now
Change-Id: I91e071467c604279262ec04288bc7f8b2b19f4a1
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/animation/backend/blendedclipanimator_p.h')
-rw-r--r-- | src/animation/backend/blendedclipanimator_p.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/animation/backend/blendedclipanimator_p.h b/src/animation/backend/blendedclipanimator_p.h index c6f437cf9..d0db13e53 100644 --- a/src/animation/backend/blendedclipanimator_p.h +++ b/src/animation/backend/blendedclipanimator_p.h @@ -49,6 +49,7 @@ // #include <Qt3DAnimation/private/backendnode_p.h> +#include <Qt3DAnimation/private/animationutils_p.h> QT_BEGIN_NAMESPACE @@ -69,15 +70,36 @@ public: Qt3DCore::QNodeId mapperId() const { return m_mapperId; } bool isRunning() const { return m_running; } + // Called by BuildBlendTreeJob + bool canRun() const { return !m_mapperId.isNull() && !m_blendTreeRootId.isNull() && m_running; } + void setBlendTreeRootId(Qt3DCore::QNodeId blendTreeRootId); void setMapperId(Qt3DCore::QNodeId mapperId); void setRunning(bool running); + void setMappingData(const QVector<AnimationUtils::BlendingMappingData> mappingData); + QVector<AnimationUtils::BlendingMappingData> mappingData() const { return m_mappingData; } + + void setStartTime(qint64 globalTime) { m_startGlobalTime = globalTime; } + qint64 startTime() const { return m_startGlobalTime; } + + int loops() const { return m_loops; } + + int currentLoop() const { return m_currentLoop; } + void setCurrentLoop(int currentLoop) { m_currentLoop = currentLoop; } + + void sendPropertyChanges(const QVector<Qt3DCore::QSceneChangePtr> &changes); + private: void initializeFromPeer(const Qt3DCore::QNodeCreatedChangeBasePtr &change) Q_DECL_FINAL; Qt3DCore::QNodeId m_blendTreeRootId; Qt3DCore::QNodeId m_mapperId; bool m_running; + + qint64 m_startGlobalTime; + QVector<AnimationUtils::BlendingMappingData> m_mappingData; + int m_currentLoop; + int m_loops; }; } // namespace Animation |