diff options
author | Omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-03-17 14:59:35 +1100 |
---|---|---|
committer | Omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-03-17 14:59:35 +1100 |
commit | 1afe4876cb8133c5b47fdcfeb07decc5565c4844 (patch) | |
tree | 23c945a7b9f4cdef1cc74879548856a21a437313 /src/maths/maths.h | |
parent | a466cc429d8017eb0ee22237f5683cc75791fe85 (diff) |
wip: transform propagation
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 |