UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Math Namespace Reference

Namespaces

namespace  VectorRegisterPrivate
 

Classes

class  FLinearFeedbackShiftRegister
 
struct  TBasisVectorMatrix
 
struct  TBox
 
struct  TBox2
 
struct  TBoxConstInit
 
struct  TBoxSphereBounds
 
struct  TCapsuleShape
 
struct  TClipProjectionMatrix
 
struct  TDualQuat
 
struct  TIntPoint
 
struct  TIntRect
 
struct  TIntVector2
 
struct  TIntVector3
 
struct  TIntVector4
 
struct  TInverseRotationMatrix
 
struct  TLookAtMatrix
 
struct  TLookFromMatrix
 
struct  TMatrix
 
struct  TMirrorMatrix
 
struct  TOrthoMatrix
 
struct  TPerspectiveMatrix
 
struct  TPlane
 
struct  TPolynomialRootSolver
 
struct  TQuat
 
struct  TQuatRotationMatrix
 
struct  TQuatRotationTranslationMatrix
 
struct  TRay
 
struct  TReversedZOrthoMatrix
 
struct  TReversedZPerspectiveMatrix
 
struct  TRotationAboutPointMatrix
 
struct  TRotationMatrix
 
struct  TRotationTranslationMatrix
 
struct  TRotator
 
struct  TScaleMatrix
 
struct  TScaleRotationTranslationMatrix
 
struct  TSphere
 
struct  TTransform
 
struct  TTranslationMatrix
 
struct  TVector
 
struct  TVector2
 
struct  TVector4
 
struct  TVectorConstInit
 

Functions

template<typename T >
FORCEINLINE_DEBUGGABLE TQuat< T > FindBetween_Helper (const TVector< T > &A, const TVector< T > &B, T NormAB)
 
template<typename T >
uint32 GetTypeHash (const TBox< T > &Box)
 
FArchiveoperator<< (FArchive &Ar, TBoxSphereBounds< float, float > &Bounds)
 
FArchiveoperator<< (FArchive &Ar, TBoxSphereBounds< double, double > &Bounds)
 
template<typename IntType >
uint32 GetTypeHash (const TIntPoint< IntType > &InPoint)
 
template<typename IntType >
uint32 GetTypeHash (const TIntRect< IntType > &InRect)
 
template<typename T >
uint32 GetTypeHash (const TIntVector2< T > &Vector)
 
template<typename T >
uint32 GetTypeHash (const TIntVector3< T > &Vector)
 
template<typename T >
uint32 GetTypeHash (const TIntVector4< T > &Vector)
 
FArchiveoperator<< (FArchive &Ar, TMatrix< float > &M)
 
FArchiveoperator<< (FArchive &Ar, TMatrix< double > &M)
 
template<typename T >
bool MakeFrustumPlane (T A, T B, T C, T D, TPlane< T > &OutPlane)
 
FArchiveoperator<< (FArchive &Ar, TPlane< float > &P)
 
FArchiveoperator<< (FArchive &Ar, TPlane< double > &P)
 
FArchiveoperator<< (FArchive &Ar, TQuat< float > &F)
 
FArchiveoperator<< (FArchive &Ar, TQuat< double > &F)
 
template<typename T >
UE_FORCEINLINE_HINT TQuat< T > operator* (const float Scale, const TQuat< T > &Q)
 
template<typename T >
UE_FORCEINLINE_HINT TQuat< T > operator* (const double Scale, const TQuat< T > &Q)
 
template<typename T >
uint32 GetTypeHash (const TQuat< T > &Quat)
 
FArchiveoperator<< (FArchive &Ar, TRotator< float > &R)
 
FArchiveoperator<< (FArchive &Ar, TRotator< double > &R)
 
template<typename T , typename FArg UE_REQUIRES>
UE_FORCEINLINE_HINT TRotator< T > operator* (FArg Scale, const TRotator< T > &R)
 
FArchiveoperator<< (FArchive &Ar, TSphere< float > &Sphere)
 
FArchiveoperator<< (FArchive &Ar, TSphere< double > &Sphere)
 
template<typename T >
uint32 GetTypeHash (const TTransform< T > &Transform)
 
template<typename T >
UE::Math::TVector2< T > Concatenate (const UE::Math::TVector2< T > &LHS, const UE::Math::TVector2< T > &RHS)
 
template<typename T >
UE::Math::TMatrix< T > Concatenate (const UE::Math::TMatrix< T > &LHS, const UE::Math::TMatrix< T > &RHS)
 
