From 49c182396520245a96994dac57781a379205ffc9 Mon Sep 17 00:00:00 2001 From: Wolfgang Draxinger Date: Tue, 23 Sep 2014 14:41:10 +0200 Subject: mat4x4_mul_quat in its current form can be used only for orthogonal matrices, renamed to mat4x4o_mul_quat --- linmath.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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]); -- cgit v1.2.3