4x4_matrix

The 4×4 Matrix features the same methods of accessing its variables as the 2x2 Matrix; but of course, has an extra column and row.

In addition to the base identity and custom matrix constructors, the 4×4 matrix also has constructors for:

- A 4×4 rotation matrix constructed by means of a rotation vector and the angle in degrees.
- A 4×4 scale matrix, taking a Vector3.
- A 4×4 matrix with translation in the x, y, and z directions as floats.
- A 4×4 projection matrix, taking
`FOV`

,`aspect ratio`

,`near`

and`far`

as floats. - A 4×4 orthographic projection matrix, taking
`left`

,`right`

,`bottom`

,`top`

,`near`

,`far`

as floats

The 4×4 Matrix also features additional functions in its class. Here is the complete list:

`Transpose`

`Determinant`

`Inverse`

`Adjugate`

`RotateX`

,`RotateY`

and`RotateZ`

, all of which rotate the matrix by the given angle around their respective axis as the name dictates.`RotateAxis`

, which rotates this matrix for the given angle around the given axis.`Rotate`

, which takes`pitch, yaw, and roll`

in degrees.`Transform`

, with scale, rotation in Euler angles, and translation as Vector3 objects.`Transform`

, with scale, rotation in axis Vector + angles as float, and translation.`LookAt`

, which takes position, target, and up as Vector3 objects.`SetScale`

, which takes a Vector3 or floats`SetTranslation`

, which takes a Vector3 or floats

As part of the `ImpulsePhysics::Matrices`

namespace, you also get access to these utility functions:

`Minor`

`Cofactor`

4x4_matrix.txt · Last modified: 2022/05/01 18:24 by max

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution 4.0 International