Flutter Impeller
animation_player.h
Go to the documentation of this file.
1
// Copyright 2013 The Flutter Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#ifndef FLUTTER_IMPELLER_SCENE_ANIMATION_ANIMATION_PLAYER_H_
6
#define FLUTTER_IMPELLER_SCENE_ANIMATION_ANIMATION_PLAYER_H_
7
8
#include <map>
9
#include <memory>
10
#include <optional>
11
12
#include "
impeller/base/timing.h
"
13
#include "
impeller/scene/animation/animation_clip.h
"
14
15
namespace
impeller
{
16
namespace
scene {
17
18
class
Node;
19
20
class
AnimationPlayer
final {
21
public
:
22
AnimationPlayer
();
23
~AnimationPlayer
();
24
25
AnimationPlayer
(
AnimationPlayer
&&);
26
AnimationPlayer
&
operator=
(
AnimationPlayer
&&);
27
28
AnimationClip
*
AddAnimation
(
const
std::shared_ptr<Animation>& animation,
29
Node
* bind_target);
30
31
AnimationClip
*
GetClip
(
const
std::string& name)
const
;
32
33
/// @brief Advanced all clips and updates animated properties in the scene.
34
void
Update
();
35
36
private
:
37
std::unordered_map<Node*, AnimationTransforms> target_transforms_;
38
39
std::map<std::string, AnimationClip> clips_;
40
41
std::optional<TimePoint> previous_time_;
42
43
AnimationPlayer
(
const
AnimationPlayer
&) =
delete
;
44
45
AnimationPlayer
&
operator=
(
const
AnimationPlayer
&) =
delete
;
46
};
47
48
}
// namespace scene
49
}
// namespace impeller
50
51
#endif // FLUTTER_IMPELLER_SCENE_ANIMATION_ANIMATION_PLAYER_H_
timing.h
impeller::scene::AnimationPlayer::AddAnimation
AnimationClip * AddAnimation(const std::shared_ptr< Animation > &animation, Node *bind_target)
Definition:
animation_player.cc:23
impeller::scene::AnimationPlayer::Update
void Update()
Advanced all clips and updates animated properties in the scene.
Definition:
animation_player.cc:56
impeller::scene::AnimationPlayer::~AnimationPlayer
~AnimationPlayer()
impeller::scene::AnimationClip
Definition:
animation_clip.h:21
animation_clip.h
impeller::scene::AnimationPlayer::AnimationPlayer
AnimationPlayer()
impeller::scene::AnimationPlayer
Definition:
animation_player.h:20
impeller::scene::AnimationPlayer::GetClip
AnimationClip * GetClip(const std::string &name) const
Definition:
animation_player.cc:48
impeller::scene::Node
Definition:
node.h:26
impeller::scene::AnimationPlayer::operator=
AnimationPlayer & operator=(AnimationPlayer &&)
impeller
Definition:
aiks_blend_unittests.cc:18
impeller
scene
animation
animation_player.h
Generated by
1.8.17