 |
Flutter Impeller
|
|
Go to the documentation of this file.
5 #ifndef FLUTTER_IMPELLER_SCENE_ANIMATION_ANIMATION_CLIP_H_
6 #define FLUTTER_IMPELLER_SCENE_ANIMATION_ANIMATION_CLIP_H_
9 #include <unordered_map>
12 #include "flutter/fml/macros.h"
20 class AnimationPlayer;
67 std::unordered_map<Node*, AnimationTransforms>& transform_decomps,
68 Scalar weight_multiplier)
const;
71 void BindToTarget(
Node* node);
73 struct ChannelBinding {
78 std::shared_ptr<Animation> animation_;
79 std::vector<ChannelBinding> bindings_;
82 Scalar playback_time_scale_ = 1;
84 bool playing_ =
false;
97 #endif // FLUTTER_IMPELLER_SCENE_ANIMATION_ANIMATION_CLIP_H_
void SetPlaybackTimeScale(Scalar playback_speed)
Sets the animation playback speed. Negative values make the clip play in reverse.
void SetLoop(bool looping)
void ApplyToBindings(std::unordered_map< Node *, AnimationTransforms > &transform_decomps, Scalar weight_multiplier) const
Applies the animation to all binded properties in the scene.
std::chrono::duration< float > SecondsF
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.
Scalar GetPlaybackTimeScale() const
void SetWeight(Scalar weight)
void Seek(SecondsF time)
Move the animation to the specified time. The given time is clamped to the animation's playback range...
void SetPlaying(bool playing)
AnimationClip(std::shared_ptr< Animation > animation, Node *bind_target)
AnimationClip & operator=(AnimationClip &&)