Mat4

Edit

A mat4 is a math type that holds 16 values in a 4x4 grid.

Constructors

lovr.math.newMat4Create a new Mat4.
lovr.math.mat4Create a temporary Mat4.

Methods

Mat4:equalsCheck if a matrix equals another matrix.
Mat4:fovSet a projection using raw field of view angles.
Mat4:getOrientationGet the angle/axis rotation of the matrix.
Mat4:getPoseGet the position and rotation of the matrix.
Mat4:getPositionGet the translation of the matrix.
Mat4:getScaleGet the scale factor of the matrix.
Mat4:identityReset the matrix to the identity.
Mat4:invertInvert the matrix.
Mat4:lookAtCreate a view transform that looks from a position to target position.
Mat4:mulMultiply a matrix with another matrix or a vector.
Mat4:orthographicTurn the matrix into an orthographic projection.
Mat4:perspectiveTurn the matrix into a perspective projection.
Mat4:reflectCreate a matrix that reflects across a plane.
Mat4:rotateRotate the matrix.
Mat4:scaleScale the matrix.
Mat4:setSet the components of the matrix.
Mat4:targetCreate a model transform that targets from a position to target position.
Mat4:translateTranslate the matrix.
Mat4:transposeTranspose the matrix.
Mat4:unpackGet the individual components of the matrix.

See also