diff options
author | Christian Strømme <christian.stromme@qt.io> | 2017-11-21 12:23:55 +0100 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2018-01-23 18:23:31 +0000 |
commit | f6a9174e5efeda68151f2d992fcd916fb2dd2c99 (patch) | |
tree | cee5aa42d7164d5e3f8b18c6c1a0217965d0784e /src/animation/backend/blendedclipanimator_p.h | |
parent | f6699afc911da958347c6916c1eff3558ee8d431 (diff) |
Add normalizedTime function to blendedlclip animators
Change-Id: I19c1907371d9d131295558eb19c297d544ebef7d
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 | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/animation/backend/blendedclipanimator_p.h b/src/animation/backend/blendedclipanimator_p.h index 79c6d8c43..09a071c06 100644 --- a/src/animation/backend/blendedclipanimator_p.h +++ b/src/animation/backend/blendedclipanimator_p.h @@ -70,9 +70,11 @@ public: Qt3DCore::QNodeId mapperId() const { return m_mapperId; } Qt3DCore::QNodeId clockId() const { return m_clockId; } bool isRunning() const { return m_running; } + void setNormalizedLocalTime(float normalizedTime); + float normalizedLocalTime() const { return m_normalizedLocalTime; } // Called by BuildBlendTreeJob - bool canRun() const { return !m_mapperId.isNull() && !m_blendTreeRootId.isNull() && m_running; } + bool canRun() const { return !m_mapperId.isNull() && !m_blendTreeRootId.isNull(); } void setBlendTreeRootId(Qt3DCore::QNodeId blendTreeRootId); void setMapperId(Qt3DCore::QNodeId mapperId); @@ -101,6 +103,14 @@ public: double lastLocalTime() const; void setLastLocalTime(double lastLocalTime); + float lastNormalizedLocalTime() { return m_lastNormalizedLocalTime; } + void setLastNormalizedLocalTime(float normalizedTime); + bool isSeeking() const + { + return isValidNormalizedTime(m_normalizedLocalTime) + && !qFuzzyCompare(m_lastNormalizedLocalTime, m_normalizedLocalTime); + } + private: void initializeFromPeer(const Qt3DCore::QNodeCreatedChangeBasePtr &change) final; Qt3DCore::QNodeId m_blendTreeRootId; @@ -114,6 +124,9 @@ private: int m_currentLoop; int m_loops; + float m_normalizedLocalTime; + float m_lastNormalizedLocalTime; + QVector<MappingData> m_mappingData; }; |