Move vector types to a public header
This commit is contained in:
committed by
Mikko Pulkki
parent
0895c698d9
commit
c2294ad68d
@@ -275,6 +275,7 @@ add_library(
|
||||
${PROJECT_SOURCE_DIR}/include/mbgl/util/unitbezier.hpp
|
||||
${PROJECT_SOURCE_DIR}/include/mbgl/util/util.hpp
|
||||
${PROJECT_SOURCE_DIR}/include/mbgl/util/variant.hpp
|
||||
${PROJECT_SOURCE_DIR}/include/mbgl/util/vectors.hpp
|
||||
${PROJECT_SOURCE_DIR}/include/mbgl/util/work_request.hpp
|
||||
${PROJECT_SOURCE_DIR}/include/mbgl/util/work_task.hpp
|
||||
${PROJECT_SOURCE_DIR}/include/mbgl/util/work_task_impl.hpp
|
||||
|
||||
13
include/mbgl/util/vectors.hpp
Normal file
13
include/mbgl/util/vectors.hpp
Normal file
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
using vec2 = std::array<double, 2>;
|
||||
using vec3 = std::array<double, 3>;
|
||||
using vec3f = std::array<float, 3>;
|
||||
using vec3i = std::array<int, 3>;
|
||||
using vec4 = std::array<double, 4>;
|
||||
|
||||
} // namespace mbgl
|
||||
@@ -24,12 +24,10 @@
|
||||
|
||||
#include <array>
|
||||
#include <cmath>
|
||||
#include <mbgl/util/vectors.hpp>
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
using vec3 = std::array<double, 3>;
|
||||
using vec3f = std::array<float, 3>;
|
||||
using vec3i = std::array<int, 3>;
|
||||
using mat3 = std::array<double, 9>;
|
||||
|
||||
inline vec3 vec3Cross(const vec3& a, const vec3& b) {
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <mbgl/util/vectors.hpp>
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
using vec4 = std::array<double, 4>;
|
||||
using mat4 = std::array<double, 16>;
|
||||
|
||||
namespace matrix {
|
||||
|
||||
Reference in New Issue
Block a user