summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2017-03-24 16:00:50 +0000
committerSean Harmer <sean.harmer@kdab.com>2017-03-26 07:29:52 +0000
commit57d700a414dd8e6fa301865771b9c738bb7aa8c6 (patch)
tree73029b665953e8c39e9e17cf82c2bed9caf533cf /src
parentd4181254c00086d735ecbf01a03a8129e788e0a5 (diff)
Add allDependencyIds() pure virtual and overrides to backend nodes
This will be used to visit all nodes by the visitor for the purpose of collecting vlaue nodes that should be evaluated. Change-Id: Iff84eed2ee139a0ecd3639994549e5859b5827d0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src')
-rw-r--r--src/animation/backend/additiveclipblend_p.h5
-rw-r--r--src/animation/backend/clipblendnode.cpp11
-rw-r--r--src/animation/backend/clipblendnode_p.h1
-rw-r--r--src/animation/backend/clipblendvalue_p.h5
-rw-r--r--src/animation/backend/lerpclipblend_p.h5
5 files changed, 27 insertions, 0 deletions
diff --git a/src/animation/backend/additiveclipblend_p.h b/src/animation/backend/additiveclipblend_p.h
index 7267283a5..b3fe240ed 100644
--- a/src/animation/backend/additiveclipblend_p.h
+++ b/src/animation/backend/additiveclipblend_p.h
@@ -73,6 +73,11 @@ public:
void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e) Q_DECL_FINAL;
+ inline QVector<Qt3DCore::QNodeId> allDependencyIds() const Q_DECL_OVERRIDE
+ {
+ return currentDependencyIds();
+ }
+
inline QVector<Qt3DCore::QNodeId> currentDependencyIds() const Q_DECL_OVERRIDE
{
return { m_baseClipId, m_additiveClipId };
diff --git a/src/animation/backend/clipblendnode.cpp b/src/animation/backend/clipblendnode.cpp
index 26b4c75d7..4f236b11c 100644
--- a/src/animation/backend/clipblendnode.cpp
+++ b/src/animation/backend/clipblendnode.cpp
@@ -121,6 +121,17 @@ ClipResults ClipBlendNode::clipResults(Qt3DCore::QNodeId animatorId) const
*/
/*!
+ \fn QVector<Qt3DCore::QNodeId> ClipBlendNode::allDependencyIds() const
+ \internal
+
+ Similar to currentDependencyIds() but returns the ids of all potential
+ dependency nodes, not just those that are dependencies given the current
+ internal state. For example a generalised lerp node would return the ids
+ of all nodes that can participate in the lerp for any value of the blend
+ parameter. Not just those bounding the current blend value.
+*/
+
+/*!
\internal
Fetches the ClipResults from the nodes listed in the dependencyIds
diff --git a/src/animation/backend/clipblendnode_p.h b/src/animation/backend/clipblendnode_p.h
index 89cf09fa0..865536ea0 100644
--- a/src/animation/backend/clipblendnode_p.h
+++ b/src/animation/backend/clipblendnode_p.h
@@ -83,6 +83,7 @@ public:
void setClipResults(Qt3DCore::QNodeId animatorId, const ClipResults &clipResults);
ClipResults clipResults(Qt3DCore::QNodeId animatorId) const;
+ virtual QVector<Qt3DCore::QNodeId> allDependencyIds() const = 0;
virtual QVector<Qt3DCore::QNodeId> currentDependencyIds() const = 0;
virtual double duration() const = 0;
diff --git a/src/animation/backend/clipblendvalue_p.h b/src/animation/backend/clipblendvalue_p.h
index 8c6d85940..6da800f98 100644
--- a/src/animation/backend/clipblendvalue_p.h
+++ b/src/animation/backend/clipblendvalue_p.h
@@ -66,6 +66,11 @@ public:
void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e) Q_DECL_OVERRIDE;
+ inline QVector<Qt3DCore::QNodeId> allDependencyIds() const Q_DECL_OVERRIDE
+ {
+ return currentDependencyIds();
+ }
+
inline QVector<Qt3DCore::QNodeId> currentDependencyIds() const Q_DECL_OVERRIDE
{
return { m_clipId };
diff --git a/src/animation/backend/lerpclipblend_p.h b/src/animation/backend/lerpclipblend_p.h
index 56a67ca5d..e09987759 100644
--- a/src/animation/backend/lerpclipblend_p.h
+++ b/src/animation/backend/lerpclipblend_p.h
@@ -73,6 +73,11 @@ public:
void sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e) Q_DECL_FINAL;
+ inline QVector<Qt3DCore::QNodeId> allDependencyIds() const Q_DECL_OVERRIDE
+ {
+ return currentDependencyIds();
+ }
+
inline QVector<Qt3DCore::QNodeId> currentDependencyIds() const Q_DECL_OVERRIDE
{
return { m_startClipId, m_endClipId };