There are two implementations for matrices that are offered. A 3x3 column major matrix Mat3 and a 4x4 column major matrix Mat4.
Unlike vectors, these matrices are mutable by default and do not offer any immutable versions.
The matrices implementations offer the standard matrix functions one would expect:
translate
: translates a matrix by its translation componentrotate
: rotates am trix by its rotation componentmul
: post-multiplies a matrix with another matrixmulLeft
: pre-muiltiplies a matrix with another matrixsetToIdentity
: sets the matrix to an identity matrixsetToOrthographic
: sets the matrix to an orthographic projectionsetToPerspective
: sets the matrix to a perspective projectionsetToTranslate
: resets the matrix to an identity matrix and sets the translation componentsetToTranslateAndScaling
: resets the matrix to an identity matrix and sets the translation and scaling componentssetToRotation
: resets the matrix to an identity and sets the rotation componentsetToLookAt
: sets the matrix to look at the given position and targetscale
: scales the matrixinvert
: inverts the matrixtoBuffer
: dumps the matrix data into aFloatBuffer
toList
: dumps the matrix data into aList<Float>
PREVIOUSVectors
NEXTMath Extensions