template<typename T >
UE::Math::TVector< T > Concatenate (const UE::Math::TVector< T > &LHS, const UE::Math::TVector< T > &RHS)
 
template<typename T >
UE::Math::TQuat< T > Concatenate (const UE::Math::TQuat< T > &LHS, const UE::Math::TQuat< T > &RHS)
 
FArchiveoperator<< (FArchive &Ar, TVector< float > &V)
 
FArchiveoperator<< (FArchive &Ar, TVector< double > &V)
 
void operator<< (FStructuredArchive::FSlot Slot, TVector< float > &V)
 
void operator<< (FStructuredArchive::FSlot Slot, TVector< double > &V)
 
template<typename T , typename T2 UE_REQUIRES>
UE_FORCEINLINE_HINT TVector< T > operator* (T2 Scale, const TVector< T > &V)
 
template<typename T >
UE_FORCEINLINE_HINT uint32 GetTypeHash (const TVector< T > &Vector)
 
template<typename T >
UE_FORCEINLINE_HINT uint32 GetTypeHash (const TVector2< T > &Vector)
 
FArchiveoperator<< (FArchive &Ar, TVector2< float > &V)
 
void operator<< (FStructuredArchive::FSlot Slot, TVector2< float > &V)
 
FArchiveoperator<< (FArchive &Ar, TVector2< double > &V)
 
void operator<< (FStructuredArchive::FSlot Slot, TVector2< double > &V)
 
template<typename T , typename T2 UE_REQUIRES>
UE_FORCEINLINE_HINT TVector2< T > operator* (T2 Scale, const TVector2< T > &V)
 
FArchiveoperator<< (FArchive &Ar, TVector4< float > &V)
 
FArchiveoperator<< (FArchive &Ar, TVector4< double > &V)
 
template<typename T , typename T2 UE_REQUIRES>
UE_FORCEINLINE_HINT TVector4< T > operator* (T2 Scale, const TVector4< T > &V)
 
template<typename RealType >
std::ostream & operator<< (std::ostream &os, const TVector2< RealType > &Vec)
 
template<typename RealType >
std::ostream & operator<< (std::ostream &os, const TVector4< RealType > &Vec)
 

Detailed Description

Implements an axis-aligned box.

Boxes describe an axis-aligned extent in three dimensions. They are used for many different things in the Engine and in games, such as bounding volumes, collision detection and visibility calculation.

Function Documentation

◆ Concatenate() [1/4]

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

Specialization for concatenating two Matrices.

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.

◆ Concatenate() [2/4]

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

Specialization for concatenating two rotations.

NOTE: UE::Math::TQuat<T> concatenates right to left, opposite of how UE::Math::TMatrix<T> implements it. Confusing, no? That's why we have these high level functions!

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.

◆ Concatenate() [3/4]

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

Specialization for concatenating two 2D Translations.

◆ Concatenate() [4/4]

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

Specialization for concatenating two translations.

Parameters
LHSTranslation that goes from space A to space B
RHSTranslation that goes from space B to space C.
Returns
a new Translation representing the transformation from the input space of LHS to the output space of RHS.

◆ FindBetween_Helper()

template<typename T >
FORCEINLINE_DEBUGGABLE TQuat< T > UE::Math::FindBetween_Helper ( const TVector< T > &  A,
const TVector< T > &  B,
NormAB 
)

◆ GetTypeHash() [1/10]

template<typename T >
uint32 UE::Math::GetTypeHash ( const TBox< T > &  Box)

◆ GetTypeHash() [2/10]

template<typename IntType >
uint32 UE::Math::GetTypeHash ( const TIntPoint< IntType > &  InPoint)

◆ GetTypeHash() [3/10]

template<typename IntType >
uint32 UE::Math::GetTypeHash ( const TIntRect< IntType > &  InRect)

◆ GetTypeHash() [4/10]

template<typename T >
uint32 UE::Math::GetTypeHash ( const TIntVector2< T > &  Vector)

Creates a hash value from an IntVector2.

Parameters
Vectorthe vector to create a hash value for
Returns
The hash value from the components

◆ GetTypeHash() [5/10]

template<typename T >
uint32 UE::Math::GetTypeHash ( const TIntVector3< T > &  Vector)

Creates a hash value from an IntVector3.

Parameters
Vectorthe vector to create a hash value for
Returns
The hash value from the components

◆ GetTypeHash() [6/10]

template<typename T >
uint32 UE::Math::GetTypeHash ( const TIntVector4< T > &  Vector)

Creates a hash value from an IntVector4.

