mat3x2.rst 2.1 KB

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