diff options
Diffstat (limited to 'src/maths/maths.h')
-rw-r--r-- | src/maths/maths.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/maths/maths.h b/src/maths/maths.h index d832739..390b611 100644 --- a/src/maths/maths.h +++ b/src/maths/maths.h @@ -207,8 +207,10 @@ static transform transform_create(vec3 pos, quat rot, f32 scale) { } static inline mat4 transform_to_mat(transform *tf) { - // TODO: rotation - return mat4_mult(mat4_translation(tf->position), mat4_scale(tf->scale)); + mat4 trans = mat4_translation(tf->position); + mat4 rot = mat4_rotation(tf->rotation); + mat4 scale = mat4_scale(tf->scale); + return mat4_mult(trans, mat4_mult(rot, scale)); } // --- Sizing asserts |