dath.matrix

Undocumented in source.

Members

Aliases

Mat2
alias Mat2 = Mat2f
Undocumented in source.
Mat2d
alias Mat2d = Mat!(double, 2)
Undocumented in source.
Mat2f
alias Mat2f = Mat!(float, 2)
Undocumented in source.
Mat2i
alias Mat2i = Mat!(int, 2)
Undocumented in source.
Mat2u
alias Mat2u = Mat!(uint, 2)
Undocumented in source.
Mat3
alias Mat3 = Mat3f
Undocumented in source.
Mat3d
alias Mat3d = Mat!(double, 3)
Undocumented in source.
Mat3f
alias Mat3f = Mat!(float, 3)
Undocumented in source.
Mat3i
alias Mat3i = Mat!(int, 3)
Undocumented in source.
Mat3u
alias Mat3u = Mat!(uint, 3)
Undocumented in source.
Mat4
alias Mat4 = Mat4f
Undocumented in source.
Mat4d
alias Mat4d = Mat!(double, 4)
Undocumented in source.
Mat4f
alias Mat4f = Mat!(float, 4)
Undocumented in source.
Mat4i
alias Mat4i = Mat!(int, 4)
Undocumented in source.
Mat4u
alias Mat4u = Mat!(uint, 4)
Undocumented in source.

Functions

identity
Mat!(T, n) identity()

creates an identity matrix

inverse
Mat4 inverse(Mat4 a)

Returns the inverse of the provided matrix, if no inverse can be found it returns a Mat4(inf)

lookAt
auto lookAt(Vec3 eye, Vec3 target, Vec3 up)

Creates a look-at matrix

orthographic
auto orthographic(float left, float right, float bottom, float top, float near, float far)

Creates an orthographic projection matrix

perspective
auto perspective(float fov_in_radians, float aspect, float near, float far)

Creates a perspective projection matrix

rotation
auto rotation(float angle, Vec!(T, 3) axis)

Creates a rotation matrix, angle in radians

scaling
Mat!(T, n) scaling(Vec!(T, n - 1) v)

Creates a scaling matrix

translation
auto translation(Vec!(T, n - 1) v)

Creates a translation matrix

Structs

Mat
struct Mat(T, ulong n)

A square NxN matrix. Supports any numeric type.

Meta