5#ifndef FLUTTER_IMPELLER_SCENE_ANIMATION_ANIMATION_CLIP_H_
6#define FLUTTER_IMPELLER_SCENE_ANIMATION_ANIMATION_CLIP_H_
9#include <unordered_map>
66 std::unordered_map<Node*, AnimationTransforms>& transform_decomps,
67 Scalar weight_multiplier)
const;
70 void BindToTarget(
Node* node);
72 struct ChannelBinding {
77 std::shared_ptr<Animation> animation_;
78 std::vector<ChannelBinding> bindings_;
81 Scalar playback_time_scale_ = 1;
83 bool playing_ =
false;
void SetPlaybackTimeScale(Scalar playback_speed)
Sets the animation playback speed. Negative values make the clip play in reverse.
void SetPlaying(bool playing)
void SetWeight(Scalar weight)
void ApplyToBindings(std::unordered_map< Node *, AnimationTransforms > &transform_decomps, Scalar weight_multiplier) const
Applies the animation to all binded properties in the scene.
Scalar GetPlaybackTimeScale() const
AnimationClip(std::shared_ptr< Animation > animation, Node *bind_target)
SecondsF GetPlaybackTime() const
Get the current playback time of the animation.
void Advance(SecondsF delta_time)
Advance the animation by delta_time seconds. Negative delta_time values do nothing.
AnimationClip & operator=(AnimationClip &&)
AnimationClip(AnimationClip &&)
void Seek(SecondsF time)
Move the animation to the specified time. The given time is clamped to the animation's playback range...
void SetLoop(bool looping)
std::chrono::duration< float > SecondsF
static double time(int loops, Benchmark *bench, Target *target)