API reference
API reference
Select your platform
No SDKs available
No versions available

Matrix44 Class

Modifiers: final
A 4x4 matrix class for representing transformations in 3D space.

Signature

data class Matrix44(var m00: Float, var m01: Float, var m02: Float, var m03: Float, var m10: Float, var m11: Float, var m12: Float, var m13: Float, var m20: Float, var m21: Float, var m22: Float, var m23: Float, var m30: Float, var m31: Float, var m32: Float, var m33: Float)

Constructors

Matrix44 ( values )
Constructs a new Matrix44 from a FloatArray of 16 elements.
Signature
constructor(values: FloatArray)
Parameters
values: FloatArray
  the FloatArray containing the matrix data
Returns
Matrix44 ( m00 , m01 , m02 , m03 , m10 , m11 , m12 , m13 , m20 , m21 , m22 , m23 , m30 , m31 , m32 , m33 )
Signature
constructor(m00: Float, m01: Float, m02: Float, m03: Float, m10: Float, m11: Float, m12: Float, m13: Float, m20: Float, m21: Float, m22: Float, m23: Float, m30: Float, m31: Float, m32: Float, m33: Float)
Parameters
m00: Float
m01: Float
m02: Float
m03: Float
m10: Float
m11: Float
m12: Float
m13: Float
m20: Float
m21: Float
m22: Float
m23: Float
m30: Float
m31: Float
m32: Float
m33: Float
Returns

Properties

m00 : Float
[Get][Set]
Signature
var m00: Float
m01 : Float
[Get][Set]
Signature
var m01: Float
m02 : Float
[Get][Set]
Signature
var m02: Float
m03 : Float
[Get][Set]
Signature
var m03: Float
m10 : Float
[Get][Set]
Signature
var m10: Float
m11 : Float
[Get][Set]
Signature
var m11: Float
m12 : Float
[Get][Set]
Signature
var m12: Float
m13 : Float
[Get][Set]
Signature
var m13: Float
m20 : Float
[Get][Set]
Signature
var m20: Float
m21 : Float
[Get][Set]
Signature
var m21: Float
m22 : Float
[Get][Set]
Signature
var m22: Float
m23 : Float
[Get][Set]
Signature
var m23: Float
m30 : Float
[Get][Set]
Signature
var m30: Float
m31 : Float
[Get][Set]
Signature
var m31: Float
m32 : Float
[Get][Set]
Signature
var m32: Float
m33 : Float
[Get][Set]
Signature
var m33: Float

Functions

decompose ()
Decomposes a 4x4 transformation matrix into its constituent parts: a Pose (translation and rotation) and a Vector3 (scale).
Signature
fun decompose(): Pair<Pose, Vector3>
Returns
Pair<Pose, Vector3>
  A Pair containing the Pose object and the scale Vector3.
determinant ()
Calculates the determinant of this matrix.
Signature
fun determinant(): Float
Returns
Float
  the determinant of the matrix
times ( other )
Multiplies this matrix by another matrix and returns the result.
Signature
operator fun times(other: Matrix44): Matrix44
Parameters
other: Matrix44
  the matrix to multiply by
Returns
  the resulting matrix
times ( vector )
Multiplies this matrix by a Vector4 and returns the result.
Signature
operator fun times(vector: Vector4): Vector4
Parameters
vector: Vector4
  the Vector4 to multiply by
Returns
  the resulting Vector4
toString ()
Signature
open override fun toString(): String
Returns
String

Companion Object

Companion Object Functions

composeFromTRS ( transform , scale )
Composes a 4x4 transformation matrix from a Pose (translation and rotation) and a Vector3 (scale).
Signature
fun composeFromTRS(transform: Pose, scale: Vector3): Matrix44
Parameters
transform: Pose
  The Pose object containing the translation and rotation components.
scale: Vector3
  The Vector3 object containing the scale factors.
Returns
  A 4x4 transformation matrix representing the composition of the translation, rotation, and scale transformations.
fromFloatArray ( values )
Creates a new Matrix44 from a FloatArray of 16 elements.
Signature
fun fromFloatArray(values: FloatArray): Matrix44
Parameters
values: FloatArray
  The FloatArray containing the matrix data. Must have exactly 16 elements.
Returns
  A new Matrix44 object constructed from the input FloatArray.
Did you find this page helpful?