|
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 | mat4i_identity_ptr (matrix4i *res) |
| Sets the given 4x4 integer matrix to the identity matrix. | |
| void | mat4i_mul_ptr (matrix4i *res, const matrix4i *a, const matrix4i *b) |
| Performs matrix multiplication of two 4x4 matrices and stores the result. | |
| void | mat4i_transpose_ptr (matrix4i *res, const matrix4i *m) |
| Transposes the given 4x4 integer matrix and stores the result in the provided matrix structure. | |
| void | mat4i_inverse_ptr (matrix4i *res, const matrix4i *m) |
| Computes the inverse of the given 4x4 integer matrix and stores the result in the specified matrix. | |
| void | mat4i_mul_vec4i_ptr (vector4i *res, const matrix4i *m, const vector4i *v) |
| Multiplies a 4x4 integer matrix by a vector4i. | |
| void | mat4i_mul_vec3i_ptr (vector3i *res, const matrix4i *m, const vector3i *v, const vm_int_t w) |
| Transforms a vector3i by a 4x4 integer matrix using homogeneous w. | |
| void mat4i_identity_ptr | ( | matrix4i * | res | ) |
Sets the given 4x4 integer matrix to the identity matrix.
| res | Pointer to the matrix structure to set to identity. |
Definition at line 12 of file matrix4i_ptr.c.
References matrix4i::v.
Referenced by mat4i_identity().
Computes the inverse of the given 4x4 integer matrix and stores the result in the specified matrix.
If the matrix is singular (determinant is zero), the result is set to the identity matrix.
| res | Pointer to the matrix structure to store the inverse matrix. |
| m | Pointer to the constant matrix to be inverted. |
Definition at line 81 of file matrix4i_ptr.c.
References matrix4i::v.
Referenced by mat4i_inverse().
Performs matrix multiplication of two 4x4 matrices and stores the result.
| res | Pointer to the matrix structure to store the result of the multiplication. |
| a | Pointer to the first matrix operand. |
| b | Pointer to the second matrix operand. |
Definition at line 29 of file matrix4i_ptr.c.
References matrix4i::m11, matrix4i::m12, matrix4i::m13, matrix4i::m14, matrix4i::m21, matrix4i::m22, matrix4i::m23, matrix4i::m24, matrix4i::m31, matrix4i::m32, matrix4i::m33, matrix4i::m34, matrix4i::m41, matrix4i::m42, matrix4i::m43, and matrix4i::m44.
Referenced by mat4i_mul().
| void mat4i_mul_vec3i_ptr | ( | vector3i * | res, |
| const matrix4i * | m, | ||
| const vector3i * | v, | ||
| const vm_int_t | w ) |
Transforms a vector3i by a 4x4 integer matrix using homogeneous w.
| res | Output value. |
| m | Input matrix. |
| v | Input vector. |
| w | Homogeneous w component. |
Definition at line 149 of file matrix4i_ptr.c.
References matrix4i::m11, matrix4i::m12, matrix4i::m13, matrix4i::m14, matrix4i::m21, matrix4i::m22, matrix4i::m23, matrix4i::m24, matrix4i::m31, matrix4i::m32, matrix4i::m33, matrix4i::m34, vector3i::x, vector3i::y, and vector3i::z.
Referenced by mat4i_mul_vec3i().
Multiplies a 4x4 integer matrix by a vector4i.
| res | Output value. |
| m | Input matrix. |
| v | Input vector. |
Definition at line 129 of file matrix4i_ptr.c.
References matrix4i::m11, matrix4i::m12, matrix4i::m13, matrix4i::m14, matrix4i::m21, matrix4i::m22, matrix4i::m23, matrix4i::m24, matrix4i::m31, matrix4i::m32, matrix4i::m33, matrix4i::m34, matrix4i::m41, matrix4i::m42, matrix4i::m43, matrix4i::m44, vector4i::w, vector4i::x, vector4i::y, and vector4i::z.
Referenced by mat4i_mul_vec4i().
Transposes the given 4x4 integer matrix and stores the result in the provided matrix structure.
| res | Pointer to the matrix structure to store the transposed matrix. |
| m | Pointer to the input matrix to be transposed. |
Definition at line 61 of file matrix4i_ptr.c.
References matrix4i::v.
Referenced by mat4i_transpose().