Play animations defined in glTF files. More...
Since: | Kuesa 1.0 |
Instantiates: | AnimationPlayer |
AnimationPlayer is a utility class designed to easily control animations where the clip and mapping data is stored in a collections (typically loaded from glTF files).
Clip and mapper data are referenced by name. These will be used to look up actual assets in the appropriate collection.
AnimationPlayer internally uses an instance of Qt3DAnimation::QClipAnimator and mirrors it's api.
Additionally, AnimationPlayer can be used to map clip data to other target objects than those specified in a mapper. For example, an animation where the clip data affect transformation properties, can be applied to any Qt3DCore::QTransform instance, not just the one specified in the mapper data.
the name of the clip asset.
This will be used to lookup the asset in the AnimationClipCollection instance of the SceneEntity.
intense of Qt3DAnimation::QClock used to control animation speed and direction
A Qt3DAnimation::QClock can be used to control the speed (by setting the playBackRate) and direction (like reversing by setting negative playBackRate values) of the animation.
This reflects the state of the internal Qt3DAnimation::QClipAnimator instance.
controls the number of time the animation should repeat.
If the value is 0 (default), the animation will run only once.
If the value is AnimationPlayer::Infinite, the animation will loop indefinitly until explicitly stopped.
Otherwise, it will repeat the specified number of times.
This reflects the state of the internal Qt3DAnimation::QClipAnimator instance.
the name of the mapper asset.
This will be used to lookup the asset in the AnimationMappingCollection instance of the SceneEntity.
If empty (default), the name of the clip will be used as it is a common convention that they should match.
progress of the animation as a uniform value between 0. and 1.
This reflects the state of the internal Qt3DAnimation::QClipAnimator instance.
controls if the animation is running or not
This reflects the state of the internal Qt3DAnimation::QClipAnimator instance.
the current status of the player