5#ifndef FLUTTER_IMPELLER_SCENE_NODE_H_
6#define FLUTTER_IMPELLER_SCENE_NODE_H_
48 variant<SetTransformEntry, SetAnimationStateEntry, SeekAnimationEntry>;
53 std::optional<std::vector<Entry>> Flush();
56 bool dirty_ IPLR_GUARDED_BY(write_mutex_) =
false;
57 std::vector<Entry> entries_ IPLR_GUARDED_BY(write_mutex_);
71 const std::string&
GetName()
const;
72 void SetName(
const std::string& new_name);
77 const std::string&
name,
78 bool exclude_animation_players =
false)
const;
89 bool AddChild(std::shared_ptr<Node> child);
100 const Matrix& parent_transform);
105 void UnpackFromFlatbuffer(
106 const fb::Node& node,
107 const std::vector<std::shared_ptr<Node>>& scene_nodes,
108 const std::vector<std::shared_ptr<Texture>>& textures,
116 bool is_root_ =
false;
117 bool is_joint_ =
false;
118 Node* parent_ =
nullptr;
119 std::vector<std::shared_ptr<Node>> children_;
123 std::vector<std::shared_ptr<Animation>> animations_;
124 mutable std::optional<AnimationPlayer> animation_player_;
126 std::unique_ptr<Skin> skin_;
130 Node& operator=(
const Node&) =
delete;
An object that allocates device memory.
std::variant< SetTransformEntry, SetAnimationStateEntry, SeekAnimationEntry > Entry
void Append(const Entry &entry)
void SetIsJoint(bool is_joint)
bool AddChild(std::shared_ptr< Node > child)
void SetLocalTransform(Matrix transform)
void SetGlobalTransform(Matrix transform)
std::shared_ptr< Animation > FindAnimationByName(const std::string &name) const
Matrix GetGlobalTransform() const
AnimationClip * AddAnimation(const std::shared_ptr< Animation > &animation)
void AddMutation(const MutationLog::Entry &entry)
bool Render(SceneEncoder &encoder, Allocator &allocator, const Matrix &parent_transform)
const std::string & GetName() const
void SetName(const std::string &new_name)
std::shared_ptr< Node > FindChildByName(const std::string &name, bool exclude_animation_players=false) const
std::vector< std::shared_ptr< Node > > & GetChildren()
Matrix GetLocalTransform() const
static std::shared_ptr< Node > MakeFromFlatbuffer(const fml::Mapping &ipscene_mapping, Allocator &allocator)
DEF_SWITCHES_START aot vmservice shared library name
static SkColor4f transform(SkColor4f c, SkColorSpace *src, SkColorSpace *dst)
A 4x4 matrix using column-major storage.
std::string animation_name
std::string animation_name