1
0

mat3.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. * Copyright (c), Recep Aslantas.
  3. *
  4. * MIT License (MIT), http://opensource.org/licenses/MIT
  5. * Full license can be found in the LICENSE file
  6. */
  7. #ifndef cglmc_mat3_h
  8. #define cglmc_mat3_h
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. #include "../cglm.h"
  13. /* DEPRECATED! use _copy, _ucopy versions */
  14. #define glmc_mat3_dup(mat, dest) glmc_mat3_copy(mat, dest)
  15. CGLM_EXPORT
  16. void
  17. glmc_mat3_copy(mat3 mat, mat3 dest);
  18. CGLM_EXPORT
  19. void
  20. glmc_mat3_identity(mat3 mat);
  21. CGLM_EXPORT
  22. void
  23. glmc_mat3_zero(mat3 mat);
  24. CGLM_EXPORT
  25. void
  26. glmc_mat3_identity_array(mat3 * __restrict mat, size_t count);
  27. CGLM_EXPORT
  28. void
  29. glmc_mat3_mul(mat3 m1, mat3 m2, mat3 dest);
  30. CGLM_EXPORT
  31. void
  32. glmc_mat3_transpose_to(mat3 m, mat3 dest);
  33. CGLM_EXPORT
  34. void
  35. glmc_mat3_transpose(mat3 m);
  36. CGLM_EXPORT
  37. void
  38. glmc_mat3_mulv(mat3 m, vec3 v, vec3 dest);
  39. CGLM_EXPORT
  40. float
  41. glmc_mat3_trace(mat3 m);
  42. CGLM_EXPORT
  43. void
  44. glmc_mat3_quat(mat3 m, versor dest);
  45. CGLM_EXPORT
  46. void
  47. glmc_mat3_scale(mat3 m, float s);
  48. CGLM_EXPORT
  49. float
  50. glmc_mat3_det(mat3 mat);
  51. CGLM_EXPORT
  52. void
  53. glmc_mat3_inv(mat3 mat, mat3 dest);
  54. CGLM_EXPORT
  55. void
  56. glmc_mat3_swap_col(mat3 mat, int col1, int col2);
  57. CGLM_EXPORT
  58. void
  59. glmc_mat3_swap_row(mat3 mat, int row1, int row2);
  60. CGLM_EXPORT
  61. float
  62. glmc_mat3_rmc(vec3 r, mat3 m, vec3 c);
  63. CGLM_EXPORT
  64. void
  65. glmc_mat3_make(const float * __restrict src, mat3 dest);
  66. #ifdef __cplusplus
  67. }
  68. #endif
  69. #endif /* cglmc_mat3_h */