UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TransformCalculus3D.h File Reference
#include "CoreTypes.h"
#include "Math/Vector.h"
#include "Math/Rotator.h"
#include "Math/Matrix.h"
#include "Math/RotationMatrix.h"
#include "Math/TranslationMatrix.h"
#include "Math/Quat.h"
#include "Math/ScaleMatrix.h"
#include "Math/TransformCalculus.h"

Go to the source code of this file.

Classes

class  TScale< T >
 
struct  TransformConverter< FMatrix44f >
 
struct  TransformConverter< FMatrix44d >
 
struct  ConcatenateRules< float, TScale< T > >
 
struct  ConcatenateRules< double, TScale< T > >
 
struct  ConcatenateRules< TScale< T >, float >
 
struct  ConcatenateRules< TScale< T >, double >
 
struct  ConcatenateRules< float, UE::Math::TVector< T > >
 
struct  ConcatenateRules< double, UE::Math::TVector< T > >
 
struct  ConcatenateRules< UE::Math::TVector< T >, float >
 
struct  ConcatenateRules< UE::Math::TVector< T >, double >
 
struct  ConcatenateRules< float, UE::Math::TRotator< T > >
 
struct  ConcatenateRules< double, UE::Math::TRotator< T > >
 
struct  ConcatenateRules< UE::Math::TRotator< T >, float >
 
struct  ConcatenateRules< UE::Math::TRotator< T >, double >
 
struct  ConcatenateRules< float, UE::Math::TQuat< T > >
 
struct  ConcatenateRules< double, UE::Math::TQuat< T > >
 
struct  ConcatenateRules< UE::Math::TQuat< T >, float >
 
struct  ConcatenateRules< UE::Math::TQuat< T >, double >
 
struct  ConcatenateRules< float, UE::Math::TMatrix< T > >
 
struct  ConcatenateRules< double, UE::Math::TMatrix< T > >
 
struct  ConcatenateRules< UE::Math::TMatrix< T >, float >
 
struct  ConcatenateRules< UE::Math::TMatrix< T >, double >
 
struct  ConcatenateRules< TScale< T >, UE::Math::TVector< T > >
 
struct  ConcatenateRules< UE::Math::TVector< T >, TScale< T > >
 
struct  ConcatenateRules< TScale< T >, UE::Math::TRotator< T > >
 
struct  ConcatenateRules< UE::Math::TRotator< T >, TScale< T > >
 
struct  ConcatenateRules< TScale< T >, UE::Math::TQuat< T > >
 
struct  ConcatenateRules< UE::Math::TQuat< T >, TScale< T > >
 
struct  ConcatenateRules< TScale< T >, UE::Math::TMatrix< T > >
 
struct  ConcatenateRules< UE::Math::TMatrix< T >, TScale< T > >
 
struct  ConcatenateRules< UE::Math::TVector< T >, UE::Math::TRotator< T > >
 
struct  ConcatenateRules< UE::Math::TRotator< T >, UE::Math::TVector< T > >
 
struct  ConcatenateRules< UE::Math::TVector< T >, UE::Math::TQuat< T > >
 
struct  ConcatenateRules< UE::Math::TQuat< T >, UE::Math::TVector< T > >
 
struct  ConcatenateRules< UE::Math::TVector< T >, UE::Math::TMatrix< T > >
 
struct  ConcatenateRules< UE::Math::TMatrix< T >, UE::Math::TVector< T > >
 
struct  ConcatenateRules< UE::Math::TRotator< T >, UE::Math::TQuat< T > >
 
struct  ConcatenateRules< UE::Math::TQuat< T >, UE::Math::TRotator< T > >
 
struct  ConcatenateRules< UE::Math::TRotator< T >, UE::Math::TMatrix< T > >
 
struct  ConcatenateRules< UE::Math::TMatrix< T >, UE::Math::TRotator< T > >
 
struct  ConcatenateRules< UE::Math::TQuat< T >, UE::Math::TMatrix< T > >
 
