summaryrefslogtreecommitdiff
path: root/include/mbgl/util
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2015-11-16 16:32:09 +0100
committerKonstantin Käfer <mail@kkaefer.com>2015-12-15 11:41:58 -0800
commit4fc8226838a23154ca8acc5e5fcb6144de0794cb (patch)
treeac2354fda5e9bca147d7eb3f5bdddbaa291dc319 /include/mbgl/util
parent62412af6ab746dd8fb5b8984c75b3ff6e6b223e5 (diff)
downloadqtlocation-mapboxgl-4fc8226838a23154ca8acc5e5fcb6144de0794cb.tar.gz
[core] allow changing the orientation
You can now change the orientation of north to be to the right, bottom, left in addition to the default of top
Diffstat (limited to 'include/mbgl/util')
-rw-r--r--include/mbgl/util/geo.hpp8
-rw-r--r--include/mbgl/util/mat4.hpp1
2 files changed, 9 insertions, 0 deletions
diff --git a/include/mbgl/util/geo.hpp b/include/mbgl/util/geo.hpp
index 2f0e4f6fdc..e815456f22 100644
--- a/include/mbgl/util/geo.hpp
+++ b/include/mbgl/util/geo.hpp
@@ -100,6 +100,14 @@ struct MetersBounds {
}
};
+// Determines the orientation of the map.
+enum class NorthOrientation : uint8_t {
+ Upwards, // Default
+ Rightwards,
+ Downwards,
+ Leftwards,
+};
+
} // namespace mbgl
#endif
diff --git a/include/mbgl/util/mat4.hpp b/include/mbgl/util/mat4.hpp
index e5b508e547..59f6e3ee00 100644
--- a/include/mbgl/util/mat4.hpp
+++ b/include/mbgl/util/mat4.hpp
@@ -38,6 +38,7 @@ void perspective(mat4& out, double fovy, double aspect, double near, double far)
void copy(mat4& out, const mat4& a);
void translate(mat4& out, const mat4& a, double x, double y, double z);
void rotate_x(mat4& out, const mat4& a, double rad);
+void rotate_y(mat4& out, const mat4& a, double rad);
void rotate_z(mat4& out, const mat4& a, double rad);
void scale(mat4& out, const mat4& a, double x, double y, double z);
void multiply(mat4& out, const mat4& a, const mat4& b);