| Flutter Impeller |

conversions.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 #pragma once
6
7 #include <cstddef>
8 #include <map>
9 #include <vector>
10
11 #include "impeller/geometry/matrix.h"
12 #include "impeller/scene/importer/scene_flatbuffers.h"
13
14 namespace impeller {
15 namespace scene {
16 namespace importer {
17
18 Matrix ToMatrix(const std::vector<double>& m);
19
20 //-----------------------------------------------------------------------------
21 /// Flatbuffers -> Impeller
22 ///
23
24 Matrix ToMatrix(const fb::Matrix& m);
25
26 Vector2 ToVector2(const fb::Vec2& c);
27
28 Vector3 ToVector3(const fb::Vec3& c);
29
30 Vector4 ToVector4(const fb::Vec4& c);
31
32 Color ToColor(const fb::Color& c);
33
34 //-----------------------------------------------------------------------------
35 /// Impeller -> Flatbuffers
36 ///
37
38 fb::Matrix ToFBMatrix(const Matrix& m);
39
40 std::unique_ptr<fb::Matrix> ToFBMatrixUniquePtr(const Matrix& m);
41
42 fb::Vec2 ToFBVec2(const Vector2 v);
43
44 fb::Vec3 ToFBVec3(const Vector3 v);
45
46 fb::Vec4 ToFBVec4(const Vector4 v);
47
48 fb::Color ToFBColor(const Color c);
49
50 std::unique_ptr<fb::Color> ToFBColor(const std::vector<double>& c);
51
52 } // namespace importer
53 } // namespace scene
54 } // namespace impeller
impeller::Vector2
Point Vector2
Definition: point.h:310
impeller::scene::importer::ToVector4
Vector4 ToVector4(const fb::Vec4 &v)
Definition: conversions.cc:42
impeller::scene::importer::ToFBVec2
fb::Vec2 ToFBVec2(const Vector2 v)
Definition: conversions.cc:70
matrix.h
impeller::scene::importer::ToFBMatrix
fb::Matrix ToFBMatrix(const Matrix &m)
Definition: conversions.cc:54
impeller::scene::importer::ToColor
Color ToColor(const fb::Color &c)
Definition: conversions.cc:46
impeller::scene::importer::ToFBVec3
fb::Vec3 ToFBVec3(const Vector3 v)
Definition: conversions.cc:74
impeller::scene::importer::ToVector3
Vector3 ToVector3(const fb::Vec3 &v)
Definition: conversions.cc:38
impeller::scene::importer::ToVector2
Vector2 ToVector2(const fb::Vec2 &v)
Definition: conversions.cc:34
impeller::scene::importer::ToFBColor
fb::Color ToFBColor(const Color c)
Definition: conversions.cc:82
impeller::scene::importer::ToFBMatrixUniquePtr
std::unique_ptr< fb::Matrix > ToFBMatrixUniquePtr(const Matrix &m)
Definition: conversions.cc:62
impeller
Definition: aiks_context.cc:10
impeller::scene::importer::ToMatrix
Matrix ToMatrix(const std::vector< double > &m)
Definition: conversions.cc:15
impeller::scene::importer::ToFBVec4
fb::Vec4 ToFBVec4(const Vector4 v)
Definition: conversions.cc:78