Mat4
EditA mat4
is a math type that holds 16 values in a 4x4 grid.
Constructors
lovr.math.newMat4 | Create a new Mat4. |
lovr.math.mat4 | Create a temporary Mat4. |
Methods
Mat4:equals | Check if a matrix equals another matrix. |
Mat4:fov | Set a projection using raw field of view angles. |
Mat4:getOrientation | Get the angle/axis rotation of the matrix. |
Mat4:getPose | Get the position and rotation of the matrix. |
Mat4:getPosition | Get the translation of the matrix. |
Mat4:getScale | Get the scale factor of the matrix. |
Mat4:identity | Reset the matrix to the identity. |
Mat4:invert | Invert the matrix. |
Mat4:lookAt | Create a view transform that looks from a position to target position. |
Mat4:mul | Multiply a matrix with another matrix or a vector. |
Mat4:orthographic | Turn the matrix into an orthographic projection. |
Mat4:perspective | Turn the matrix into a perspective projection. |
Mat4:reflect | Create a matrix that reflects across a plane. |
Mat4:rotate | Rotate the matrix. |
Mat4:scale | Scale the matrix. |
Mat4:set | Set the components of the matrix. |
Mat4:target | Create a model transform that targets from a position to target position. |
Mat4:translate | Translate the matrix. |
Mat4:transpose | Transpose the matrix. |
Mat4:unpack | Get the individual components of the matrix. |