Flutter Engine
The Flutter Engine
mesh.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_MESH_H_
6#define FLUTTER_IMPELLER_SCENE_MESH_H_
7
8#include <memory>
9
13
14namespace impeller {
15namespace scene {
16
17class Skin;
18
19class Mesh final {
20 public:
21 struct Primitive {
22 std::shared_ptr<Geometry> geometry;
23 std::shared_ptr<Material> material;
24 };
25
28
31
32 void AddPrimitive(Primitive mesh_);
33 std::vector<Primitive>& GetPrimitives();
34
36 const Matrix& transform,
37 const std::shared_ptr<Texture>& joints) const;
38
39 private:
40 std::vector<Primitive> primitives_;
41
42 Mesh(const Mesh&) = delete;
43
44 Mesh& operator=(const Mesh&) = delete;
45};
46
47} // namespace scene
48} // namespace impeller
49
50#endif // FLUTTER_IMPELLER_SCENE_MESH_H_
bool Render(SceneEncoder &encoder, const Matrix &transform, const std::shared_ptr< Texture > &joints) const
Definition: mesh.cc:36
std::vector< Primitive > & GetPrimitives()
Definition: mesh.cc:32
Mesh & operator=(Mesh &&mesh)
void AddPrimitive(Primitive mesh_)
Definition: mesh.cc:21
SkMesh mesh
Definition: SkRecords.h:345
static SkColor4f transform(SkColor4f c, SkColorSpace *src, SkColorSpace *dst)
Definition: p3.cpp:47
A 4x4 matrix using column-major storage.
Definition: matrix.h:37
std::shared_ptr< Material > material
Definition: mesh.h:23
std::shared_ptr< Geometry > geometry
Definition: mesh.h:22