Companion

Properties

Link copied to clipboard

The index into Matrix3 for column 0, row 0.

Link copied to clipboard

The index into Matrix3 for column 0, row 1.

Link copied to clipboard

The index into Matrix3 for column 0, row 2.

Link copied to clipboard

The index into Matrix3 for column 1, row 0.

Link copied to clipboard

The index into Matrix3 for column 1, row 1.

Link copied to clipboard

The index into Matrix3 for column 1, row 2.

Link copied to clipboard

The index into Matrix3 for column 2, row 0.

Link copied to clipboard

The index into Matrix3 for column 2, row 1.

Link copied to clipboard

The index into Matrix3 for column 2, row 2.

Link copied to clipboard

An immutable Matrix3 instance initialized to the identity matrix.

Link copied to clipboard
open override val packedLength: Int

The number of elements used to pack the object into an array.

Link copied to clipboard

An immutable Matrix3 instance initialized to the zero matrix.

Functions

Link copied to clipboard
fun abs(matrix: Matrix3, result: Matrix3): Matrix3

Computes a matrix, which contains the absolute (unsigned) values of the provided matrix's elements.

Link copied to clipboard
fun add(left: Matrix3, right: Matrix3, result: Matrix3): Matrix3

Computes the sum of two matrices.

Link copied to clipboard
fun clone(matrix: Matrix3, result: Matrix3? = definedExternally): Matrix3

Duplicates a Matrix3 instance.

Link copied to clipboard
fun computeEigenDecomposition(matrix: Matrix3, result: Any? = definedExternally): Any

Computes the eigenvectors and eigenvalues of a symmetric matrix.

Link copied to clipboard
fun determinant(matrix: Matrix3): Double

Computes the determinant of the provided matrix.

Link copied to clipboard
fun equals(left: Matrix3? = definedExternally, right: Matrix3? = definedExternally): Boolean

Compares the provided matrices componentwise and returns true if they are equal, false otherwise.

Link copied to clipboard
fun equalsEpsilon(left: Matrix3? = definedExternally, right: Matrix3? = definedExternally, epsilon: Double? = definedExternally): Boolean

Compares the provided matrices componentwise and returns true if they are within the provided epsilon, false otherwise.

Link copied to clipboard
fun fromArray(array: ReadonlyArray<Double>, startingIndex: Int? = definedExternally, result: Matrix3? = definedExternally): Matrix3

Creates a Matrix3 from 9 consecutive elements in an array.

Link copied to clipboard
fun fromColumnMajorArray(values: ReadonlyArray<Double>, result: Matrix3? = definedExternally): Matrix3

Creates a Matrix3 instance from a column-major order array.

Link copied to clipboard
fun fromCrossProduct(vector: Cartesian3, result: Matrix3? = definedExternally): Matrix3

Computes a Matrix3 instance representing the cross product equivalent matrix of a Cartesian3 vector.

Link copied to clipboard
fun fromHeadingPitchRoll(headingPitchRoll: HeadingPitchRoll, result: Matrix3? = definedExternally): Matrix3

Computes a 3x3 rotation matrix from the provided headingPitchRoll. (see http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles )

Link copied to clipboard
fun fromQuaternion(quaternion: Quaternion, result: Matrix3? = definedExternally): Matrix3

Computes a 3x3 rotation matrix from the provided quaternion.

Link copied to clipboard
fun fromRotationX(angle: Double, result: Matrix3? = definedExternally): Matrix3

Creates a rotation matrix around the x-axis.

Link copied to clipboard
fun fromRotationY(angle: Double, result: Matrix3? = definedExternally): Matrix3

Creates a rotation matrix around the y-axis.

Link copied to clipboard
fun fromRotationZ(angle: Double, result: Matrix3? = definedExternally): Matrix3

Creates a rotation matrix around the z-axis.

Link copied to clipboard
fun fromRowMajorArray(values: ReadonlyArray<Double>, result: Matrix3? = definedExternally): Matrix3

Creates a Matrix3 instance from a row-major order array. The resulting matrix will be in column-major order.

Link copied to clipboard
fun fromScale(scale: Cartesian3, result: Matrix3? = definedExternally): Matrix3

Computes a Matrix3 instance representing a non-uniform scale.

Link copied to clipboard
fun fromUniformScale(scale: Double, result: Matrix3? = definedExternally): Matrix3

Computes a Matrix3 instance representing a uniform scale.

Link copied to clipboard
fun getColumn(matrix: Matrix3, index: Int, result: Cartesian3): Cartesian3

Retrieves a copy of the matrix column at the provided index as a Cartesian3 instance.

Link copied to clipboard
fun getElementIndex(column: Int, row: Int): Int

