mat2x3.rst 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. .. default-domain:: C
  2. mat2x3
  3. ======
  4. Header: cglm/mat2x3.h
  5. Table of contents (click to go):
  6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  7. Macros:
  8. 1. GLM_MAT2X3_ZERO_INIT
  9. #. GLM_MAT2X3_ZERO
  10. Functions:
  11. 1. :c:func:`glm_mat2x3_copy`
  12. #. :c:func:`glm_mat2x3_zero`
  13. #. :c:func:`glm_mat2x3_make`
  14. #. :c:func:`glm_mat2x3_mul`
  15. #. :c:func:`glm_mat2x3_mulv`
  16. #. :c:func:`glm_mat2x3_transpose`
  17. #. :c:func:`glm_mat2x3_scale`
  18. Functions documentation
  19. ~~~~~~~~~~~~~~~~~~~~~~~
  20. .. c:function:: void glm_mat2x3_copy(mat2x3 mat, mat2x3 dest)
  21. copy mat2x3 to another one (dest).
  22. Parameters:
  23. | *[in]* **mat** source
  24. | *[out]* **dest** destination
  25. .. c:function:: void glm_mat2x3_zero(mat2x3 mat)
  26. make given matrix zero
  27. Parameters:
  28. | *[in,out]* **mat** matrix
  29. .. c:function:: void glm_mat2x3_make(float * __restrict src, mat2x3 dest)
  30. Create mat2x3 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 matrix2x3
  35. .. c:function:: void glm_mat2x3_mul(mat2x3 m1, mat3x2 m2, mat2 dest)
  36. multiply m1 and m2 to dest
  37. m1, m2 and dest matrices can be same matrix, it is possible to write this:
  38. .. code-block:: c
  39. glm_mat2x3_mul(m, m, m);
  40. Parameters:
  41. | *[in]* **m1** left matrix
  42. | *[in]* **m2** right matrix
  43. | *[out]* **dest** destination matrix
  44. .. c:function:: void glm_mat2x3_mulv(mat2x3 m, vec3 v, vec2 dest)
  45. multiply mat2x3 with vec3 (column vector) and store in dest vector
  46. Parameters:
  47. | *[in]* **m** mat2x3 (left)
  48. | *[in]* **v** vec3 (right, column vector)
  49. | *[out]* **dest** destination (result, column vector)
  50. .. c:function:: void glm_mat2x3_transpose(mat2x3 m, mat3x2 dest)
  51. transpose matrix and store in dest
  52. Parameters:
  53. | *[in]* **m** matrix
  54. | *[out]* **dest** destination
  55. .. c:function:: void glm_mat2x3_scale(mat2x3 m, float s)
  56. multiply matrix with scalar
  57. Parameters:
  58. | *[in, out]* **m** matrix
  59. | *[in]* **s** scalar