Parameters
Vectorthe vector to create a hash value for
Returns
The hash value from the components

◆ GetTypeHash() [7/10]

template<typename T >
uint32 UE::Math::GetTypeHash ( const TQuat< T > &  Quat)
inline

Creates a hash value from an FQuat.

Parameters
Quatthe quat to create a hash value for
Returns
The hash value from the components

◆ GetTypeHash() [8/10]

template<typename T >
uint32 UE::Math::GetTypeHash ( const TTransform< T > &  Transform)
inline

Creates a hash value from an FTransform.

Parameters
Transformthe transform to create a hash value for
Returns
The hash value from the components

◆ GetTypeHash() [9/10]

template<typename T >
UE_FORCEINLINE_HINT uint32 UE::Math::GetTypeHash ( const TVector2< T > &  Vector)

Creates a hash value from a TVector2<T>.

Parameters
Vectorthe vector to create a hash value for
Returns
The hash value from the components

◆ GetTypeHash() [10/10]

template<typename T >
UE_FORCEINLINE_HINT uint32 UE::Math::GetTypeHash ( const TVector< T > &  Vector)

Creates a hash value from an FVector.

Parameters
Vectorthe vector to create a hash value for
Returns
The hash value from the components

◆ MakeFrustumPlane()

template<typename T >
bool UE::Math::MakeFrustumPlane ( A,
B,
C,
D,
TPlane< T > &  OutPlane 
)
inline

◆ operator*() [1/6]

template<typename T >
UE_FORCEINLINE_HINT TQuat< T > UE::Math::operator* ( const double  Scale,
const TQuat< T > &  Q 
)

◆ operator*() [2/6]

template<typename T >
UE_FORCEINLINE_HINT TQuat< T > UE::Math::operator* ( const float  Scale,
const TQuat< T > &  Q 
)

◆ operator*() [3/6]

template<typename T , typename FArg UE_REQUIRES>
UE_FORCEINLINE_HINT TRotator< T > UE::Math::operator* ( FArg  Scale,
const TRotator< T > &  R 
)

Scale a rotator and return.

Parameters
Scalescale to apply to R.
Rrotator to be scaled.
Returns
Scaled rotator.

◆ operator*() [4/6]

template<typename T , typename T2 UE_REQUIRES>
UE_FORCEINLINE_HINT TVector2< T > UE::Math::operator* ( T2  Scale,
const TVector2< T > &  V 
)

Multiplies a Vector2 by a scaling factor.

Parameters
ScaleScaling factor.
VVector2 to scale.
Returns
Result of multiplication.

◆ operator*() [5/6]

template<typename T , typename T2 UE_REQUIRES>
UE_FORCEINLINE_HINT TVector4< T > UE::Math::operator* ( T2  Scale,
const TVector4< T > &  V 
)

Scales a vector.

Parameters
ScaleThe scaling factor.
VThe vector to scale.
Returns
The result of scaling.

◆ operator*() [6/6]

template<typename T , typename T2 UE_REQUIRES>
UE_FORCEINLINE_HINT TVector< T > UE::Math::operator* ( T2  Scale,
const TVector< T > &  V 
)

Multiplies a vector by a scaling factor.

Parameters
ScaleScaling factor.
VVector to scale.
Returns
Result of multiplication.

◆ operator<<() [1/24]

FArchive & UE::Math::operator<< ( FArchive Ar,
TBoxSphereBounds< double, double > &  Bounds 
)
inline

Serializes the given bounding volume from or into the specified archive.

Parameters
ArThe archive to serialize from or into.
BoundsThe bounding volume to serialize.
Returns
The archive..

◆ operator<<() [2/24]

FArchive & UE::Math::operator<< ( FArchive Ar,
TBoxSphereBounds< float, float > &  Bounds 
)
inline

Serializes the given bounding volume from or into the specified archive.

Parameters
ArThe archive to serialize from or into.
BoundsThe bounding volume to serialize.
Returns
The archive..

◆ operator<<() [3/24]

FArchive & UE::Math::operator<< ( FArchive Ar,
TMatrix< double > &  M 
)
inline

Serializes the Matrix.

Parameters
ArReference to the serialization archive.
MReference to the matrix being serialized.
Returns
Reference to the Archive after serialization.

◆ operator<<() [4/24]

FArchive & UE::Math::operator<< ( FArchive Ar,
TMatrix< float > &  M 
)
inline

Serializes the Matrix.

Parameters
ArReference to the serialization archive.
MReference to the matrix being serialized.
Returns
Reference to the Archive after serialization.

