aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfgang Draxinger <Wolfgang.Draxinger@draxit.de>2014-09-23 14:41:10 +0200
committerWolfgang Draxinger <Wolfgang.Draxinger@draxit.de>2014-09-23 14:41:10 +0200
commit49c182396520245a96994dac57781a379205ffc9 (patch)
treed28e8be3056b0b76520cb9eeb3833b0d3ea92be8
parent5fd4a228ade0918d00f3fe37227c827f0075b0f4 (diff)
downloadlinmath-49c182396520245a96994dac57781a379205ffc9.tar.gz
linmath-49c182396520245a96994dac57781a379205ffc9.tar.xz
linmath-49c182396520245a96994dac57781a379205ffc9.zip
mat4x4_mul_quat in its current form can be used only for orthogonal matrices, renamed to mat4x4o_mul_quat
-rw-r--r--linmath.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/linmath.h b/linmath.h
index d4237f5..d5c4084 100644
--- a/linmath.h
+++ b/linmath.h
@@ -530,8 +530,11 @@ static inline void mat4x4_from_quat(mat4x4 M, quat q)
M[3][0] = M[3][1] = M[3][2] = 0.f;
M[3][3] = 1.f;
}
-static inline void mat4x4_mul_quat(mat4x4 R, mat4x4 M, quat q)
+
+static inline void mat4x4o_mul_quat(mat4x4 R, mat4x4 M, quat q)
{
+/* XXX: The way this is written only works for othogonal matrices. */
+/* TODO: Take care of non-orthogonal case. */
quat_mul_vec3(R[0], q, M[0]);
quat_mul_vec3(R[1], q, M[1]);
quat_mul_vec3(R[2], q, M[2]);