summaryrefslogtreecommitdiffstats
path: root/src/animation/backend/handle_types_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Add Skeleton backend node to the animation aspectSean Harmer2017-08-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The animation aspect can already animate any property of a QNode subclass. However, the render aspect allows to render a skinned mesh utilising a QSkeletonLoader that does not create the corresponding frontend QJoint objects (subclasses of QNode). Some skeletons can be large (10's or 100's of joints) so this is a good memory conserving optimization. The consequence of not creating the frontend joints however, is that without the QNodes to address, we cannot animate their local poses. To combat this without giving up on the above optimization we add a backend node for QAbstractSkeleton to the animation aspect. This node contains a vector of local poses for the joints in the same order as the render aspect creates and flattens the joint hierarchy in (see the vector of JointInfo in the SkeletonData in the render aspect). The animation aspect can then use this special knowledge to efficiently animate the joints of a skeleton and each frame, inform the render aspect backend of the new set of local pose transformations, prior to the render aspect calculating the skinning matrix palette and supplying that to the armature component for rendering. This will require the animation aspect to be able to map channels in an animation onto the joint indices of the skeleton backend nodes. By default, they will be applied to matching indices in the vector of local poses. However, an optional name property will be allowed in the animation clip channels to permit re-mapping of animation clips to similar skeletons (i.e. allow animations to be reused between different skeletons where they share some joint names). This will be done in follow up commits. Change-Id: I81ad258f59bb0ddd6a49456840c860783f6fb340 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Rename AnimationClipLoader to AnimationClipSean Harmer2017-04-121-2/+2
| | | | | | | | It handles both loadign from file and from data constructed using the public API. Change-Id: Ic9e71dc60c36869548323312f7129df6c9edd763 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Introduce QAbstractAnimationClip and rename QAnimationClipSean Harmer2017-02-241-2/+2
| | | | | | | | | | | | | Introduced an abstract base class for types of animation clip. Also renamed QAnimationClip to QAnimationClipLoader since it loads data from files. Also renamed corresponding backend type and fixed up unit tests accordingly. Task-number: QTBUG-58898 Change-Id: I01a96e108cbbcd12e01913693e96610598965018 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* Remove QConductedClipAnimator and defer to laterSean Harmer2017-02-161-2/+0
| | | | | | | | Too much to fix up for 5.9 so remove and defer for 5.10. Task-number: QTBUG-58905 Change-Id: Ie5b4f172e57beac12933fa0db5f102b4dc9346fc Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* Add API to map animation channels to propertiesSean Harmer2017-01-271-0/+4
| | | | | Change-Id: I98aecf101eb052979f7a2e98c8bfcf899f27fb02 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add animation componentsSean Harmer2017-01-271-0/+6
| | | | | | | | | | | | | | | | | Three levels of animation playback are available at present for keyframe animation: 1) Direct playback of a clip via QClipAnimator 2) Playback of a blend tree of clips via QBlendedClipAnimator 3) Playback of a set of blend trees controlled with a state machine via QConductedClipAnimator This commit adds the frontend and backend nodes for all 3 components and registers them. The blended and conducted animator components are just empty skeletons for now. Change-Id: If2f0a912c003f3d20f830a8f6174946eea6b47e6 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add in the usual plumbing and register QAnimationClipSean Harmer2017-01-251-0/+70
Change-Id: I7bbfb9e282f1a59cbb7f211dd5cebff8e30f3779 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>