struct  ConcatenateRules< UE::Math::TMatrix< T >, UE::Math::TQuat< T > >
 

Namespaces

namespace  UE
 
namespace  UE::Math
 

Typedefs

typedef TScale< floatFScale3f
 
typedef TScale< doubleFScale3d
 
typedef FScale3f FScale3D
 

Functions

template<typename TransformType >
auto ToMatrix (const TransformType &Transform) -> decltype(Transform.ToMatrix())
 
const UE::Math::TMatrix< float > & ToMatrix (const UE::Math::TMatrix< float > &Transform)
 
const UE::Math::TMatrix< double > & ToMatrix (const UE::Math::TMatrix< double > &Transform)
 
UE::Math::TMatrix< floatToMatrix (float Scale)
 
UE::Math::TMatrix< doubleToMatrix (double Scale)
 
UE::Math::TMatrix< floatToMatrix (const TScale< float > &Scale)
 
UE::Math::TMatrix< doubleToMatrix (const TScale< double > &Scale)
 
UE::Math::TMatrix< floatToMatrix (const UE::Math::TVector< float > &Translation)
 
UE::Math::TMatrix< doubleToMatrix (const UE::Math::TVector< double > &Translation)
 
UE::Math::TMatrix< floatToMatrix (const UE::Math::TRotator< float > &Rotation)
 
UE::Math::TMatrix< doubleToMatrix (const UE::Math::TRotator< double > &Rotation)
 
UE::Math::TMatrix< floatToMatrix (const UE::Math::TQuat< float > &Rotation)
 
UE::Math::TMatrix< doubleToMatrix (const UE::Math::TQuat< double > &Rotation)
 
template<typename T >
UE::Math::TMatrix< T > UE::Math::Concatenate (const UE::Math::TMatrix< T > &LHS, const UE::Math::TMatrix< T > &RHS)
 
template<typename T >
UE::Math::TVector< T > UE::Math::Concatenate (const UE::Math::TVector< T > &LHS, const UE::Math::TVector< T > &RHS)
 
template<typename T >
UE::Math::TQuat< T > UE::Math::Concatenate (const UE::Math::TQuat< T > &LHS, const UE::Math::TQuat< T > &RHS)
 
template<typename T >
UE::Math::TRotator< T > Concatenate (const UE::Math::TRotator< T > &LHS, const UE::Math::TRotator< T > &RHS)
 
template<typename T >
UE::Math::TMatrix< T > Inverse (const UE::Math::TMatrix< T > &Transform)
 
template<typename T >
UE::Math::TRotator< T > Inverse (const UE::Math::TRotator< T > &Transform)
 
template<typename T >
UE::Math::TQuat< T > Inverse (const UE::Math::TQuat< T > &Transform)
 
template<typename T >
UE::Math::TVector< T > Inverse (const UE::Math::TVector< T > &Transform)
 
template<typename T >
UE::Math::TVector< T > TransformPoint (const UE::Math::TMatrix< T > &Transform, const UE::Math::TVector< T > &Point)
 
template<typename T >
UE::Math::TVector< T > TransformPoint (const UE::Math::TQuat< T > &Transform, const UE::Math::TVector< T > &Point)
 
template<typename T >
UE::Math::TVector< T > TransformVector (const UE::Math::TQuat< T > &Transform, const UE::Math::TVector< T > &Vector)
 
template<typename T >
UE::Math::TVector< T > TransformPoint (const UE::Math::TRotator< T > &Transform, const UE::Math::TVector< T > &Point)
 
template<typename T >
UE::Math::TVector< T > TransformVector (const UE::Math::TRotator< T > &Transform, const UE::Math::TVector< T > &Vector)
 
template<typename T >
UE::Math::TVector< T > TransformPoint (const UE::Math::TVector< T > &Transform, const UE::Math::TVector< T > &Point)
 
