Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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#ifndef FLUTTER_IMPELLER_SCENE_IMPORTER_CONVERSIONS_H_
6#define FLUTTER_IMPELLER_SCENE_IMPORTER_CONVERSIONS_H_
7
8#include <cstddef>
9#include <map>
10#include <vector>
11
13#include "impeller/scene/importer/scene_flatbuffers.h"
14
15namespace impeller {
16namespace scene {
17namespace importer {
18
19Matrix ToMatrix(const std::vector<double>& m);
20
21//-----------------------------------------------------------------------------
22/// Flatbuffers -> Impeller
23///
24
25Matrix ToMatrix(const fb::Matrix& m);
26
27Vector2 ToVector2(const fb::Vec2& c);
28
29Vector3 ToVector3(const fb::Vec3& c);
30
31Vector4 ToVector4(const fb::Vec4& c);
32
33Color ToColor(const fb::Color& c);
34
35//-----------------------------------------------------------------------------
36/// Impeller -> Flatbuffers
37///
38
39fb::Matrix ToFBMatrix(const Matrix& m);
40
41std::unique_ptr<fb::Matrix> ToFBMatrixUniquePtr(const Matrix& m);
42
43fb::Vec2 ToFBVec2(const Vector2 v);
44
45fb::Vec3 ToFBVec3(const Vector3 v);
46
47fb::Vec4 ToFBVec4(const Vector4 v);
48
49fb::Color ToFBColor(const Color c);
50
51std::unique_ptr<fb::Color> ToFBColor(const std::vector<double>& c);
52
53} // namespace importer
54} // namespace scene
55} // namespace impeller
56
57#endif // FLUTTER_IMPELLER_SCENE_IMPORTER_CONVERSIONS_H_
fb::Vec3 ToFBVec3(const Vector3 v)
fb::Vec4 ToFBVec4(const Vector4 v)
std::unique_ptr< fb::Matrix > ToFBMatrixUniquePtr(const Matrix &m)
fb::Vec2 ToFBVec2(const Vector2 v)
fb::Color ToFBColor(const Color c)
Matrix ToMatrix(const std::vector< double > &m)
Color ToColor(const fb::Color &c)
Vector3 ToVector3(const fb::Vec3 &v)
fb::Matrix ToFBMatrix(const Matrix &m)
Vector4 ToVector4(const fb::Vec4 &v)
Vector2 ToVector2(const fb::Vec2 &v)
Point Vector2
Definition point.h:320