# `unreal.Matrix`?

class `unreal.``Matrix`(x_plane=[0.0, 0.0, 0.0, 0.0], y_plane=[0.0, 0.0, 0.0, 0.0], z_plane=[0.0, 0.0, 0.0, 0.0], w_plane=[0.0, 0.0, 0.0, 0.0])?

A 4x4 matrix. The full C++ class is located here: EngineSourceRuntimeCorePublicMathMatrix.h:

C++ Source:

• Module: CoreUObject
• File: NoExportTypes.h

Editor Properties: (see get_editor_property/set_editor_property)

• `w_plane` (Plane): [Read-Write] WPlane
• `x_plane` (Plane): [Read-Write] XPlane
• `y_plane` (Plane): [Read-Write] YPlane
• `z_plane` (Plane): [Read-Write] ZPlane
`IDENTITY` = None?

(Matrix) – Identity matrix

`__add__`(other)?

• `Matrix` Gets the result of adding a matrix to this.

`__eq__`(other)?

• `Matrix` Checks whether another Matrix is equal to this, within specified tolerance.

@param Other The other Matrix. @param Tolerance Error Tolerance. @return true if two Matrix are equal, within specified tolerance, otherwise false.

`__iadd__`(other)?

• `Matrix` Gets the result of adding a matrix to this.

`__imul__`(other)?

• `Matrix` Gets the result of multiplying a Matrix to this.

@param Other The matrix to multiply this by. @return The result of multiplication.

• `float` Multiplies all values of the matrix by a float. If your Matrix represents a Transform that you wish to scale you should use Apply Scale instead

`__mul__`(other)?

• `Matrix` Gets the result of multiplying a Matrix to this.

@param Other The matrix to multiply this by. @return The result of multiplication.

• `float` Multiplies all values of the matrix by a float. If your Matrix represents a Transform that you wish to scale you should use Apply Scale instead

`__ne__`(other)?

• `Matrix` Checks whether another Matrix is not equal to this, within specified tolerance.

@param Other The other Matrix. @return true if two Matrix are not equal, within specified tolerance, otherwise false.

`add`(b) → Matrix?

Gets the result of adding a matrix to this.

Parameters: b (Matrix) – The result of addition. Matrix
`apply_scale`(scale) → Matrix?

Apply Scale to this matrix (Assumes Matrix represents a transform)

Parameters: scale (float) – Matrix
`concatenate_translation`(translation) → Matrix?

Returns a matrix with an additional translation concatenated. (Assumes Matrix represents a transform)

Parameters: translation (Vector) – Matrix
`contains_na_n`() → bool?

Returns true if any element of this matrix is NaN

Returns: bool
`equals`(b, tolerance=0.000100) → bool?

Checks whether another Matrix is equal to this, within specified tolerance.

Parameters: b (Matrix) – tolerance (float) – Error Tolerance. true if two Matrix are equal, within specified tolerance, otherwise false. bool
`get_column`(column) → Vector?

get a column of this matrix

Parameters: column (MatrixColumns) – vector of the column Vector
`get_determinant`() → float?
Returns: determinant of this matrix. float
`get_frustum_bottom_plane`() → Plane or None?

Get the bottom plane of the Frustum of this matrix (Assumes Matrix represents a View Projection Matrix)

Returns: out_plane (Plane): the bottom plane of the Frustum of this matrix Plane or None
`get_frustum_far_plane`() → Plane or None?

Get the far plane of the Frustum of this matrix (Assumes Matrix represents a View Projection Matrix)

Returns: out_plane (Plane): the far plane of the Frustum of this matrix Plane or None
`get_frustum_left_plane`() → Plane or None?

Get the left plane of the Frustum of this matrix (Assumes Matrix represents a View Projection Matrix)

Returns: out_plane (Plane): the left plane of the Frustum of this matrix Plane or None
`get_frustum_near_plane`() → Plane or None?

Get the near plane of the Frustum of this matrix (Assumes Matrix represents a View Projection Matrix)

Returns: out_plane (Plane): the near plane of the Frustum of this matrix Plane or None
`get_frustum_right_plane`() → Plane or None?

Get the right plane of the Frustum of this matrix (Assumes Matrix represents a View Projection Matrix)

Returns: out_plane (Plane): the right plane of the Frustum of this matrix Plane or None
`get_frustum_top_plane`() → Plane or None?

Get the top plane of the Frustum of this matrix (Assumes Matrix represents a View Projection Matrix)

Returns: out_plane (Plane): the top plane of the Frustum of this matrix Plane or None
`get_inverse`() → Matrix?

Get the inverse of the Matrix. Handles nil matrices.

Returns: Matrix
`get_matrix_without_scale`(tolerance=0.000000) → Matrix?

Returns matrix after RemoveScaling with error Tolerance (Assumes Matrix represents a transform)

Parameters: tolerance (float) – Matrix
`get_maximum_axis_scale`() → float?
Returns: the maximum magnitude of any row of the matrix. (Assumes Matrix represents a transform) float
`get_origin`() → Vector?

Get the origin of the co-ordinate system (Assumes Matrix represents a transform)

