TMatrix

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/CoreFwd.h

Include

#include "CoreFwd.h"

Syntax

template<typename T>
struct TMatrix

Variables

Name Description

Public variable

T[4][4]

 

M

Constructors

Name Description

Public function

TMatrix()

Constructors.

Public function

TMatrix

(
    EForceInit
)

Constructor.

Public function

TMatrix

(
    const TMatrix< FArg >& From
)

Conversion to other type. TODO: explicit!

Public function

TMatrix

(
    const TPlane< T >& InX,
    const TPlane< T >& InY,
    const TPlane< T >& InZ,
    const TPlane< T >& InW
)

Constructor.

Public function

TMatrix

(
    const TVector< T >& InX,
    const TVector< T >& InY,
    const TVector< T >& InZ,
    const TVector< T >& InW
)

Constructor.

Functions

Name Description

Public function Const

TMatrix< T >

 

ApplyScale

(
    T Scale
)

Apply Scale to this matrix

Public function Const

uint32

 

ComputeHash()

For debugging purpose, could be changed

Public function Const

TMatrix< T >

 

ConcatTranslation

(
    const TVector< T >& Translation
)

Returns a matrix with an additional translation concatenated.

Public function Const

bool

 

ContainsNaN()

Returns true if any element of this matrix is NaN

Public function Const

void

 

DebugPrint()

Output ToString

Public function Const

T

 

Determinant()

Public function Const

void

 

DiagnosticCheckNaN()

Public function Const

bool

 

Equals

(
    const TMatrix< T >& Other,
    T Tolerance
)

Error-tolerant comparison.

Public function

TVector< T >

 

ExtractScaling

(
    T Tolerance
)

Remove any scaling from this matrix (ie magnitude of each row is 1) and return the 3D scale vector that was initially present with error Tolerance

Public function Const

TVector< T >

 

GetColumn

(
    int32 i
)

Get a column of this matrix

Public function Const

bool

 

GetFrustumBottomPlane

(
    TPlane< T >& OuTPln
)

Public function Const

bool

 

GetFrustumFarPlane

(
    TPlane< T >& OuTPln
)

Public function Const

bool

 

GetFrustumLeftPlane

(
    TPlane< T >& OuTPln
)

Public function Const

bool

 

GetFrustumNearPlane

(
    TPlane< T >& OuTPln
)

Frustum plane extraction.

Public function Const

bool

 

GetFrustumRightPlane

(
    TPlane< T >& OuTPln
)

Public function Const

bool

 

GetFrustumTopPlane

(
    TPlane< T >& OuTPln
)

Public function Const

TMatrix< T >

 

GetMatrixWithoutScale

(
    T Tolerance
)

Returns matrix after RemoveScaling with error Tolerance.

Public function Const

T

 

GetMaximumAxisScale()

Public function Const

T

 

GetMinimumAxisScale()

Public function Const

TVector< T >

 

GetOrigin()

Public function Const

void

 

GetScaledAxes

(
    TVector< T >& X,
    TVector< T >& Y,
    TVector< T >& Z
)

Get axes of this matrix scaled by the scale of the matrix

Public function Const

TVector< T >

 

GetScaledAxis

(
    EAxis::Type Axis
)

Get axis of this matrix scaled by the scale of the matrix

Public function Const

TVector< T >

 

GetScaleVector

(
    T Tolerance
)

Return a 3D scale vector calculated from this matrix (where each component is the magnitude of a row vector) with error Tolerance.

Public function Const

TMatrix< T >

 

GetTransposed()

Public function Const

void

 

GetUnitAxes

(
    TVector< T >& X,
    TVector< T >& Y,
    TVector< T >& Z
)

Get unit length axes of this matrix

Public function Const

TVector< T >

 

GetUnitAxis

(
    EAxis::Type Axis
)

Get unit length axis of this matrix

Public function Const

TMatrix< T >

 

Inverse()

Inverse.

Public function Const

TMatrix< T >

 

