summaryrefslogtreecommitdiff
path: root/src/maths/maths.h
diff options
context:
space:
mode:
authorOmniscient <17525998+omnisci3nce@users.noreply.github.com>2024-03-17 14:59:35 +1100
committerOmniscient <17525998+omnisci3nce@users.noreply.github.com>2024-03-17 14:59:35 +1100
commit1afe4876cb8133c5b47fdcfeb07decc5565c4844 (patch)
tree23c945a7b9f4cdef1cc74879548856a21a437313 /src/maths/maths.h
parenta466cc429d8017eb0ee22237f5683cc75791fe85 (diff)
wip: transform propagation
Diffstat (limited to 'src/maths/maths.h')
-rw-r--r--src/maths/maths.h6
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