|
Vecmat 0.2.3
C math and linear algebra library for 2D/3D graphics, physics, and science.
|
#include <vecmat.h>Go to the source code of this file.
Functions | |
| void | mat3i_identity_ptr (matrix3i *res) |
| Fills the given 3x3 integer matrix with the identity matrix. | |
| void | mat3i_mul_ptr (matrix3i *res, const matrix3i *a, const matrix3i *b) |
| Multiplies two 3x3 integer matrices (standard matrix multiplication). | |
| void | mat3i_transpose_ptr (matrix3i *res, const matrix3i *m) |
| Computes the transpose of a 3x3 integer matrix. | |
| void | mat3i_inverse_ptr (matrix3i *res, const matrix3i *m) |
| Computes the inverse of a 3x3 integer matrix using adjugate over determinant. | |
| void | mat3i_mul_vec3i_ptr (vector3i *res, const matrix3i *m, const vector3i *v) |
| Multiplies a 3x3 integer matrix by a vector3i. | |
| void | mat3i_mul_vec2i_ptr (vector2i *res, const matrix3i *m, const vector2i *v) |
| Applies a 3x3 integer affine transform to a vector2i. | |
| void mat3i_identity_ptr | ( | matrix3i * | res | ) |
Fills the given 3x3 integer matrix with the identity matrix.
| res | Pointer to the result matrix. |
Definition at line 12 of file matrix3i_ptr.c.
References matrix3i::m11, matrix3i::m12, matrix3i::m13, matrix3i::m21, matrix3i::m22, matrix3i::m23, matrix3i::m31, matrix3i::m32, and matrix3i::m33.
Referenced by mat3i_identity(), and mat3i_inverse_ptr().
Computes the inverse of a 3x3 integer matrix using adjugate over determinant.
If the determinant is zero (singular), sets the result to the identity matrix.
| res | Pointer to the result matrix. |
| m | Pointer to the input matrix. |
Definition at line 67 of file matrix3i_ptr.c.
References matrix3i::m11, matrix3i::m12, matrix3i::m13, matrix3i::m21, matrix3i::m22, matrix3i::m23, matrix3i::m31, matrix3i::m32, matrix3i::m33, mat3i_determinant(), and mat3i_identity_ptr().
Referenced by mat3i_inverse().
Multiplies two 3x3 integer matrices (standard matrix multiplication).
| res | Pointer to the result matrix. |
| a | Pointer to the first input matrix. |
| b | Pointer to the second input matrix. |
Definition at line 26 of file matrix3i_ptr.c.
References matrix3i::m11, matrix3i::m12, matrix3i::m13, matrix3i::m21, matrix3i::m22, matrix3i::m23, matrix3i::m31, matrix3i::m32, and matrix3i::m33.
Referenced by mat3i_mul().
Applies a 3x3 integer affine transform to a vector2i.
| res | Output value. |
| m | Input matrix. |
| v | Input vector. |
Definition at line 115 of file matrix3i_ptr.c.
References matrix3i::m11, matrix3i::m12, matrix3i::m13, matrix3i::m21, matrix3i::m22, matrix3i::m23, vector2i::x, and vector2i::y.
Referenced by mat3i_mul_vec2i().
Multiplies a 3x3 integer matrix by a vector3i.
| res | Output value. |
| m | Input matrix. |
| v | Input vector. |
Definition at line 98 of file matrix3i_ptr.c.
References matrix3i::m11, matrix3i::m12, matrix3i::m13, matrix3i::m21, matrix3i::m22, matrix3i::m23, matrix3i::m31, matrix3i::m32, matrix3i::m33, vector3i::x, vector3i::y, and vector3i::z.
Referenced by mat3i_mul_vec3i().
Computes the transpose of a 3x3 integer matrix.
| res | Pointer to the result matrix. |
| m | Pointer to the input matrix. |
Definition at line 50 of file matrix3i_ptr.c.
References matrix3i::m11, matrix3i::m12, matrix3i::m13, matrix3i::m21, matrix3i::m22, matrix3i::m23, matrix3i::m31, matrix3i::m32, and matrix3i::m33.
Referenced by mat3i_transpose().