Matrix44

data class Matrix44(c0r0: Double, c1r0: Double, c2r0: Double, c3r0: Double, c0r1: Double, c1r1: Double, c2r1: Double, c3r1: Double, c0r2: Double, c1r2: Double, c2r2: Double, c3r2: Double, c0r3: Double, c1r3: Double, c2r3: Double, c3r3: Double) : LinearType<Matrix44>

A 4x4 matrix with double precision

Constructors

Matrix44
Link copied to clipboard
fun Matrix44(c0r0: Double = 0.0, c1r0: Double = 0.0, c2r0: Double = 0.0, c3r0: Double = 0.0, c0r1: Double = 0.0, c1r1: Double = 0.0, c2r1: Double = 0.0, c3r1: Double = 0.0, c0r2: Double = 0.0, c1r2: Double = 0.0, c2r2: Double = 0.0, c3r2: Double = 0.0, c0r3: Double = 0.0, c1r3: Double = 0.0, c2r3: Double = 0.0, c3r3: Double = 0.0)

Types

Companion
Link copied to clipboard
object Companion

Functions

div
Link copied to clipboard
open operator override fun div(scale: Double): Matrix44
get
Link copied to clipboard
operator fun get(index: Int): Vector4

Returns a column vector

minus
Link copied to clipboard
open operator override fun minus(right: Matrix44): Matrix44

Matrix subtraction

plus
Link copied to clipboard
open operator override fun plus(right: Matrix44): Matrix44

Matrix addition

times
Link copied to clipboard
open operator override fun times(scale: Double): Matrix44

Multiplies all the elements in the 4x4 matrix with a scalar

operator fun times(mat: Matrix44): Matrix44

Matrix concatenation

operator fun times(v: Vector4): Vector4

Multiplies the 4x4 matrix with a vector 4

toDoubleArray
Link copied to clipboard
fun toDoubleArray(): DoubleArray

Convert matrix to a DoubleArray in row-major order

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

Properties

c0r0
Link copied to clipboard
val c0r0: Double = 0.0
c0r1
Link copied to clipboard
val c0r1: Double = 0.0
c0r2
Link copied to clipboard
val c0r2: Double = 0.0
c0r3
Link copied to clipboard
val c0r3: Double = 0.0
c1r0
Link copied to clipboard
val c1r0: Double = 0.0
c1r1
Link copied to clipboard
val c1r1: Double = 0.0
c1r2
Link copied to clipboard
val c1r2: Double = 0.0
c1r3
Link copied to clipboard
val c1r3: Double = 0.0
c2r0
Link copied to clipboard
val c2r0: Double = 0.0
c2r1
Link copied to clipboard
val c2r1: Double = 0.0
c2r2
Link copied to clipboard
val c2r2: Double = 0.0
c2r3
Link copied to clipboard
val c2r3: Double = 0.0
c3r0
Link copied to clipboard
val c3r0: Double = 0.0
c3r1
Link copied to clipboard
val c3r1: Double = 0.0
c3r2
Link copied to clipboard
val c3r2: Double = 0.0
c3r3
Link copied to clipboard
val c3r3: Double = 0.0
determinant
Link copied to clipboard
val determinant: Double
inversed
Link copied to clipboard
val inversed: Matrix44

Inversed version of the 4x4 matrix

matrix33
Link copied to clipboard
val matrix33: Matrix33

The 3x3 top-left part of the 4x4 matrix

trace
Link copied to clipboard
val trace: Double

The trace of the 4x4 matrix

transposed
Link copied to clipboard
val transposed: Matrix44

Returns a transposed version of the matrix

Extensions

transform
Link copied to clipboard
@JvmName(name = "matrix44Transform")
fun Matrix44.transform(builder: TransformBuilder.() -> Unit): Matrix44

Matrix44 transform helper