Salta ai contenuti
Seleziona lingua:Italiano
Questa pagina è disponibile solo in inglese.

MCL 1.3.5

class Mat4d(values: DoubleArray) : Matd

Represents a 4x4 matrix of floating-point double precision values.

The array must be in column-major order.

Parameters

values

Array of values in the matrix.

Constructors

constructor(values: DoubleArray)

Types

Properties

Functions

Computes the determinant of the matrix.

operator fun div(scalar: Double): Mat4d

Divides the matrix by a scalar.

operator fun get(row: Int, col: Int): Double

Gets the value at the specified row and column.

operator fun minus(other: Mat4d): Mat4d

Subtracts one matrix from another.

operator fun plus(other: Mat4d): Mat4d

Adds two matrices.

operator fun set(row: Int, col: Int, value: Double)

Sets the value at the specified row and column.

operator fun times(other: Mat4d): Mat4d

Multiplies the matrix by another matrix.

operator fun times(v: Vec4d): Vec4d

Multiplies the matrix by a 4D vector.

operator fun times(scalar: Double): Mat4d

Multiplies the matrix by a scalar.

fun toFloat(): Mat4f

Converts the matrix to a single precision matrix.

Returns a new array containing the same matrix data in row-major order.

open override fun toString(): String
fun trace(): Double

Computes the trace of the matrix.

Transposes the matrix.

operator fun unaryMinus(): Mat4d

Negates the matrix.