5#ifndef FLUTTER_IMPELLER_SCENE_NODE_H_
6#define FLUTTER_IMPELLER_SCENE_NODE_H_
13#include "flutter/fml/macros.h"
52 variant<SetTransformEntry, SetAnimationStateEntry, SeekAnimationEntry>;
57 std::optional<std::vector<Entry>> Flush();
75 const std::string&
GetName()
const;
76 void SetName(
const std::string& new_name);
81 const std::string&
name,
82 bool exclude_animation_players =
false)
const;
93 bool AddChild(std::shared_ptr<Node> child);
104 const Matrix& parent_transform);
109 void UnpackFromFlatbuffer(
110 const fb::Node& node,
111 const std::vector<std::shared_ptr<Node>>& scene_nodes,
112 const std::vector<std::shared_ptr<Texture>>&
textures,
120 bool is_root_ =
false;
121 bool is_joint_ =
false;
122 Node* parent_ =
nullptr;
123 std::vector<std::shared_ptr<Node>> children_;
127 std::vector<std::shared_ptr<Animation>> animations_;
128 mutable std::optional<AnimationPlayer> animation_player_;
130 std::unique_ptr<Skin> skin_;
134 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)
std::vector< std::shared_ptr< FakeTexture > > textures
static SkColor4f transform(SkColor4f c, SkColorSpace *src, SkColorSpace *dst)
A 4x4 matrix using column-major storage.
std::string animation_name
std::string animation_name
#define IPLR_GUARDED_BY(x)