Struct Mat4x4

Row-major 4x4 floating point matrix. Zero by default.

struct Mat4x4

Constructors

NameDescription
this (diagonal)
this (v)

Fields

TypeNameDescription
float[16]
m

Methods

NameDescription
backVector ()
decompose (scale, rotation, translation) Decomposes the scale, rotation and translation components of this matrix
determinant ()
fill (v) Fill all items of matrix with specified value
forwardVector ()
invert ()
lookAt (eye, center, up)
opAssign (v)
opAssign (v)
opAssign (v)
opBinary (v) Perform operation with a scalar to all items of matrix
opBinary (b) Multiply this matrix by another matrix
opBinary (v) Multiply matrix by Vec3
opBinary (v) Multiply matrix by Vec4
opBinaryRight (v) Multiply matrix by Vec3
opBinaryRight (v) Multiply matrix by Vec4
opIndex (y, x) 2d index by row, col
opIndex (index) Scalar index by rows then (y*4 + x)
opOpAssign (v) Perform operation with a scalar to all items of matrix
opOpAssign (b) Multiply this matrix by another matrix
rotate (angle, axis)
rotateX (angle) Inplace rotate around X axis
rotateY (angle) Inplace rotate around Y axis
rotateZ (angle) Inplace rotate around Z axis
scale (v)
scale (v)
setDiagonal (v) Set to diagonal: fill all items of matrix with zero except main diagonal items which will be assigned to v
setLookAt (eye, center, up)
setOrtho (left, right, bottom, top, nearPlane, farPlane)
setPerspective (angle, aspect, nearPlane, farPlane)
transformPoint (v)
transformVector (v)
transformVector (x, y, z, w, dst)
translate (v)
transpose () Transpose matrix

Static methods

NameDescription
mul (a, b) Multiply two matrices