diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2017-03-04 16:46:30 +0000 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2017-03-17 08:37:35 +0000 |
commit | 8256e82d72f17721fb40428df6c7ba397b3e7edd (patch) | |
tree | 529e4624497812545d99dea4b0b1677659e65b6b /src/animation/backend/clipblendnode.cpp | |
parent | a02e859b084c542bba472a4ae6f22acad07b085c (diff) |
Add virtual to ClipBlendNode to allow querying dependencies
This will allow a job to build up a list of clips to be evaluated for
the blend tree. This has enough flexibility to allow us to support
many types of bend node in the future but still allow us to only
evaluate the clips actually needed at any given time and for the
current set of blend node states.
Change-Id: I6bfff6d18434af4f09764d890af6f8f429996994
Reviewed-by: Mike Krus <mike.krus@kdab.com>
Diffstat (limited to 'src/animation/backend/clipblendnode.cpp')
-rw-r--r-- | src/animation/backend/clipblendnode.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/animation/backend/clipblendnode.cpp b/src/animation/backend/clipblendnode.cpp index 02e8cef50..745a7a27b 100644 --- a/src/animation/backend/clipblendnode.cpp +++ b/src/animation/backend/clipblendnode.cpp @@ -181,6 +181,28 @@ ClipResults ClipBlendNode::clipResults(Qt3DCore::QNodeId animatorId) const return ClipResults(); } +/*! + \fn QVector<Qt3DCore::QNodeId> ClipBlendNode::dependencyIds() const + \internal + + Each subclass of ClipBlendNode must implement this function such that it + returns a vector of the ids of ClipBlendNodes upon which is it dependent + in order to be able to evaluate given its current internal state. + + For example, a subclass implementing a simple lerp blend between two + other nodes, would always return the ids of the nodes between which it + is lerping. + + A more generalised lerp node that is capable of lerping between a + series of nodes would return the ids of the two nodes that correspond + to the blend values which sandwich the currently set blend value. + + The animation handler will submit a job that uses this function to + build a list of clips that must be evaluated in order to later + evaluate the entire blend tree. In this way, the clips can all be + evaluated in one pass, and the tree in a subsequent pass. +*/ + } // Animation } // Qt3DAnimation |