Vecmat 0.2.3
C math and linear algebra library for 2D/3D graphics, physics, and science.
Loading...
Searching...
No Matches
matrix4i.c File Reference
#include <vecmat.h>

Go to the source code of this file.

Functions

matrix4i mat4i_identity (void)
 Constructs the 4x4 identity matrix.
matrix4i mat4i_mul (const matrix4i a, const matrix4i b)
 Multiplies two 4x4 integer matrices.
matrix4i mat4i_transpose (const matrix4i m)
 Computes the transpose of a 4x4 integer matrix.
matrix4i mat4i_inverse (const matrix4i m)
 Computes the inverse of a 4x4 integer matrix.
vm_int_t mat4i_determinant (const matrix4i m)
 Computes the determinant of a 4x4 integer matrix (Laplace expansion along first row).
vector4i mat4i_mul_vec4i (const matrix4i m, const vector4i v)
 Multiplies a 4x4 integer matrix by a vector4i.
vector3i mat4i_mul_vec3i (const matrix4i m, const vector3i v, const vm_int_t w)
 Transforms a vector3i by a 4x4 integer matrix using homogeneous w.

Function Documentation

◆ mat4i_determinant()

vm_int_t mat4i_determinant ( const matrix4i m)

Computes the determinant of a 4x4 integer matrix (Laplace expansion along first row).

Parameters
mThe input matrix.
Returns
The determinant value.

Definition at line 73 of file matrix4i.c.

References matrix4i::v.

◆ mat4i_identity()

matrix4i mat4i_identity ( void )

Constructs the 4x4 identity matrix.

See mat4i_identity_ptr instead.

Returns
The identity matrix4i.

Definition at line 14 of file matrix4i.c.

References mat4i_identity_ptr().

◆ mat4i_inverse()

matrix4i mat4i_inverse ( const matrix4i m)

Computes the inverse of a 4x4 integer matrix.

See mat4i_inverse_ptr instead.

Parameters
mThe input matrix.
Returns
The inverse matrix.

Definition at line 60 of file matrix4i.c.

References mat4i_inverse_ptr().

◆ mat4i_mul()

matrix4i mat4i_mul ( const matrix4i a,
const matrix4i b )

Multiplies two 4x4 integer matrices.

See mat4i_mul_ptr instead.

Parameters
aThe first matrix.
bThe second matrix.
Returns
The product matrix.

Definition at line 30 of file matrix4i.c.

References mat4i_mul_ptr().

◆ mat4i_mul_vec3i()

vector3i mat4i_mul_vec3i ( const matrix4i m,
const vector3i v,
const vm_int_t w )

Transforms a vector3i by a 4x4 integer matrix using homogeneous w.

See mat4i_mul_vec3i_ptr instead.

Parameters
mInput matrix.
vInput vector.
wHomogeneous w component.
Returns
The resulting vector3i.

Definition at line 116 of file matrix4i.c.

References mat4i_mul_vec3i_ptr().

◆ mat4i_mul_vec4i()

vector4i mat4i_mul_vec4i ( const matrix4i m,
const vector4i v )

Multiplies a 4x4 integer matrix by a vector4i.

See mat4i_mul_vec4i_ptr instead.

Parameters
mInput matrix.
vInput vector.
Returns
The resulting vector4i.

Definition at line 99 of file matrix4i.c.

References mat4i_mul_vec4i_ptr().

◆ mat4i_transpose()

matrix4i mat4i_transpose ( const matrix4i m)

Computes the transpose of a 4x4 integer matrix.

See mat4i_transpose_ptr instead.

Parameters
mThe input matrix.
Returns
The transposed matrix.

Definition at line 45 of file matrix4i.c.

References mat4i_transpose_ptr().