Matrix4 class

Matrix4 class

4x4 matrix implementation.

The Matrix4 type exposes the following members:

Constructors

ConstructorDescription
initConstructs matrix from 4 rows.
initInitializes a new instance of the Matrix4 struct.
initConstruct Matrix4 from an FMatrix4 instance
initInitializes a new instance of the Matrix4 struct.
initConstructs a new instance of Matrix4

Properties

PropertyDescription
identityGets the identity matrix.
determinantGets the determinant of the matrix.
m00The m00.
m01The m01.
m02The m02.
m03The m03.
m10The m10.
m11The m11.
m12The m12.
m13The m13.
m20The m20.
m21The m21.
m22The m22.
m23The m23.
m30The m30.
m31The m31.
m32The m32.
m33The m33.

Methods

MethodDescription
translateCreates a matrix that translates along the x-axis, the y-axis and the z-axis
translateCreates a matrix that translates along the x-axis, the y-axis and the z-axis
scaleCreates a matrix that scales along the x-axis, the y-axis and the z-axis.
scaleCreates a matrix that scales along the x-axis, the y-axis and the z-axis.
scaleCreates a matrix that scales along the x-axis, the y-axis and the z-axis.
rotate_from_eulerCreate a rotation matrix from Euler angle
rotate_from_eulerCreate a rotation matrix from Euler angle
rotateCreate a rotation matrix by rotation angle and axis
rotateCreate a rotation matrix from a quaternion
concatenateConcatenates the two matrices
transposeTransposes this instance.
normalizeNormalizes this instance.
inverseInverses this instance.
set_trsInitializes the matrix with translation/rotation/scale
to_arrayConverts matrix to array.
decompose

Example

from aspose.threed.utilities import Matrix4, Vector4

mat = Matrix4.rotate_from_euler(90, 0, 0)
mat2 = Matrix4.translate(0, 10, -50)
transform = mat2 * mat
pos = Vector4(10, 9, 0, 1)
transformed = transform * pos

See Also