Matrix4

Overview

Matrix4 is a class in Aspose.3D FOSS for Python.

Matrix4 provides a full set of transformation operations, including translation, scaling, rotation, and concatenation, enabling complex 3D matrix math.

This class declares 17 methods for Matrix4 objects in Python programs. Available methods include: __eq__, __getitem__, __init__, __repr__, __setitem__, concatenate, decompose, get_identity, inverse, normalize, rotate, rotate_from_euler, and 5 additional methods. Public members are accessible to any Python application after installing the Aspose.3D FOSS for Python package. Properties: determinant, m00, m01, m02, m03, m10, and 11 more.

Properties

NameTypeAccessDescription
m00floatRead/WriteGets or sets the m00.
m01floatRead/WriteGets or sets the m01.
m02floatRead/WriteGets or sets the m02.
m03floatRead/WriteGets or sets the m03.
m10floatRead/WriteGets or sets the m10.
m11floatRead/WriteGets or sets the m11.
m12floatRead/WriteGets or sets the m12.
m13floatRead/WriteGets or sets the m13.
m20floatRead/WriteGets or sets the m20.
m21floatRead/WriteGets or sets the m21.
m22floatRead/WriteGets or sets the m22.
m23floatRead/WriteGets or sets the m23.
m30floatRead/WriteGets or sets the m30.
m31floatRead/WriteGets or sets the m31.
m32floatRead/WriteGets or sets the m32.
m33floatRead/WriteGets or sets the m33.
determinantfloatReadGets the determinant.

Methods

SignatureDescription
__init__()Calls init on this Matrix4 instance.
__getitem__(key: int) → floatCalls getitem(key) on this Matrix4 instance.
__setitem__(key: int, value: float)Calls setitem(key, value) on this Matrix4 instance.
transpose() → 'Matrix4'Returns a new Matrix4 that is the transpose of this matrix
concatenate(m2: 'Matrix4') → 'Matrix4'Multiplies this matrix by another Matrix4 (m2) and returns the resulting Matrix4
normalize() → 'Matrix4'Returns a Matrix4 whose rotation part is normalized to unit length
inverse() → 'Matrix4'Returns a new Matrix4 representing the inverse of this matrix
decompose(translation, scaling, rotation)Extracts translation, scaling, and rotation components into the given variables
set_trs(translation, rotation, scale)Sets the trs value.
to_array()Calls to_array on this Matrix4 instance.
get_identity() → 'Matrix4'Returns the identity.
translate(tx, ty, tz) → 'Matrix4'Method returns a new matrix representing a translation by the given offsets
scale(sx, sy, sz) → 'Matrix4'Creates a scaling matrix with factors sx, sy, sz and returns it
rotate_from_euler(rx, ry, rz) → 'Matrix4'Calls rotate_from_euler(rx, ry, rz) on this Matrix4 instance.
rotate(angle, axis) → 'Matrix4'Creates a rotation matrix rotating by angle around the given axis vector
__repr__() → strCalls repr on this Matrix4 instance.
__eq__(other) → boolCalls eq(other) on this Matrix4 instance.

See Also

 English