mirror of
https://github.com/recp/cglm.git
synced 2025-10-03 16:51:35 +00:00
docs: add missing non-square matrix funcs
Functions include: * glm_mat#x#_copy * glm_mat#x#_zero * glm_mat#x#_mul * glm_mat#x#_mulv * glm_mat#x#_transpose * glm_mat#x#_scale Commit also includes some minor changes to * mat2 * mat3 * mat4 Signed-off-by: Vincent Davis Jr <vince@underview.tech>
This commit is contained in:
@@ -65,11 +65,12 @@ Functions documentation
|
||||
make given matrix zero
|
||||
|
||||
Parameters:
|
||||
| *[in,out]* **mat** matrix to
|
||||
| *[in,out]* **mat** matrix
|
||||
|
||||
.. c:function:: void glm_mat2_mul(mat2 m1, mat2 m2, mat2 dest)
|
||||
|
||||
multiply m1 and m2 to dest
|
||||
|
||||
m1, m2 and dest matrices can be same matrix, it is possible to write this:
|
||||
|
||||
.. code-block:: c
|
||||
@@ -101,7 +102,7 @@ Functions documentation
|
||||
|
||||
.. c:function:: void glm_mat2_mulv(mat2 m, vec2 v, vec2 dest)
|
||||
|
||||
multiply mat4 with vec4 (column vector) and store in dest vector
|
||||
multiply mat2 with vec2 (column vector) and store in dest vector
|
||||
|
||||
Parameters:
|
||||
| *[in]* **mat** mat2 (left)
|
||||
@@ -113,8 +114,8 @@ Functions documentation
|
||||
multiply matrix with scalar
|
||||
|
||||
Parameters:
|
||||
| *[in, out]* **mat** matrix
|
||||
| *[in]* **dest** scalar
|
||||
| *[in, out]* **m** matrix
|
||||
| *[in]* **s** scalar
|
||||
|
||||
.. c:function:: float glm_mat2_det(mat2 mat)
|
||||
|
||||
|
@@ -15,11 +15,32 @@ Macros:
|
||||
|
||||
Functions:
|
||||
|
||||
1. :c:func:`glm_mat2x3_make`
|
||||
1. :c:func:`glm_mat2x3_copy`
|
||||
#. :c:func:`glm_mat2x3_zero`
|
||||
#. :c:func:`glm_mat2x3_make`
|
||||
#. :c:func:`glm_mat2x3_mul`
|
||||
#. :c:func:`glm_mat2x3_mulv`
|
||||
#. :c:func:`glm_mat2x3_transpose`
|
||||
#. :c:func:`glm_mat2x3_scale`
|
||||
|
||||
Functions documentation
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. c:function:: void glm_mat2x3_copy(mat2x3 mat, mat2x3 dest)
|
||||
|
||||
copy mat2x3 to another one (dest).
|
||||
|
||||
Parameters:
|
||||
| *[in]* **mat** source
|
||||
| *[out]* **dest** destination
|
||||
|
||||
.. c:function:: void glm_mat2x3_zero(mat2x3 mat)
|
||||
|
||||
make given matrix zero
|
||||
|
||||
Parameters:
|
||||
| *[in,out]* **mat** matrix
|
||||
|
||||
.. c:function:: void glm_mat2x3_make(float * __restrict src, mat2x3 dest)
|
||||
|
||||
Create mat2x3 matrix from pointer
|
||||
@@ -29,3 +50,43 @@ Functions documentation
|
||||
Parameters:
|
||||
| *[in]* **src** pointer to an array of floats
|
||||
| *[out]* **dest** destination matrix2x3
|
||||
|
||||
.. c:function:: void glm_mat2x3_mul(mat2x3 m1, mat3x2 m2, mat2 dest)
|
||||
|
||||
multiply m1 and m2 to dest
|
||||
|
||||
m1, m2 and dest matrices can be same matrix, it is possible to write this:
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
glm_mat2x3_mul(m, m, m);
|
||||
|
||||
Parameters:
|
||||
| *[in]* **m1** left matrix
|
||||
| *[in]* **m2** right matrix
|
||||
| *[out]* **dest** destination matrix
|
||||
|
||||
.. c:function:: void glm_mat2x3_mulv(mat2x3 m, vec3 v, vec2 dest)
|
||||
|
||||
multiply mat2x3 with vec3 (column vector) and store in dest vector
|
||||
|
||||
Parameters:
|
||||
| *[in]* **m** mat2x3 (left)
|
||||
| *[in]* **v** vec3 (right, column vector)
|
||||
| *[out]* **dest** destination (result, column vector)
|
||||
|
||||
.. c:function:: void glm_mat2x3_transpose(mat2x3 m, mat3x2 dest)
|
||||
|
||||
transpose matrix and store in dest
|
||||
|
||||
Parameters:
|
||||
| *[in]* **m** matrix
|
||||
| *[out]* **dest** destination
|
||||
|
||||
.. c:function:: void glm_mat2x3_scale(mat2x3 m, float s)
|
||||
|
||||
multiply matrix with scalar
|
||||
|
||||
Parameters:
|
||||
| *[in, out]* **m** matrix
|
||||
| *[in]* **s** scalar
|
||||
|
@@ -15,11 +15,32 @@ Macros:
|
||||
|
||||
Functions:
|
||||
|
||||
1. :c:func:`glm_mat2x4_make`
|
||||
1. :c:func:`glm_mat2x4_copy`
|
||||
#. :c:func:`glm_mat2x4_zero`
|
||||
#. :c:func:`glm_mat2x4_make`
|
||||
#. :c:func:`glm_mat2x4_mul`
|
||||
#. :c:func:`glm_mat2x4_mulv`
|
||||
#. :c:func:`glm_mat2x4_transpose`
|
||||
#. :c:func:`glm_mat2x4_scale`
|
||||
|
||||
Functions documentation
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. c:function:: void glm_mat2x4_copy(mat2x4 mat, mat2x4 dest)
|
||||
|
||||
copy mat2x4 to another one (dest).
|
||||
|
||||
Parameters:
|
||||
| *[in]* **mat** source
|
||||
| *[out]* **dest** destination
|
||||
|
||||
.. c:function:: void glm_mat2x4_zero(mat2x4 mat)
|
||||
|
||||
make given matrix zero
|
||||
|
||||
Parameters:
|
||||
| *[in,out]* **mat** matrix
|
||||
|
||||
.. c:function:: void glm_mat2x4_make(float * __restrict src, mat2x4 dest)
|
||||
|
||||
Create mat2x4 matrix from pointer
|
||||
@@ -29,3 +50,43 @@ Functions documentation
|
||||
Parameters:
|
||||
| *[in]* **src** pointer to an array of floats
|
||||
| *[out]* **dest** destination matrix2x4
|
||||
|
||||
.. c:function:: void glm_mat2x4_mul(mat2x4 m1, mat4x2 m2, mat2 dest)
|
||||
|
||||
multiply m1 and m2 to dest
|
||||
|
||||
m1, m2 and dest matrices can be same matrix, it is possible to write this:
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
glm_mat2x4_mul(m, m, m);
|
||||
|
||||
Parameters:
|
||||
| *[in]* **m1** left matrix
|
||||
| *[in]* **m2** right matrix
|
||||
| *[out]* **dest** destination matrix
|
||||
|
||||
.. c:function:: void glm_mat2x4_mulv(mat2x4 m, vec4 v, vec2 dest)
|
||||
|
||||
multiply mat2x4 with vec4 (column vector) and store in dest vector
|
||||
|
||||
Parameters:
|
||||
| *[in]* **m** mat2x4 (left)
|
||||
| *[in]* **v** vec4 (right, column vector)
|
||||
| *[out]* **dest** destination (result, column vector)
|
||||
|
||||
.. c:function:: void glm_mat2x4_transpose(mat2x4 m, mat4x2 dest)
|
||||
|
||||
transpose matrix and store in dest
|
||||
|
||||
Parameters:
|
||||
| *[in]* **m** matrix
|
||||
| *[out]* **dest** destination
|
||||
|
||||
.. c:function:: void glm_mat2x4_scale(mat2x4 m, float s)
|
||||
|
||||
multiply matrix with scalar
|
||||
|
||||
Parameters:
|
||||
| *[in, out]* **m** matrix
|
||||
| *[in]* **s** scalar
|
||||
|
@@ -72,6 +72,7 @@ Functions documentation
|
||||
.. c:function:: void glm_mat3_mul(mat3 m1, mat3 m2, mat3 dest)
|
||||
|
||||
multiply m1 and m2 to dest
|
||||
|
||||
m1, m2 and dest matrices can be same matrix, it is possible to write this:
|
||||
|
||||
.. code-block:: c
|
||||
@@ -103,10 +104,10 @@ Functions documentation
|
||||
|
||||
.. c:function:: void glm_mat3_mulv(mat3 m, vec3 v, vec3 dest)
|
||||
|
||||
multiply mat4 with vec4 (column vector) and store in dest vector
|
||||
multiply mat3 with vec3 (column vector) and store in dest vector
|
||||
|
||||
Parameters:
|
||||
| *[in]* **mat** mat3 (left)
|
||||
| *[in]* **m** mat3 (left)
|
||||
| *[in]* **v** vec3 (right, column vector)
|
||||
| *[out]* **dest** destination (result, column vector)
|
||||
|
||||
@@ -123,8 +124,8 @@ Functions documentation
|
||||
multiply matrix with scalar
|
||||
|
||||
Parameters:
|
||||
| *[in, out]* **mat** matrix
|
||||
| *[in]* **dest** scalar
|
||||
| *[in, out]* **m** matrix
|
||||
| *[in]* **s** scalar
|
||||
|
||||
.. c:function:: float glm_mat3_det(mat3 mat)
|
||||
|
||||
|
@@ -15,11 +15,32 @@ Macros:
|
||||
|
||||
Functions:
|
||||
|
||||
1. :c:func:`glm_mat3x2_make`
|
||||
1. :c:func:`glm_mat3x2_copy`
|
||||
#. :c:func:`glm_mat3x2_zero`
|
||||
#. :c:func:`glm_mat3x2_make`
|
||||
#. :c:func:`glm_mat3x2_mul`
|
||||
#. :c:func:`glm_mat3x2_mulv`
|
||||
#. :c:func:`glm_mat3x2_transpose`
|
||||
#. :c:func:`glm_mat3x2_scale`
|
||||
|
||||
Functions documentation
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. c:function:: void glm_mat3x2_copy(mat3x2 mat, mat3x2 dest)
|
||||
|
||||
copy mat3x2 to another one (dest).
|
||||
|
||||
Parameters:
|
||||
| *[in]* **mat** source
|
||||
| *[out]* **dest** destination
|
||||
|
||||
.. c:function:: void glm_mat3x2_zero(mat3x2 mat)
|
||||
|
||||
make given matrix zero
|
||||
|
||||
Parameters:
|
||||
| *[in,out]* **mat** matrix
|
||||
|
||||
.. c:function:: void glm_mat3x2_make(float * __restrict src, mat3x2 dest)
|
||||
|
||||
Create mat3x2 matrix from pointer
|
||||
@@ -28,3 +49,43 @@ Functions documentation
|
||||
Parameters:
|
||||
| *[in]* **src** pointer to an array of floats
|
||||
| *[out]* **dest** destination matrix3x2
|
||||
|
||||
.. c:function:: void glm_mat3x2_mul(mat3x2 m1, mat2x3 m2, mat3 dest)
|
||||
|
||||
multiply m1 and m2 to dest
|
||||
|
||||
m1, m2 and dest matrices can be same matrix, it is possible to write this:
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
glm_mat3x2_mul(m, m, m);
|
||||
|
||||
Parameters:
|
||||
| *[in]* **m1** left matrix
|
||||
| *[in]* **m2** right matrix
|
||||
| *[out]* **dest** destination matrix
|
||||
|
||||
.. c:function:: void glm_mat3x2_mulv(mat3x2 m, vec2 v, vec3 dest)
|
||||
|
||||
multiply mat3x2 with vec2 (column vector) and store in dest vector
|
||||
|
||||
Parameters:
|
||||
| *[in]* **m** mat3x2 (left)
|
||||
| *[in]* **v** vec3 (right, column vector)
|
||||
| *[out]* **dest** destination (result, column vector)
|
||||
|
||||
.. c:function:: void glm_mat3x2_transpose(mat3x2 m, mat2x3 dest)
|
||||
|
||||
transpose matrix and store in dest
|
||||
|
||||
Parameters:
|
||||
| *[in]* **m** matrix
|
||||
| *[out]* **dest** destination
|
||||
|
||||
.. c:function:: void glm_mat3x2_scale(mat3x2 m, float s)
|
||||
|
||||
multiply matrix with scalar
|
||||
|
||||
Parameters:
|
||||
| *[in, out]* **m** matrix
|
||||
| *[in]* **s** scalar
|
||||
|
@@ -15,11 +15,32 @@ Macros:
|
||||
|
||||
Functions:
|
||||
|
||||
1. :c:func:`glm_mat3x4_make`
|
||||
1. :c:func:`glm_mat3x4_copy`
|
||||
#. :c:func:`glm_mat3x4_zero`
|
||||
#. :c:func:`glm_mat3x4_make`
|
||||
#. :c:func:`glm_mat3x4_mul`
|
||||
#. :c:func:`glm_mat3x4_mulv`
|
||||
#. :c:func:`glm_mat3x4_transpose`
|
||||
#. :c:func:`glm_mat3x4_scale`
|
||||
|
||||
Functions documentation
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. c:function:: void glm_mat3x4_copy(mat3x4 mat, mat3x4 dest)
|
||||
|
||||
copy mat3x4 to another one (dest).
|
||||
|
||||
Parameters:
|
||||
| *[in]* **mat** source
|
||||
| *[out]* **dest** destination
|
||||
|
||||
.. c:function:: void glm_mat3x4_zero(mat3x4 mat)
|
||||
|
||||
make given matrix zero
|
||||
|
||||
Parameters:
|
||||
| *[in,out]* **mat** matrix
|
||||
|
||||
.. c:function:: void glm_mat3x4_make(float * __restrict src, mat3x4 dest)
|
||||
|
||||
Create mat3x4 matrix from pointer
|
||||
@@ -28,3 +49,43 @@ Functions documentation
|
||||
Parameters:
|
||||
| *[in]* **src** pointer to an array of floats
|
||||
| *[out]* **dest** destination matrix3x4
|
||||
|
||||
.. c:function:: void glm_mat3x4_mul(mat3x4 m1, mat4x3 m2, mat3 dest)
|
||||
|
||||
multiply m1 and m2 to dest
|
||||
|
||||
m1, m2 and dest matrices can be same matrix, it is possible to write this:
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
glm_mat3x4_mul(m, m, m);
|
||||
|
||||
Parameters:
|
||||
| *[in]* **m1** left matrix
|
||||
| *[in]* **m2** right matrix
|
||||
| *[out]* **dest** destination matrix
|
||||
|
||||
.. c:function:: void glm_mat3x4_mulv(mat3x4 m, vec4 v, vec3 dest)
|
||||
|
||||
multiply mat3x4 with vec4 (column vector) and store in dest vector
|
||||
|
||||
Parameters:
|
||||
| *[in]* **m** mat3x4 (left)
|
||||
| *[in]* **v** vec4 (right, column vector)
|
||||
| *[out]* **dest** destination (result, column vector)
|
||||
|
||||
.. c:function:: void glm_mat3x4_transpose(mat3x4 m, mat4x3 dest)
|
||||
|
||||
transpose matrix and store in dest
|
||||
|
||||
Parameters:
|
||||
| *[in]* **m** matrix
|
||||
| *[out]* **dest** destination
|
||||
|
||||
.. c:function:: void glm_mat3x4_scale(mat3x4 m, float s)
|
||||
|
||||
multiply matrix with scalar
|
||||
|
||||
Parameters:
|
||||
| *[in, out]* **m** matrix
|
||||
| *[in]* **s** scalar
|
||||
|
@@ -119,6 +119,7 @@ Functions documentation
|
||||
.. c:function:: void glm_mat4_mul(mat4 m1, mat4 m2, mat4 dest)
|
||||
|
||||
multiply m1 and m2 to dest
|
||||
|
||||
m1, m2 and dest matrices can be same matrix, it is possible to write this:
|
||||
|
||||
.. code-block:: c
|
||||
@@ -157,7 +158,6 @@ Functions documentation
|
||||
Parameters:
|
||||
| *[in]* **m** mat4 (left)
|
||||
| *[in]* **v** vec4 (right, column vector)
|
||||
| *[in]* **last** 4th item to make it vec4
|
||||
| *[out]* **dest** vec4 (result, column vector)
|
||||
|
||||
.. c:function:: void glm_mat4_mulv3(mat4 m, vec3 v, float last, vec3 dest)
|
||||
|
@@ -15,11 +15,32 @@ Macros:
|
||||
|
||||
Functions:
|
||||
|
||||
1. :c:func:`glm_mat4x2_make`
|
||||
1. :c:func:`glm_mat4x2_copy`
|
||||
#. :c:func:`glm_mat4x2_zero`
|
||||
#. :c:func:`glm_mat4x2_make`
|
||||
#. :c:func:`glm_mat4x2_mul`
|
||||
#. :c:func:`glm_mat4x2_mulv`
|
||||
#. :c:func:`glm_mat4x2_transpose`
|
||||
#. :c:func:`glm_mat4x2_scale`
|
||||
|
||||
Functions documentation
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. c:function:: void glm_mat4x2_copy(mat4x2 mat, mat4x2 dest)
|
||||
|
||||
copy mat4x2 to another one (dest).
|
||||
|
||||
Parameters:
|
||||
| *[in]* **mat** source
|
||||
| *[out]* **dest** destination
|
||||
|
||||
.. c:function:: void glm_mat4x2_zero(mat4x2 mat)
|
||||
|
||||
make given matrix zero
|
||||
|
||||
Parameters:
|
||||
| *[in,out]* **mat** matrix
|
||||
|
||||
.. c:function:: void glm_mat4x2_make(float * __restrict src, mat4x2 dest)
|
||||
|
||||
Create mat4x2 matrix from pointer
|
||||
@@ -28,3 +49,43 @@ Functions documentation
|
||||
Parameters:
|
||||
| *[in]* **src** pointer to an array of floats
|
||||
| *[out]* **dest** destination matrix4x2
|
||||
|
||||
.. c:function:: void glm_mat4x2_mul(mat4x2 m1, mat2x4 m2, mat4 dest)
|
||||
|
||||
multiply m1 and m2 to dest
|
||||
|
||||
m1, m2 and dest matrices can be same matrix, it is possible to write this:
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
glm_mat4x2_mul(m, m, m);
|
||||
|
||||
Parameters:
|
||||
| *[in]* **m1** left matrix
|
||||
| *[in]* **m2** right matrix
|
||||
| *[out]* **dest** destination matrix
|
||||
|
||||
.. c:function:: void glm_mat4x2_mulv(mat4x2 m, vec2 v, vec4 dest)
|
||||
|
||||
multiply mat4x2 with vec2 (column vector) and store in dest vector
|
||||
|
||||
Parameters:
|
||||
| *[in]* **m** mat4x2 (left)
|
||||
| *[in]* **v** vec2 (right, column vector)
|
||||
| *[out]* **dest** destination (result, column vector)
|
||||
|
||||
.. c:function:: void glm_mat4x2_transpose(mat4x2 m, mat2x4 dest)
|
||||
|
||||
transpose matrix and store in dest
|
||||
|
||||
Parameters:
|
||||
| *[in]* **m** matrix
|
||||
| *[out]* **dest** destination
|
||||
|
||||
.. c:function:: void glm_mat4x2_scale(mat4x2 m, float s)
|
||||
|
||||
multiply matrix with scalar
|
||||
|
||||
Parameters:
|
||||
| *[in, out]* **m** matrix
|
||||
| *[in]* **s** scalar
|
||||
|
@@ -15,11 +15,32 @@ Macros:
|
||||
|
||||
Functions:
|
||||
|
||||
1. :c:func:`glm_mat4x3_make`
|
||||
1. :c:func:`glm_mat4x3_copy`
|
||||
#. :c:func:`glm_mat4x3_zero`
|
||||
#. :c:func:`glm_mat4x3_make`
|
||||
#. :c:func:`glm_mat4x3_mul`
|
||||
#. :c:func:`glm_mat4x3_mulv`
|
||||
#. :c:func:`glm_mat4x3_transpose`
|
||||
#. :c:func:`glm_mat4x3_scale`
|
||||
|
||||
Functions documentation
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. c:function:: void glm_mat4x3_copy(mat4x3 mat, mat4x3 dest)
|
||||
|
||||
copy mat4x3 to another one (dest).
|
||||
|
||||
Parameters:
|
||||
| *[in]* **mat** source
|
||||
| *[out]* **dest** destination
|
||||
|
||||
.. c:function:: void glm_mat4x3_zero(mat4x3 mat)
|
||||
|
||||
make given matrix zero
|
||||
|
||||
Parameters:
|
||||
| *[in,out]* **mat** matrix
|
||||
|
||||
.. c:function:: void glm_mat4x3_make(float * __restrict src, mat4x3 dest)
|
||||
|
||||
Create mat4x3 matrix from pointer
|
||||
@@ -28,3 +49,43 @@ Functions documentation
|
||||
Parameters:
|
||||
| *[in]* **src** pointer to an array of floats
|
||||
| *[out]* **dest** destination matrix4x3
|
||||
|
||||
.. c:function:: void glm_mat4x3_mul(mat4x3 m1, mat3x4 m2, mat4 dest)
|
||||
|
||||
multiply m1 and m2 to dest
|
||||
|
||||
m1, m2 and dest matrices can be same matrix, it is possible to write this:
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
glm_mat4x3_mul(m, m, m);
|
||||
|
||||
Parameters:
|
||||
| *[in]* **m1** left matrix
|
||||
| *[in]* **m2** right matrix
|
||||
| *[out]* **dest** destination matrix
|
||||
|
||||
.. c:function:: void glm_mat4x3_mulv(mat4x3 m, vec3 v, vec4 dest)
|
||||
|
||||
multiply mat4x3 with vec3 (column vector) and store in dest vector
|
||||
|
||||
Parameters:
|
||||
| *[in]* **m** mat4x3 (left)
|
||||
| *[in]* **v** vec3 (right, column vector)
|
||||
| *[out]* **dest** destination (result, column vector)
|
||||
|
||||
.. c:function:: void glm_mat4x3_transpose(mat4x3 m, mat3x4 dest)
|
||||
|
||||
transpose matrix and store in dest
|
||||
|
||||
Parameters:
|
||||
| *[in]* **m** matrix
|
||||
| *[out]* **dest** destination
|
||||
|
||||
.. c:function:: void glm_mat4x3_scale(mat4x3 m, float s)
|
||||
|
||||
multiply matrix with scalar
|
||||
|
||||
Parameters:
|
||||
| *[in, out]* **m** matrix
|
||||
| *[in]* **s** scalar
|
||||
|
Reference in New Issue
Block a user