Computes the array index of the element at the provided row and column.

Link copied to clipboard

Computes the maximum scale assuming the matrix is an affine transformation. The maximum scale is the maximum length of the column vectors.

Link copied to clipboard
fun getRotation(matrix: Matrix3, result: Matrix3): Matrix3

Extracts the rotation matrix assuming the matrix is an affine transformation.

Link copied to clipboard
fun getRow(matrix: Matrix3, index: Int, result: Cartesian3): Cartesian3

Retrieves a copy of the matrix row at the provided index as a Cartesian3 instance.

Link copied to clipboard
fun getScale(matrix: Matrix3, result: Cartesian3): Cartesian3

Extracts the non-uniform scale assuming the matrix is an affine transformation.

Link copied to clipboard
fun inverse(matrix: Matrix3, result: Matrix3): Matrix3

Computes the inverse of the provided matrix.

Link copied to clipboard
fun inverseTranspose(matrix: Matrix3, result: Matrix3): Matrix3

Computes the inverse transpose of a matrix.

Link copied to clipboard
fun multiply(left: Matrix3, right: Matrix3, result: Matrix3): Matrix3

Computes the product of two matrices.

Link copied to clipboard
fun multiplyByScalar(matrix: Matrix3, scalar: Double, result: Matrix3): Matrix3

Computes the product of a matrix and a scalar.

Link copied to clipboard
fun multiplyByScale(matrix: Matrix3, scale: Cartesian3, result: Matrix3): Matrix3

Computes the product of a matrix times a (non-uniform) scale, as if the scale were a scale matrix.

Link copied to clipboard
fun multiplyByUniformScale(matrix: Matrix3, scale: Double, result: Matrix3): Matrix3

Computes the product of a matrix times a uniform scale, as if the scale were a scale matrix.

Link copied to clipboard
fun multiplyByVector(matrix: Matrix3, cartesian: Cartesian3, result: Cartesian3): Cartesian3

Computes the product of a matrix and a column vector.

Link copied to clipboard
fun negate(matrix: Matrix3, result: Matrix3): Matrix3

Creates a negated copy of the provided matrix.

Link copied to clipboard
open override fun pack(value: Matrix3, array: ReadonlyArray<Double>, startingIndex: Int?): ReadonlyArray<Double>

Stores the provided instance into the provided array.

Link copied to clipboard
fun packArray(array: ReadonlyArray<Matrix3>, result: ReadonlyArray<Double>? = definedExternally): ReadonlyArray<Double>

Flattens an array of Matrix3s into an array of components. The components are stored in column-major order.

Link copied to clipboard
fun setColumn(matrix: Matrix3, index: Int, cartesian: Cartesian3, result: Matrix3): Matrix3

Computes a new matrix that replaces the specified column in the provided matrix with the provided Cartesian3 instance.

Link copied to clipboard
fun setRotation(matrix: Matrix3, rotation: Matrix3, result: Matrix3): Matrix3

Sets the rotation assuming the matrix is an affine transformation.

Link copied to clipboard
fun setRow(matrix: Matrix3, index: Int, cartesian: Cartesian3, result: Matrix3): Matrix3

Computes a new matrix that replaces the specified row in the provided matrix with the provided Cartesian3 instance.

Link copied to clipboard
fun setScale(matrix: Matrix3, scale: Cartesian3, result: Matrix3): Matrix3

Computes a new matrix that replaces the scale with the provided scale. This assumes the matrix is an affine transformation.

Link copied to clipboard
fun setUniformScale(matrix: Matrix3, scale: Double, result: Matrix3): Matrix3

Computes a new matrix that replaces the scale with the provided uniform scale. This assumes the matrix is an affine transformation.

Link copied to clipboard
fun subtract(left: Matrix3, right: Matrix3, result: Matrix3): Matrix3

Computes the difference of two matrices.

Link copied to clipboard
fun toArray(matrix: Matrix3, result: ReadonlyArray<Double>? = definedExternally): ReadonlyArray<Double>

Creates an Array from the provided Matrix3 instance. The array will be in column-major order.

Link copied to clipboard
fun transpose(matrix: Matrix3, result: Matrix3): Matrix3

Computes the transpose of the provided matrix.

Link copied to clipboard
open override fun unpack(array: ReadonlyArray<Double>, startingIndex: Int?, result: Matrix3?): Matrix3

Retrieves an instance from a packed array.

Link copied to clipboard
fun unpackArray(array: ReadonlyArray<Double>, result: ReadonlyArray<Matrix3>? = definedExternally): ReadonlyArray<Matrix3>

Unpacks an array of column-major matrix components into an array of Matrix3s.