Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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
15#include "impeller/scene/importer/scene_flatbuffers.h"
16#include "impeller/scene/node.h"
17
18namespace impeller {
19namespace scene {
20
21class 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);
27
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_
An object that allocates device memory.
Definition allocator.h:22
std::shared_ptr< Texture > GetJointsTexture(Allocator &allocator)
Definition skin.cc:65
static std::unique_ptr< Skin > MakeFromFlatbuffer(const fb::Skin &skin, const std::vector< std::shared_ptr< Node > > &scene_nodes)
Definition skin.cc:19
Skin & operator=(Skin &&)