mat4x3.rst 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. .. default-domain:: C
  2. mat4x3
  3. ======
  4. Header: cglm/mat4x3.h
  5. Table of contents (click to go):
  6. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  7. Macros:
  8. 1. GLM_MAT4X3_ZERO_INIT
  9. #. GLM_MAT4X3_ZERO
  10. Functions:
  11. 1. :c:func:`glm_mat4x3_copy`
  12. #. :c:func:`glm_mat4x3_zero`
  13. #. :c:func:`glm_mat4x3_make`
  14. #. :c:func:`glm_mat4x3_mul`
  15. #. :c:func:`glm_mat4x3_mulv`
  16. #. :c:func:`glm_mat4x3_transpose`
  17. #. :c:func:`glm_mat4x3_scale`
  18. Functions documentation
  19. ~~~~~~~~~~~~~~~~~~~~~~~
  20. .. c:function:: void glm_mat4x3_copy(mat4x3 mat, mat4x3 dest)
  21. copy mat4x3 to another one (dest).
  22. Parameters:
  23. | *[in]* **mat** source
  24. | *[out]* **dest** destination
  25. .. c:function:: void glm_mat4x3_zero(mat4x3 mat)
  26. make given matrix zero
  27. Parameters:
  28. | *[in,out]* **mat** matrix
  29. .. c:function:: void glm_mat4x3_make(float * __restrict src, mat4x3 dest)
  30. Create mat4x3 matrix from pointer
  31. | NOTE: **@src** must contain at least 12 elements.
  32. Parameters:
  33. | *[in]* **src** pointer to an array of floats
  34. | *[out]* **dest** destination matrix4x3
  35. .. c:function:: void glm_mat4x3_mul(mat4x3 m1, mat3x4 m2, mat4 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_mat4x3_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_mat4x3_mulv(mat4x3 m, vec3 v, vec4 dest)
  45. multiply mat4x3 with vec3 (column vector) and store in dest vector
  46. Parameters:
  47. | *[in]* **m** mat4x3 (left)
  48. | *[in]* **v** vec3 (right, column vector)
  49. | *[out]* **dest** destination (result, column vector)
  50. .. c:function:: void glm_mat4x3_transpose(mat4x3 m, mat3x4 dest)
  51. transpose matrix and store in dest
  52. Parameters:
  53. | *[in]* **m** matrix
  54. | *[out]* **dest** destination
  55. .. c:function:: void glm_mat4x3_scale(mat4x3 m, float s)
  56. multiply matrix with scalar
  57. Parameters:
  58. | *[in, out]* **m** matrix
  59. | *[in]* **s** scalar