diff options
| author | realtradam <[email protected]> | 2023-06-16 01:15:57 -0400 |
|---|---|---|
| committer | realtradam <[email protected]> | 2023-06-16 01:15:57 -0400 |
| commit | 94625b3133193acd22b68595fe922b7228528b11 (patch) | |
| tree | f7e358545f5043df20695d0cf51dcf8caa10cb12 /src/math/rodeo_mat4.c | |
| parent | acc9db32d765728b63162d6fc74a278d0da10b83 (diff) | |
| download | RodeoKit-matrixtemp.tar.gz RodeoKit-matrixtemp.zip | |
fix matrix wrapper as well as a lot of refactoring cleanupmatrixtemp
Diffstat (limited to 'src/math/rodeo_mat4.c')
| -rw-r--r-- | src/math/rodeo_mat4.c | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/src/math/rodeo_mat4.c b/src/math/rodeo_mat4.c index 958e123..70d0226 100644 --- a/src/math/rodeo_mat4.c +++ b/src/math/rodeo_mat4.c @@ -2,6 +2,7 @@ // -- internal -- // public #include "rodeo/math.h" +#include "rodeo/log.h" // private #include "math/irodeo_math.h" @@ -35,12 +36,50 @@ irodeo_math_rodeoMat4_to_cglmMat4(rodeo_math_mat4_t in) in.val.m20, in.val.m21, in.val.m22, in.val.m23 }, { - in.val.m20, in.val.m21, in.val.m22, in.val.m23 + in.val.m30, in.val.m31, in.val.m32, in.val.m33 }, } }; } +void +irodeo_print_matrix(rodeo_math_mat4_t mat) +{ + rodeo_log( + rodeo_logLevel_warning, + "%.05f, %.05f, %.05f, %.05f", + mat.raw[0][0], + mat.raw[0][1], + mat.raw[0][2], + mat.raw[0][3] + ); + rodeo_log( + rodeo_logLevel_info, + "%.05f, %.05f, %.05f, %.05f", + mat.raw[1][0], + mat.raw[1][1], + mat.raw[1][2], + mat.raw[1][3] + ); + rodeo_log( + rodeo_logLevel_info, + "%.05f, %.05f, %.05f, %.05f", + mat.raw[2][0], + mat.raw[2][1], + mat.raw[2][2], + mat.raw[2][3] + ); + rodeo_log( + rodeo_logLevel_info, + "%.05f, %.05f, %.05f, %.05f", + mat.raw[3][0], + mat.raw[3][1], + mat.raw[3][2], + mat.raw[3][3] + ); +} + + rodeo_math_mat4_t rodeo_math_mat4_identity(void) { |
