mat2x4.rst 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. .. default-domain:: C
  2. mat2x4
  3. ======
  4. Header: cglm/mat2x4.h
  5. Table of contents (click to go):
  6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  7. Macros:
  8. 1. GLM_MAT2X4_ZERO_INIT
  9. #. GLM_MAT2X4_ZERO
  10. Functions:
  11. 1. :c:func:`glm_mat2x4_copy`
  12. #. :c:func:`glm_mat2x4_zero`
  13. #. :c:func:`glm_mat2x4_make`
  14. #. :c:func:`glm_mat2x4_mul`
  15. #. :c:func:`glm_mat2x4_mulv`
  16. #. :c:func:`glm_mat2x4_transpose`
  17. #. :c:func:`glm_mat2x4_scale`
  18. Functions documentation
  19. ~~~~~~~~~~~~~~~~~~~~~~~
  20. .. c:function:: void glm_mat2x4_copy(mat2x4 mat, mat2x4 dest)
  21. copy mat2x4 to another one (dest).
  22. Parameters:
  23. | *[in]* **mat** source
  24. | *[out]* **dest** destination
  25. .. c:function:: void glm_mat2x4_zero(mat2x4 mat)
  26. make given matrix zero
  27. Parameters:
  28. | *[in,out]* **mat** matrix
  29. .. c:function:: void glm_mat2x4_make(float * __restrict src, mat2x4 dest)
  30. Create mat2x4 matrix from pointer
  31. .. note:: **@src** must contain at least 8 elements.
  32. Parameters:
  33. | *[in]* **src** pointer to an array of floats
  34. | *[out]* **dest** destination matrix2x4
  35. .. c:function:: void glm_mat2x4_mul(mat2x4 m1, mat4x2 m2, mat2 dest)
  36. multiply m1 and m2 to dest
  37. .. code-block:: c
  38. glm_mat2x4_mul(mat2x4, mat4x2, mat2);
  39. Parameters:
  40. | *[in]* **m1** left matrix (mat2x4)
  41. | *[in]* **m2** right matrix (mat4x2)
  42. | *[out]* **dest** destination matrix (mat2)
  43. .. c:function:: void glm_mat2x4_mulv(mat2x4 m, vec4 v, vec2 dest)
  44. multiply mat2x4 with vec4 (column vector) and store in dest vector
  45. Parameters:
  46. | *[in]* **m** mat2x4 (left)
  47. | *[in]* **v** vec4 (right, column vector)
  48. | *[out]* **dest** destination (result, column vector)
  49. .. c:function:: void glm_mat2x4_transpose(mat2x4 m, mat4x2 dest)
  50. transpose matrix and store in dest
  51. Parameters:
  52. | *[in]* **m** matrix
  53. | *[out]* **dest** destination
  54. .. c:function:: void glm_mat2x4_scale(mat2x4 m, float s)
  55. multiply matrix with scalar
  56. Parameters:
  57. | *[in, out]* **m** matrix
  58. | *[in]* **s** scalar