Matrix4 class
Matrix4 class
4x4 matrix implementation.
The Matrix4 type exposes the following members:
Constructors
| Constructor | Description |
|---|
| init | Constructs matrix from 4 rows. |
| init | Initializes a new instance of the Matrix4 struct. |
| init | Construct Matrix4 from an FMatrix4 instance |
| init | Initializes a new instance of the Matrix4 struct. |
| init | Constructs a new instance of Matrix4 |
Properties
Methods
| Method | Description |
|---|
| translate | Creates a matrix that translates along the x-axis, the y-axis and the z-axis |
| translate | Creates a matrix that translates along the x-axis, the y-axis and the z-axis |
| scale | Creates a matrix that scales along the x-axis, the y-axis and the z-axis. |
| scale | Creates a matrix that scales along the x-axis, the y-axis and the z-axis. |
| scale | Creates a matrix that scales along the x-axis, the y-axis and the z-axis. |
| rotate_from_euler | Create a rotation matrix from Euler angle |
| rotate_from_euler | Create a rotation matrix from Euler angle |
| rotate | Create a rotation matrix by rotation angle and axis |
| rotate | Create a rotation matrix from a quaternion |
| concatenate | Concatenates the two matrices |
| transpose | Transposes this instance. |
| normalize | Normalizes this instance. |
| inverse | Inverses this instance. |
| set_trs | Initializes the matrix with translation/rotation/scale |
| to_array | Converts 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