| Flutter Impeller |

skin.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_SKIN_H_
6 #define FLUTTER_IMPELLER_SCENE_SKIN_H_
7
8 #include <memory>
9 #include <optional>
10
11 #include "flutter/fml/macros.h"
12
13 #include "impeller/core/allocator.h"
14 #include "impeller/core/texture.h"
15 #include "impeller/scene/importer/scene_flatbuffers.h"
16 #include "impeller/scene/node.h"
17
18 namespace impeller {
19 namespace scene {
20
21 class Skin final {
22 public:
23 static std::unique_ptr<Skin> MakeFromFlatbuffer(
24 const fb::Skin& skin,
25 const std::vector<std::shared_ptr<Node>>& scene_nodes);
26 ~Skin();
27
28 Skin(Skin&&);
29 Skin& operator=(Skin&&);
30
31 std::shared_ptr<Texture> GetJointsTexture(Allocator& allocator);
32
33 private:
34 Skin();
35
36 std::vector<std::shared_ptr<Node>> joints_;
37 std::vector<Matrix> inverse_bind_matrices_;
38
39 Skin(const Skin&) = delete;
40
41 Skin& operator=(const Skin&) = delete;
42 };
43
44 } // namespace scene
45 } // namespace impeller
46
47 #endif // FLUTTER_IMPELLER_SCENE_SKIN_H_
impeller::scene::Skin::MakeFromFlatbuffer
static std::unique_ptr< Skin > MakeFromFlatbuffer(const fb::Skin &skin, const std::vector< std::shared_ptr< Node >> &scene_nodes)
Definition: skin.cc:19
impeller::scene::Skin::~Skin
~Skin()
node.h
impeller::Allocator
An object that allocates device memory.
Definition: allocator.h:22
impeller::scene::Skin
Definition: skin.h:21
allocator.h
impeller::scene::Skin::operator=
Skin & operator=(Skin &&)
texture.h
impeller::scene::Skin::GetJointsTexture
std::shared_ptr< Texture > GetJointsTexture(Allocator &allocator)
Definition: skin.cc:65
impeller
Definition: aiks_context.cc:10