Matrix4

Overview

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

Matrix4 provides chainable transformations; call translate, rotate, and scale to build a transformation matrix for positioning objects.

This class provides 36 methods for working with Matrix4 objects in Java programs. Available methods include: Matrix4, clone, concatenate, copyFrom, decompose, equals, getDeterminant, getIdentity, hashCode, inverse, mul, normalize, and 8 additional methods. All public members are accessible to any Java application after installing the Aspose.3D FOSS for Java package. Properties: determinant, identity.

Properties

NameTypeAccessDescription
identityMatrix4ReadGets the identity.
determinantdoubleReadGets the determinant.

Methods

SignatureDescription
Matrix4()Initializes matrix with the provided 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)Calls Matrix4(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) on this Matrix4 instance.
Matrix4(values: float[])Calls Matrix4(values) on this Matrix4 instance.
Matrix4(values: double[])Calls Matrix4(values) on this Matrix4 instance.
Matrix4(r0: Vector4, r1: Vector4, r2: Vector4, r3: Vector4)Calls Matrix4(r0, r1, r2, r3) on this Matrix4 instance.
getIdentity() → Matrix4Returns the identity.
translate(v: Vector3) → Matrix4Returns a matrix translated by the specified x, y, z offsets
translate(x: double, y: double, z: double) → Matrix4Calls translate(x, y, z) on this Matrix4 instance.
scale(v: Vector3) → Matrix4Returns a matrix scaled by the components of the given Vector3
scale(s: double) → Matrix4Calls scale(s) on this Matrix4 instance.
scale(x: double, y: double, z: double) → Matrix4Calls scale(x, y, z) on this Matrix4 instance.
rotate(angle: double, axis: Vector3) → Matrix4Returns a matrix representing the rotation defined by the quaternion
rotate(q: Quaternion) → Matrix4Calls rotate(q) on this Matrix4 instance.
rotateFromEuler(e: Vector3) → Matrix4Calls rotateFromEuler(e) on this Matrix4 instance.
rotateFromEuler(x: double, y: double, z: double) → Matrix4Calls rotateFromEuler(x, y, z) on this Matrix4 instance.
mul(a: Matrix4, b: Matrix4) → Matrix4Transforms Vector3 v by matrix m and returns the resulting Vector3
mul(m: Matrix4, s: double) → Matrix4Calls mul(m, s) on this Matrix4 instance.
mul(m: Matrix4, v: Vector3) → Vector3Calls mul(m, v) on this Matrix4 instance.
mul(m: Matrix4, v: FVector3) → FVector3Calls mul(m, v) on this Matrix4 instance.
mul(m: Matrix4, v: Vector4) → Vector4Calls mul(m, v) on this Matrix4 instance.
mul(m: Matrix4, v: FVector4) → FVector4Calls mul(m, v) on this Matrix4 instance.
concatenate(m: Matrix4) → Matrix4Multiplies this matrix by m and returns the result
transpose() → Matrix4Returns the transpose of this matrix
getDeterminant() → doubleReturns the determinant.
inverse() → Matrix4Calls inverse on this Matrix4 instance.
normalize() → Matrix4Returns a matrix with normalized rows or columns
setTRS(translation: Vector3, rotation: Vector3, scale: Vector3)Sets the trs value.
setTRS(t: Vector3, r: Quaternion, s: Vector3)Sets the trs value.
decompose(scale: Vector3, rotation: Vector3, q: Quaternion) → booleanCalls decompose(scale, rotation, q) on this Matrix4 instance.
toArray() → double[]Returns the matrix elements as a double array in row-major order
toString() → StringCalls toString on this Matrix4 instance.
clone() → Matrix4Calls clone on this Matrix4 instance.
Matrix4(other: Matrix4)Calls Matrix4(other) on this Matrix4 instance.
copyFrom(src: Matrix4)Calls copyFrom(src) on this Matrix4 instance.
hashCode() → intCalls hashCode on this Matrix4 instance.
equals(obj: Object) → booleanCalls equals(obj) on this Matrix4 instance.

See Also

 English