Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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#include <type_traits>
10
11#include "flutter/fml/macros.h"
15
16namespace impeller {
17namespace scene {
18
19class Skin;
20
21class Mesh final {
22 public:
23 struct Primitive {
24 std::shared_ptr<Geometry> geometry;
25 std::shared_ptr<Material> material;
26 };
27
30
31 Mesh(Mesh&& mesh);
33
34 void AddPrimitive(Primitive mesh_);
35 std::vector<Primitive>& GetPrimitives();
36
38 const Matrix& transform,
39 const std::shared_ptr<Texture>& joints) const;
40
41 private:
42 std::vector<Primitive> primitives_;
43
44 Mesh(const Mesh&) = delete;
45
46 Mesh& operator=(const Mesh&) = delete;
47};
48
49} // namespace scene
50} // namespace impeller
51
52#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
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:25
std::shared_ptr< Geometry > geometry
Definition mesh.h:24