template<typename T >
const UE::Math::TVector< T > & TransformVector (const UE::Math::TVector< T > &Transform, const UE::Math::TVector< T > &Vector)
 
template<typename T >
UE::Math::TVector< T > TransformPoint (const TScale< T > &Transform, const UE::Math::TVector< T > &Point)
 
template<typename T >
UE::Math::TVector< T > TransformVector (const TScale< T > &Transform, const UE::Math::TVector< T > &Vector)
 

Typedef Documentation

◆ FScale3d

◆ FScale3D

◆ FScale3f

Function Documentation

◆ Concatenate()

template<typename T >
UE::Math::TRotator< T > Concatenate ( const UE::Math::TRotator< T > &  LHS,
const UE::Math::TRotator< T > &  RHS 
)
inline

Specialization for concatenating two rotations.

Parameters
LHSrotation that goes from space A to space B
RHSrotation that goes from space B to space C.
Returns
a new rotation representing the transformation from the input space of LHS to the output space of RHS.

◆ Inverse() [1/4]

template<typename T >
UE::Math::TMatrix< T > Inverse ( const UE::Math::TMatrix< T > &  Transform)
inline

Inverts a transform from space A to space B so it transforms from space B to space A. Specialization for UE::Math::TMatrix<T>.

Parameters
TransformInput transform from space A to space B.
Returns
Inverted transform from space B to space A.

◆ Inverse() [2/4]

template<typename T >
UE::Math::TQuat< T > Inverse ( const UE::Math::TQuat< T > &  Transform)
inline

Inverts a transform from space A to space B so it transforms from space B to space A. Specialization for UE::Math::TQuat<T>.

Parameters
TransformInput transform from space A to space B.
Returns
Inverted transform from space B to space A.

◆ Inverse() [3/4]

template<typename T >
UE::Math::TRotator< T > Inverse ( const UE::Math::TRotator< T > &  Transform)
inline

Inverts a transform from space A to space B so it transforms from space B to space A. Specialization for UE::Math::TRotator<T>.

Parameters
TransformInput transform from space A to space B.
Returns
Inverted transform from space B to space A.

◆ Inverse() [4/4]

template<typename T >
UE::Math::TVector< T > Inverse ( const UE::Math::TVector< T > &  Transform)
inline

Inverts a transform from space A to space B so it transforms from space B to space A. Specialization for translation.

Parameters
TransformInput transform from space A to space B.
Returns
Inverted transform from space B to space A.

◆ ToMatrix() [1/13]

template<typename TransformType >
auto ToMatrix ( const TransformType &  Transform) -> decltype(Transform.ToMatrix())
inline

Converts a generic transform to a matrix using a ToMatrix() member function. Uses decltype to allow some classes to return const-ref types for efficiency.

Parameters
Transform
Returns
the UE::Math::TMatrix<T> stored by the Transform.

◆ ToMatrix() [2/13]

UE::Math::TMatrix< double > ToMatrix ( const TScale< double > &  Scale)
inline

◆ ToMatrix() [3/13]

UE::Math::TMatrix< float > ToMatrix ( const TScale< float > &  Scale)
inline

Specialization for non-uniform Scale.

Parameters
ScaleNon-uniform Scale
Returns
Matrix that represents the non-uniform Scale space.

◆ ToMatrix() [4/13]

const UE::Math::TMatrix< double > & ToMatrix ( const UE::Math::TMatrix< double > &  Transform)
inline

◆ ToMatrix() [5/13]

const UE::Math::TMatrix< float > & ToMatrix ( const UE::Math::TMatrix< float > &  Transform)
inline

Specialization for the NULL Matrix conversion.

Parameters
ScaleUniform Scale
Returns
Matrix that represents the uniform Scale space.

◆ ToMatrix() [6/13]

UE::Math::TMatrix< double > ToMatrix ( const UE::Math::TQuat< double > &  Rotation)
inline

◆ ToMatrix() [7/13]

