summaryrefslogtreecommitdiff
path: root/src/mbgl/util
diff options
context:
space:
mode:
authorzmiao <miao.zhao@mapbox.com>2019-12-05 18:58:48 +0200
committerGitHub <noreply@github.com>2019-12-05 18:58:48 +0200
commit9f3a384296f019b1b3719b39389ae5be995a4d37 (patch)
treed34f24778c3f4541295ea6ae7f7516bd2b656ff2 /src/mbgl/util
parente619552a5df5fdfa3c95efa0959ff2da20eac452 (diff)
downloadqtlocation-mapboxgl-9f3a384296f019b1b3719b39389ae5be995a4d37.tar.gz
[core] Refactoring transform state (#15956)
* [core] Refactoring transform state class * [core] update matrix in transform, Fix precision * [core] Make matrix mutable so that we only update them when needed * [core] Add getters for matrices
Diffstat (limited to 'src/mbgl/util')
-rw-r--r--src/mbgl/util/mat4.cpp2
-rw-r--r--src/mbgl/util/mat4.hpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mbgl/util/mat4.cpp b/src/mbgl/util/mat4.cpp
index 0ad0d371e5..2f7d35a5be 100644
--- a/src/mbgl/util/mat4.cpp
+++ b/src/mbgl/util/mat4.cpp
@@ -47,7 +47,7 @@ void identity(mat4& out) {
out[15] = 1.0f;
}
-bool invert(mat4& out, mat4& a) {
+bool invert(mat4& out, const mat4& a) {
double a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],
a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],
a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],
diff --git a/src/mbgl/util/mat4.hpp b/src/mbgl/util/mat4.hpp
index 2adeba8821..438771949f 100644
--- a/src/mbgl/util/mat4.hpp
+++ b/src/mbgl/util/mat4.hpp
@@ -32,7 +32,7 @@ using mat4 = std::array<double, 16>;
namespace matrix {
void identity(mat4& out);
-bool invert(mat4& out, mat4& a);
+bool invert(mat4& out, const mat4& a);
void ortho(mat4& out, double left, double right, double bottom, double top, double near, double far);
void perspective(mat4& out, double fovy, double aspect, double near, double far);
void copy(mat4& out, const mat4& a);