Mat4

data class Mat4(elements: List<Float>) : BaseMat<Mat4, Vec4>

A 4×4 matrix.

Constructors

Mat4
Link copied to clipboard
fun Mat4(elements: List<Float>)

Types

Companion
Link copied to clipboard
object Companion

Functions

adj
Link copied to clipboard
open override fun adj(): Mat4

Returns an adjugate of this matrix.

det
Link copied to clipboard
open override fun det(): Float

Returns a determinant of this matrix.

get
Link copied to clipboard
open operator override fun get(row: Int, col: Int): Float

Returns element of this matrix at a given row and a given column.

inverse
Link copied to clipboard
open override fun inverse(): Mat4

Returns an inverse of this matrix.

times
Link copied to clipboard
open operator override fun times(other: Mat4): Mat4

Multiplies this matrix by the other matrix of the same size.

open operator override fun times(vector: Vec4): Vec4

Multiplies this matrix by a given vector.

open operator override fun times(number: Float): Mat4

Multiplies this matrix by a given number.

toFloatArray
Link copied to clipboard
open override fun toFloatArray(): FloatArray

Returns an array of elements of this matrix.

toMat3
Link copied to clipboard
fun toMat3(): Mat3

Returns a 3×3 submatrix of this matrix, obtained by deleting the last row and the last column of this 4×4 matrix.

toString
Link copied to clipboard
open override fun toString(): String

Returns a string representation of this matrix.

transpose
Link copied to clipboard
open override fun transpose(): Mat4

Returns a transpose of this matrix.