Matrix4

Overview

Matrix4 is a class in Aspose.3D FOSS for Java. Inherits from: Struct<Matrix4>, Serializable.

Matrix4.Matrix4 creates a new identity matrix.

Properties

NameTypeAccessDescription
identityMatrix4ReadProvides the constant identity matrix
determinantdoubleReadHolds the determinant value of the matrix

Methods

SignatureDescription
Matrix4()Creates a matrix with the given 16 double elements
Matrix4(m00: double, m01: double, m02: double, m03: double, m10: double, m11: double, m12: double, m13: double, m20: double, m21: double, m22: double, m23: double, m30: double, m31: double, m32: double, m33: double)
Matrix4(values: float[])
Matrix4(values: double[])
Matrix4(r0: Vector4, r1: Vector4, r2: Vector4, r3: Vector4)
getIdentity()Matrix4Returns a matrix representing the identity transformation
translate(v: Vector3)Matrix4Returns a matrix translating by the specified x, y, z offsets
translate(x: double, y: double, z: double)Matrix4
scale(v: Vector3)Matrix4Returns a matrix scaling uniformly by the components of the Vector3
scale(s: double)Matrix4
scale(x: double, y: double, z: double)Matrix4
rotate(angle: double, axis: Vector3)Matrix4Returns a matrix representing the rotation defined by the quaternion
rotate(q: Quaternion)Matrix4
rotateFromEuler(e: Vector3)Matrix4
rotateFromEuler(x: double, y: double, z: double)Matrix4
mul(a: Matrix4, b: Matrix4)Matrix4Transforms Vector3 v by matrix m and returns the resulting Vector3
mul(m: Matrix4, s: double)Matrix4
mul(m: Matrix4, v: Vector3)Vector3
mul(m: Matrix4, v: FVector3)FVector3
mul(m: Matrix4, v: Vector4)Vector4
mul(m: Matrix4, v: FVector4)FVector4
concatenate(m: Matrix4)Matrix4Multiplies this matrix by m and returns the combined matrix
transpose()Matrix4Returns the transpose of this matrix
getDeterminant()doubleComputes and returns the matrix determinant
inverse()Matrix4
normalize()Matrix4Returns a matrix with normalized rotation components
setTRS(translation: Vector3, rotation: Vector3, scale: Vector3)Sets translation, rotation (quaternion), and scale on this matrix
setTRS(t: Vector3, r: Quaternion, s: Vector3)
decompose(scale: Vector3, rotation: Vector3, q: Quaternion)boolean
toArray()double[]Returns the matrix elements as a double array in row‑major order
toString()String
clone()Matrix4
Matrix4(other: Matrix4)
copyFrom(src: Matrix4)
hashCode()int
equals(obj: Object)boolean