| Flutter Impeller |

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
10 #include "impeller/scene/geometry.h"
11 #include "impeller/scene/material.h"
12 #include "impeller/scene/scene_encoder.h"
13
14 namespace impeller {
15 namespace scene {
16
17 class Skin;
18
19 class Mesh final {
20 public:
21 struct Primitive {
22 std::shared_ptr<Geometry> geometry;
23 std::shared_ptr<Material> material;
24 };
25
26 Mesh();
27 ~Mesh();
28
29 Mesh(Mesh&& mesh);
30 Mesh& operator=(Mesh&& mesh);
31
32 void AddPrimitive(Primitive mesh_);
33 std::vector<Primitive>& GetPrimitives();
34
35 bool Render(SceneEncoder& encoder,
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_
impeller::scene::Mesh::GetPrimitives
std::vector< Primitive > & GetPrimitives()
Definition: mesh.cc:32
impeller::scene::Mesh
Definition: mesh.h:19
impeller::scene::Mesh::Mesh
Mesh()
impeller::scene::Mesh::Primitive
Definition: mesh.h:21
scene_encoder.h
impeller::scene::Mesh::Render
bool Render(SceneEncoder &encoder, const Matrix &transform, const std::shared_ptr< Texture > &joints) const
Definition: mesh.cc:36
material.h
transform
Matrix transform
Definition: gaussian_blur_filter_contents.cc:231
impeller::scene::Mesh::AddPrimitive
void AddPrimitive(Primitive mesh_)
Definition: mesh.cc:21
impeller::scene::Mesh::~Mesh
~Mesh()
impeller::scene::Mesh::Primitive::material
std::shared_ptr< Material > material
Definition: mesh.h:23
geometry.h
impeller::scene::SceneEncoder
Definition: scene_encoder.h:28
impeller
Definition: aiks_blend_unittests.cc:18
impeller::scene::Mesh::Primitive::geometry
std::shared_ptr< Geometry > geometry
Definition: mesh.h:22
impeller::scene::Mesh::operator=
Mesh & operator=(Mesh &&mesh)
impeller::Matrix
A 4x4 matrix using column-major storage.
Definition: matrix.h:37