matrix4i_ptr.c 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.
Function documentation
void mat4i_identity_ptr(matrix4i* res)
Sets the given 4x4 integer matrix to the identity matrix.
| Parameters | |
|---|---|
| res | Pointer to the matrix structure to set to identity. |
void mat4i_mul_ptr(matrix4i* res, const matrix4i* a, const matrix4i* b)
Performs matrix multiplication of two 4x4 matrices and stores the result.
| Parameters | |
|---|---|
| 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. |
void mat4i_transpose_ptr(matrix4i* res, const matrix4i* m)
Transposes the given 4x4 integer matrix and stores the result in the provided matrix structure.
| Parameters | |
|---|---|
| res | Pointer to the matrix structure to store the transposed matrix. |
| m | Pointer to the input matrix to be transposed. |
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.
| Parameters | |
|---|---|
| res | Pointer to the matrix structure to store the inverse matrix. |
| m | Pointer to the constant matrix to be inverted. |
If the matrix is singular (determinant is zero), the result is set to the identity matrix.
void mat4i_mul_vec4i_ptr(vector4i* res, const matrix4i* m, const vector4i* v)
Multiplies a 4x4 integer matrix by a vector4i.
| Parameters | |
|---|---|
| res | Output value. |
| m | Input matrix. |
| v | Input vector. |