mat4: add new function glm_mat4_make

Function takes in a 16 element float array
and converts it into a mat4 matrix.

Signed-off-by: Vincent Davis Jr <vince@underview.tech>
This commit is contained in:
Vincent Davis Jr
2023-05-13 16:45:34 -05:00
parent 9772948831
commit e17f115f91
7 changed files with 77 additions and 0 deletions

View File

@@ -459,4 +459,17 @@ glms_mat4_(rmc)(vec4s r, mat4s m, vec4s c) {
return glm_mat4_rmc(r.raw, m.raw, c.raw);
}
/*!
* @brief Create mat4 matrix from pointer
*
* @param[in] src pointer to an array of floats
* @param[out] dest matrix
*/
CGLM_INLINE
mat4s
glms_mat4_(make)(float * __restrict src, mat4s dest) {
glm_mat4_make(src, dest.raw);
return dest;
}
#endif /* cglms_mat4s_h */