Hi,
I am not sure if I am missing something so please correct me if there already is an easier way to do this. Here's what I want to do:
Convert a mat4 transformation matrix to a mat3 rotation matrix (essentially dropping the translation part)
Convert it back to a mat4 with the translation part set to {0, 0, 0}
This is a pretty common operation for a bunch of 3D rendering related tasks. I have been doing that manually so far (the types are just linalg typedefs):
I am pretty sure in glm the mat3 and mat4 constructors allow you to do this as one liners. Is there a similar way to achieve this in linalg? Otherwise I think it might be useful to add utilities for these operations (not sure if this is beyond the scope of the library but these seem to be very common operations to me).
Hi, I am not sure if I am missing something so please correct me if there already is an easier way to do this. Here's what I want to do:
mat4
transformation matrix to amat3
rotation matrix (essentially dropping the translation part)mat4
with the translation part set to{0, 0, 0}
This is a pretty common operation for a bunch of 3D rendering related tasks. I have been doing that manually so far (the types are just linalg typedefs):
I am pretty sure in
glm
themat3
andmat4
constructors allow you to do this as one liners. Is there a similar way to achieve this in linalg? Otherwise I think it might be useful to add utilities for these operations (not sure if this is beyond the scope of the library but these seem to be very common operations to me).Thanks!