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 
11 #include "impeller/core/texture.h"
12 #include "impeller/scene/importer/scene_flatbuffers.h"
13 #include "impeller/scene/node.h"
14 
15 namespace impeller {
16 namespace scene {
17 
18 class Skin final {
19  public:
20  static std::unique_ptr<Skin> MakeFromFlatbuffer(
21  const fb::Skin& skin,
22  const std::vector<std::shared_ptr<Node>>& scene_nodes);
23  ~Skin();
24 
25  Skin(Skin&&);
26  Skin& operator=(Skin&&);
27 
28  std::shared_ptr<Texture> GetJointsTexture(Allocator& allocator);
29 
30  private:
31  Skin();
32 
33  std::vector<std::shared_ptr<Node>> joints_;
34  std::vector<Matrix> inverse_bind_matrices_;
35 
36  Skin(const Skin&) = delete;
37 
38  Skin& operator=(const Skin&) = delete;
39 };
40 
41 } // namespace scene
42 } // namespace impeller
43 
44 #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:18
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_blend_unittests.cc:18