UE::Math::TMatrix< float > ToMatrix ( const UE::Math::TQuat< float > &  Rotation)
inline

Specialization for rotation.

Parameters
RotationRotation
Returns
Matrix that represents the rotated space.

◆ ToMatrix() [8/13]

UE::Math::TMatrix< double > ToMatrix ( const UE::Math::TRotator< double > &  Rotation)
inline

◆ ToMatrix() [9/13]

UE::Math::TMatrix< float > ToMatrix ( const UE::Math::TRotator< float > &  Rotation)
inline

Specialization for rotation.

Parameters
RotationRotation
Returns
Matrix that represents the rotated space.

◆ ToMatrix() [10/13]

UE::Math::TMatrix< double > ToMatrix ( const UE::Math::TVector< double > &  Translation)
inline

◆ ToMatrix() [11/13]

UE::Math::TMatrix< float > ToMatrix ( const UE::Math::TVector< float > &  Translation)
inline

Specialization for translation.

Parameters
TranslationTranslation
Returns
Matrix that represents the translated space.

◆ ToMatrix() [12/13]

UE::Math::TMatrix< double > ToMatrix ( double  Scale)
inline

◆ ToMatrix() [13/13]

UE::Math::TMatrix< float > ToMatrix ( float  Scale)
inline

Specialization for floats as a uniform scale.

Parameters
ScaleUniform Scale
Returns
Matrix that represents the uniform Scale space.

◆ TransformPoint() [1/5]

template<typename T >
UE::Math::TVector< T > TransformPoint ( const TScale< T > &  Transform,
const UE::Math::TVector< T > &  Point 
)
inline

Specialization for Scale.

◆ TransformPoint() [2/5]

template<typename T >
UE::Math::TVector< T > TransformPoint ( const UE::Math::TMatrix< T > &  Transform,
const UE::Math::TVector< T > &  Point 
)
inline

Specialization for UE::Math::TMatrix<T> as it's member function is called something slightly different.

◆ TransformPoint() [3/5]

template<typename T >
UE::Math::TVector< T > TransformPoint ( const UE::Math::TQuat< T > &  Transform,
const UE::Math::TVector< T > &  Point 
)
inline

Specialization for UE::Math::TQuat<T> as it's member function is called something slightly different.

◆ TransformPoint() [4/5]

template<typename T >
UE::Math::TVector< T > TransformPoint ( const UE::Math::TRotator< T > &  Transform,
const UE::Math::TVector< T > &  Point 
)
inline

Specialization for UE::Math::TRotator<T> as it's member function is called something slightly different.

◆ TransformPoint() [5/5]

template<typename T >
UE::Math::TVector< T > TransformPoint ( const UE::Math::TVector< T > &  Transform,
const UE::Math::TVector< T > &  Point 
)
inline

Specialization for UE::Math::TVector<T> Translation.

◆ TransformVector() [1/4]

template<typename T >
UE::Math::TVector< T > TransformVector ( const TScale< T > &  Transform,
const UE::Math::TVector< T > &  Vector 
)
inline

Specialization for Scale.

◆ TransformVector() [2/4]

template<typename T >
UE::Math::TVector< T > TransformVector ( const UE::Math::TQuat< T > &  Transform,
const UE::Math::TVector< T > &  Vector 
)
inline

Specialization for UE::Math::TQuat<T> as it's member function is called something slightly different.

◆ TransformVector() [3/4]

template<typename T >
UE::Math::TVector< T > TransformVector ( const UE::Math::TRotator< T > &  Transform,
const UE::Math::TVector< T > &  Vector 
)
inline

Specialization for UE::Math::TRotator<T> as it's member function is called something slightly different.

◆ TransformVector() [4/4]

template<typename T >
const UE::Math::TVector< T > & TransformVector ( const UE::Math::TVector< T > &  Transform,
const UE::Math::TVector< T > &  Vector 
)
inline

Specialization for UE::Math::TVector<T> Translation (does nothing).