Returns: co-ordinate system origin Vector
`get_rot_determinant`() → float?
Returns: the determinant of rotation 3x3 matrix (Assumes Top Left 3x3 Submatrix represents a Rotation) float
`get_rotator`() → Rotator?

Get the rotator representation of this matrix (Assumes Matrix represents a transform)

Returns: rotator representation of this matrix Rotator
`get_scale_vector`(tolerance=0.000000) → Vector?

return a 3D scale vector calculated from this matrix (where each component is the magnitude of a row vector) with error Tolerance. (Assumes Matrix represents a transform)

Parameters: tolerance (float) – Vector
`get_scaled_axes`() -> (x=Vector, y=Vector, z=Vector)?

get axes of this matrix scaled by the scale of the matrix (Assumes Matrix represents a transform)

Returns: x (Vector): axes returned to this paramy (Vector): axes returned to this param z (Vector): axes returned to this param tuple
`get_scaled_axis`(axis) → Vector?

get axis of this matrix scaled by the scale of the matrix (Assumes Matrix represents a transform)

Parameters: axis (AxisType) – vector of the axis Vector
`get_transpose_adjoint`() → Matrix?

Get the Transose Adjoint of the Matrix.

Returns: Matrix
`get_transposed`() → Matrix?

Transpose.

Returns: Matrix
`get_unit_axes`() -> (x=Vector, y=Vector, z=Vector)?

get unit length axes of this matrix (Assumes Matrix represents a transform)

Returns: x (Vector): axes returned to this paramy (Vector): axes returned to this param z (Vector): axes returned to this param tuple
`get_unit_axis`(axis) → Vector?

get unit length axis of this matrix (Assumes Matrix represents a transform)

Parameters: axis (AxisType) – vector of the axis Vector
`inverse_transform_position`(v) → Vector?

Inverts the matrix and then transforms V - correctly handles scaling in this matrix. (Assumes Matrix represents a transform)

Parameters: v (Vector) – Vector
`inverse_transform_vector`(v) → Vector?

Transform a direction vector by the inverse of this matrix - will not take into account translation part. If you want to transform a surface normal (or plane) and correctly account for non-uniform scaling you should use TransformByUsingAdjointT with adjoint of matrix inverse. (Assumes Matrix represents a transform)

Parameters: v (Vector) – Vector
`mirror`(mirror_axis, flip_axis) → Matrix?

Utility for mirroring this transform across a certain plane, and flipping one of the axis as well. (Assumes Matrix represents a transform)

Parameters: mirror_axis (AxisType) – flip_axis (AxisType) – Matrix
`multiply`(b) → Matrix?

Gets the result of multiplying a Matrix to this.

Parameters: b (Matrix) – The result of multiplication. Matrix
`multiply_float`(b) → Matrix?

Multiplies all values of the matrix by a float. If your Matrix represents a Transform that you wish to scale you should use Apply Scale instead

Parameters: b (float) – Matrix
`not_equal`(b, tolerance=0.000100) → bool?

Checks whether another Matrix is not equal to this, within specified tolerance.

Parameters: b (Matrix) – tolerance (float) – true if two Matrix are not equal, within specified tolerance, otherwise false. bool
`remove_scaling`(tolerance=0.000000) → None?

Remove any scaling from this matrix (ie magnitude of each row is 1) with error Tolerance (Assumes Matrix represents a transform)

Parameters: tolerance (float) –
`remove_translation`() → Matrix?

Remove any translation from this matrix (Assumes Matrix represents a transform)

Returns: Matrix
`rotator`() → Rotator?

Convert a Matrix to a Rotator (Assumes Matrix represents a transform)

Returns: Rotator
`scale_translation`(scale3d) → Matrix?

Scale the translation part of the matrix by the supplied vector. (Assumes Matrix represents a transform)

Parameters: scale3d (Vector) – Matrix
`set_axis`(axis, axis_vector) → None?

set an axis of this matrix (Assumes Matrix represents a transform)

Parameters: axis (AxisType) – vector of the axis axis_vector (Vector) –
`set_column`(column, value) → None?

Matrix Set Column

Parameters: column (MatrixColumns) – value (Vector) –
`set_origin`(new_origin) → None?

Set the origin of the coordinate system to the given vector (Assumes Matrix represents a transform)

Parameters: new_origin (Vector) –
`to_quat`() → Quat?

Transform a rotation matrix into a quaternion. (Assumes Matrix represents a transform) rotation part will need to be unit length for this to be right!:

Returns: Quat
`transform`() → Transform?

Convert a Matrix to a Transform (Assumes Matrix represents a transform)

Returns: Transform
`transform_position`(v) → Vector4?

Transform a location - will take into account translation part of the FMatrix. (Assumes Matrix represents a transform)

Parameters: v (Vector) – Vector4
`transform_vector`(v) → Vector4?

Transform a direction vector - will not take into account translation part of the FMatrix. If you want to transform a surface normal (or plane) and correctly account for non-uniform scaling you should use TransformByUsingAdjointT. (Assumes Matrix represents a transform)

Parameters: v (Vector) – Vector4
`transform_vector4`(v) → Vector4?

Transform a vector by the matrix. (Assumes Matrix represents a transform)

Parameters: v (Vector4) – Vector4
`w_plane`?

`x_plane`?
`y_plane`?
`z_plane`?