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
| Name | Type | Access | Description |
|---|---|---|---|
identity | Matrix4 | Read | Gets the identity. |
determinant | double | Read | Gets the determinant. |
Methods
| Signature | Description |
|---|---|
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() → Matrix4 | Returns the identity. |
translate(v: Vector3) → Matrix4 | Returns a matrix translated by the specified x, y, z offsets |
translate(x: double, y: double, z: double) → Matrix4 | Calls translate(x, y, z) on this Matrix4 instance. |
scale(v: Vector3) → Matrix4 | Returns a matrix scaled by the components of the given Vector3 |
scale(s: double) → Matrix4 | Calls scale(s) on this Matrix4 instance. |
scale(x: double, y: double, z: double) → Matrix4 | Calls scale(x, y, z) on this Matrix4 instance. |
rotate(angle: double, axis: Vector3) → Matrix4 | Returns a matrix representing the rotation defined by the quaternion |
rotate(q: Quaternion) → Matrix4 | Calls rotate(q) on this Matrix4 instance. |
rotateFromEuler(e: Vector3) → Matrix4 | Calls rotateFromEuler(e) on this Matrix4 instance. |
rotateFromEuler(x: double, y: double, z: double) → Matrix4 | Calls rotateFromEuler(x, y, z) on this Matrix4 instance. |
mul(a: Matrix4, b: Matrix4) → Matrix4 | Transforms Vector3 v by matrix m and returns the resulting Vector3 |
mul(m: Matrix4, s: double) → Matrix4 | Calls mul(m, s) on this Matrix4 instance. |
mul(m: Matrix4, v: Vector3) → Vector3 | Calls mul(m, v) on this Matrix4 instance. |
mul(m: Matrix4, v: FVector3) → FVector3 | Calls mul(m, v) on this Matrix4 instance. |
mul(m: Matrix4, v: Vector4) → Vector4 | Calls mul(m, v) on this Matrix4 instance. |
mul(m: Matrix4, v: FVector4) → FVector4 | Calls mul(m, v) on this Matrix4 instance. |
concatenate(m: Matrix4) → Matrix4 | Multiplies this matrix by m and returns the result |
transpose() → Matrix4 | Returns the transpose of this matrix |
getDeterminant() → double | Returns the determinant. |
inverse() → Matrix4 | Calls inverse on this Matrix4 instance. |
normalize() → Matrix4 | Returns 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) → boolean | Calls decompose(scale, rotation, q) on this Matrix4 instance. |
toArray() → double[] | Returns the matrix elements as a double array in row-major order |
toString() → String | Calls toString on this Matrix4 instance. |
clone() → Matrix4 | Calls 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() → int | Calls hashCode on this Matrix4 instance. |
equals(obj: Object) → boolean | Calls equals(obj) on this Matrix4 instance. |