InverseFast()

Inverse.

Public function Const

TVector< T >

 

InverseTransformPosition

(
    const TVector< T >& V
)

Inverts the matrix and then transforms V - correctly handles scaling in this matrix.

Public function Const

TVector< T >

 

InverseTransformVector

(
    const TVector< T >& V
)

Transform a direction vector by the inverse of this matrix - will not take into account translation part.

Public function

void

 

Mirror

(
    EAxis::Type MirrorAxis,
    EAxis::Type FlipAxis
)

Utility for mirroring this transform across a certain plane, and flipping one of the axis as well.

Public function

void

 

RemoveScaling

(
    T Tolerance
)

Remove any scaling from this matrix (ie magnitude of each row is 1) with error Tolerance.

Public function Const

TMatrix< T >

 

RemoveTranslation()

Remove any translation from this matrix.

Public function Const

UE::Math::TR...

 

Rotator()

Public function Const

T

 

RotDeterminant()

Calculate determinant of rotation 3x3 matrix

Public function

void

 

ScaleTranslation

(
    const TVector< T >& Scale3D
)

Scale the translation part of the matrix by the supplied vector.

Public function

bool

 

Serialize

(
    FArchive& Ar
)

Public function

bool

 

SerializeFromMismatchedTag

(
    FName StructTag,
    FArchive& Ar
)

Public function

void

 

SetAxes

(
    const TVector< T >* Axis0,
    const TVector< T >* Axis1,
    const TVector< T >* Axis2,
    const TVector< T >* Origin
)

Update the axes of the matrix if any value is NULL do not update that axis

Public function

void

 

SetAxis

(
    int32 i,
    const TVector< T >& Axis
)

Set an axis of this matrix

Public function

void

 

SetColumn

(
    int32 i,
    TVector< T > Value
)

Set a column of this matrix

Public function

void

 

SetIdentity()

Set this to the identity matrix.

Public function

void

 

SetOrigin

(
    const TVector< T >& NewOrigin
)

Set the origin of the coordinate system to the given vector.

Public function Const

void

 

To3x4MatrixTranspose

(
    T* Out
)

Convert this Atom to the 3x4 transpose of the transformation matrix.

Public function Const

UE::Math::TQ...

 

ToQuat()

Transform a rotation matrix into a quaternion.

Public function Const

FString

 

ToString()

Get a textual representation of the vector.

Public function Const

TVector4< T ...

 

TransformFVector4

(
    const TVector4< T >& V
)

Homogeneous transform.

Public function Const

TVector4< T ...

 

TransformPosition

(
    const TVector< T >& V
)

Transform a location - will take into account translation part of the TMatrix.

Public function Const

TVector4< T ...

 

TransformVector

(
    const TVector< T >& V
)

Transform a direction vector - will not take into account translation part of the TMatrix.

Public function Const

TMatrix< T >

 

TransposeAdjoint()

Operators

Name Description

Public function Const

bool

 

operator!=

(
    const TMatrix< T >& Other
)

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

Public function Const

TMatrix< T >

 

operator*

(
    const TMatrix< T >& Other
)

Gets the result of multiplying a Matrix to this.

Public function Const

TMatrix< T >

 

operator*

(
    T Other
)

This isn't applying SCALE, just multiplying the value to all members - i.e. weighting

Public function

void

 

operator*=

(
    const TMatrix< T >& Other
)

Multiply this by a matrix.

Public function

void

 

operator*=

(
    T Other
)

Multiply this matrix by a weighting factor.

Public function Const

TMatrix< T >

 

operator+

(
    const TMatrix< T >& Other
)

Gets the result of adding a matrix to this.

Public function

void

 

operator+=

(
    const TMatrix< T >& Other
)

Adds to this matrix.

Public function Const

bool

 

operator==

(
    const TMatrix< T >& Other
)

Checks whether two matrix are identical.

Typedefs

Name

Description

FReal

Constants

Name

Description

Identity