◆ operator<<() [5/24]

FArchive & UE::Math::operator<< ( FArchive Ar,
TPlane< double > &  P 
)
inline

Serializer.

Parameters
ArSerialization Archive.
PPlane to serialize.
Returns
Reference to Archive after serialization.

◆ operator<<() [6/24]

FArchive & UE::Math::operator<< ( FArchive Ar,
TPlane< float > &  P 
)
inline

Serializer.

Parameters
ArSerialization Archive.
PPlane to serialize.
Returns
Reference to Archive after serialization.

◆ operator<<() [7/24]

FArchive & UE::Math::operator<< ( FArchive Ar,
TQuat< double > &  F 
)
inline

◆ operator<<() [8/24]

FArchive & UE::Math::operator<< ( FArchive Ar,
TQuat< float > &  F 
)
inline

Serializes the quaternion.

Parameters
ArReference to the serialization archive.
FReference to the quaternion being serialized.
Returns
Reference to the Archive after serialization.

◆ operator<<() [9/24]

FArchive & UE::Math::operator<< ( FArchive Ar,
TRotator< double > &  R 
)
inline

◆ operator<<() [10/24]

FArchive & UE::Math::operator<< ( FArchive Ar,
TRotator< float > &  R 
)
inline

Serializer.

Parameters
ArSerialization Archive.
RRotator being serialized.
Returns
Reference to Archive after serialization.

◆ operator<<() [11/24]

FArchive & UE::Math::operator<< ( FArchive Ar,
TSphere< double > &  Sphere 
)
inline

Serializes the given sphere from or into the specified archive.

Parameters
ArThe archive to serialize from or into.
SphereThe sphere to serialize.
Returns
The archive.

◆ operator<<() [12/24]

FArchive & UE::Math::operator<< ( FArchive Ar,
TSphere< float > &  Sphere 
)
inline

Serializes the given sphere from or into the specified archive.

Parameters
ArThe archive to serialize from or into.
SphereThe sphere to serialize.
Returns
The archive.

◆ operator<<() [13/24]

FArchive & UE::Math::operator<< ( FArchive Ar,
TVector2< double > &  V 
)
inline

◆ operator<<() [14/24]

FArchive & UE::Math::operator<< ( FArchive Ar,
TVector2< float > &  V 
)
inline

Serialize a vector.

Parameters
ArSerialization archive.
VVector being serialized.
Returns
Reference to Archive after serialization.

◆ operator<<() [15/24]

FArchive & UE::Math::operator<< ( FArchive Ar,
TVector4< double > &  V 
)
inline

◆ operator<<() [16/24]

FArchive & UE::Math::operator<< ( FArchive Ar,
TVector4< float > &  V 
)
inline

Serializer.

Parameters
ArThe Serialization Archive.
VThe vector being serialized.
Returns
Reference to the Archive after serialization.

◆ operator<<() [17/24]

FArchive & UE::Math::operator<< ( FArchive Ar,
TVector< double > &  V 
)
inline

Serializer for FVector3d.

Parameters
ArSerialization Archive.
VVector to serialize.

◆ operator<<() [18/24]

FArchive & UE::Math::operator<< ( FArchive Ar,
TVector< float > &  V 
)
inline

Serializer for FVector3f.

Parameters
ArSerialization Archive.
VVector to serialize.

◆ operator<<() [19/24]

void UE::Math::operator<< ( FStructuredArchive::FSlot  Slot,
TVector2< double > &  V 
)
inline

◆ operator<<() [20/24]

void UE::Math::operator<< ( FStructuredArchive::FSlot  Slot,
TVector2< float > &  V 
)
inline

◆ operator<<() [21/24]

void UE::Math::operator<< ( FStructuredArchive::FSlot  Slot,
TVector< double > &  V 
)
inline

Structured archive slot serializer for FVector3d.

Parameters
SlotStructured archive slot.
VVector to serialize.

◆ operator<<() [22/24]

void UE::Math::operator<< ( FStructuredArchive::FSlot  Slot,
TVector< float > &  V 
)
inline

Structured archive slot serializer for FVector3f.

Parameters
SlotStructured archive slot.
VVector to serialize.

◆ operator<<() [23/24]

template<typename RealType >
std::ostream & UE::Math::operator<< ( std::ostream &  os,
const TVector2< RealType > &  Vec 
)

◆ operator<<() [24/24]

template<typename RealType >
std::ostream & UE::Math::operator<< ( std::ostream &  os,
const TVector4< RealType > &  Vec 
)