UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Geometry::TTransformSRT3< RealType > Class Template Reference

#include <TransformTypes.h>

Public Member Functions

 TTransformSRT3 ()
 
 TTransformSRT3 (const TQuaternion< RealType > &RotationIn, const UE::Math::TVector< RealType > &TranslationIn, const UE::Math::TVector< RealType > &ScaleIn)
 
 TTransformSRT3 (const TQuaternion< RealType > &RotationIn, const UE::Math::TVector< RealType > &TranslationIn)
 
 TTransformSRT3 (const UE::Math::TVector< RealType > &TranslationIn)
 
 TTransformSRT3 (const FTransform3f &Transform)
 
 TTransformSRT3 (const FTransform3d &Transform)
 
 operator FTransform3f () const
 
 operator FTransform3d () const
 
const TQuaternion< RealType > & GetRotation () const
 
FRotator GetRotator () const
 
void SetRotation (const TQuaternion< RealType > &RotationIn)
 
const TVector< RealType > & GetTranslation () const
 
void SetTranslation (const UE::Math::TVector< RealType > &TranslationIn)
 
const TVector< RealType > & GetScale () const
 
const TVector< RealType > & GetScale3D () const
 
void SetScale (const UE::Math::TVector< RealType > &ScaleIn)
 
RealType GetDeterminant () const
 
bool HasNonUniformScale (RealType Tolerance=TMathUtil< RealType >::ZeroTolerance) const
 
TTransformSRT3< RealType > InverseUnsafe (RealType Tolerance=TMathUtil< RealType >::ZeroTolerance) const
 
bool CanRepresentInverse (RealType Tolerance=TMathUtil< RealType >::ZeroTolerance) const
 
template<typename RealType2 >
TVector< RealType2TransformPosition (const TVector< RealType2 > &P) const
 
template<typename RealType2 >
TVector< RealType2TransformVector (const UE::Math::TVector< RealType2 > &V) const
 
template<typename RealType2 >
TVector< RealType2TransformVectorNoScale (const UE::Math::TVector< RealType2 > &V) const
 
template<typename RealType2 >
TVector< RealType2TransformNormal (const UE::Math::TVector< RealType2 > &Normal) const
 
template<typename RealType2 >
TVector< RealType2InverseTransformPosition (const UE::Math::TVector< RealType2 > &P) const
 
template<typename RealType2 >
TVector< RealType2InverseTransformVector (const UE::Math::TVector< RealType2 > &V) const
 
template<typename RealType2 >
TVector< RealType2InverseTransformVectorNoScale (const UE::Math::TVector< RealType2 > &V) const
 
template<typename RealType2 >
TVector< RealType2InverseTransformNormal (const UE::Math::TVector< RealType2 > &Normal) const
 
UE::Math::TRay< RealType > TransformRay (const UE::Math::TRay< RealType > &Ray) const
 
UE::Math::TRay< RealType > InverseTransformRay (const UE::Math::TRay< RealType > &Ray) const
 
void ClampMinimumScale (RealType MinimumScale=TMathUtil< RealType >::ZeroTolerance)
 

Static Public Member Functions

static TTransformSRT3< RealType > Identity ()
 
static TVector< RealType > GetSafeScaleReciprocal (const TVector< RealType > &InScale, RealType Tolerance=TMathUtil< RealType >::ZeroTolerance)
 

Protected Attributes

TQuaternion< RealType > Rotation
 
TVector< RealType > Translation
 
TVector< RealType > Scale3D
 

Detailed Description

template<typename RealType>
class UE::Geometry::TTransformSRT3< RealType >

TTransformSRT3 is a variant of the standard UE FTransform/TTransform that uses the UE::Geometry::TQuaternion instead of the UE::Math::TQuat.

Transform order is Scale, then Rotate, then Translate. So mathematically (T * R * S) * v , assuming traditional matrix-vector multiplication order (note that the UE::Math library uses the opposite vector*Matrix ordering for TMatrix!)

Implicit constructors/casts are defined to/from FTransform3d and FTransform3f. This will likely be revised in future so that conversions that lose precision are explicit.

Constructor & Destructor Documentation

◆ TTransformSRT3() [1/6]

template<typename RealType >
UE::Geometry::TTransformSRT3< RealType >::TTransformSRT3 ( )
inline

◆ TTransformSRT3() [2/6]

template<typename RealType >
UE::Geometry::TTransformSRT3< RealType >::TTransformSRT3 ( const TQuaternion< RealType > &  RotationIn,
const UE::Math::TVector< RealType > &  TranslationIn,
const UE::Math::TVector< RealType > &  ScaleIn 
)
inline

◆ TTransformSRT3() [3/6]

template<typename RealType >
UE::Geometry::TTransformSRT3< RealType >::TTransformSRT3 ( const TQuaternion< RealType > &  RotationIn,
const UE::Math::TVector< RealType > &  TranslationIn 
)
inlineexplicit

◆ TTransformSRT3() [4/6]

template<typename RealType >
UE::Geometry::TTransformSRT3< RealType >::TTransformSRT3 ( const UE::Math::TVector< RealType > &  TranslationIn)
inlineexplicit

◆ TTransformSRT3() [5/6]

template<typename RealType >
UE::Geometry::TTransformSRT3< RealType >::TTransformSRT3 ( const FTransform3f Transform)
inline

◆ TTransformSRT3() [6/6]

template<typename RealType >
UE::Geometry::TTransformSRT3< RealType >::TTransformSRT3 ( const FTransform3d Transform)
inline

Member Function Documentation

◆ CanRepresentInverse()

template<typename RealType >
bool UE::Geometry::TTransformSRT3< RealType >::CanRepresentInverse ( RealType  Tolerance = TMathUtil<RealType>::ZeroTolerance) const
inline

Reports wheth the inverse is representable with a single TTransformSRT3. (Ignores zeros in scale.)

◆ ClampMinimumScale()

template<typename RealType >
void UE::Geometry::TTransformSRT3< RealType >::ClampMinimumScale ( RealType  MinimumScale = TMathUtil<RealType>::ZeroTolerance)
inline

Clamp all scale components to a minimum value. Sign of scale components is preserved. This is used to remove uninvertible zero/near-zero scaling.

◆ GetDeterminant()

template<typename RealType >
RealType UE::Geometry::TTransformSRT3< RealType >::GetDeterminant ( ) const
inline
Returns
determinant of scale matrix

◆ GetRotation()

template<typename RealType >
const TQuaternion< RealType > & UE::Geometry::TTransformSRT3< RealType >::GetRotation ( ) const
inline
Returns
Rotation portion of Transform, as Quaternion

◆ GetRotator()

template<typename RealType >
FRotator UE::Geometry::TTransformSRT3< RealType >::GetRotator ( ) const
inline
Returns
Rotation portion of Transform, as FRotator

◆ GetSafeScaleReciprocal()

template<typename RealType >
static TVector< RealType > UE::Geometry::TTransformSRT3< RealType >::GetSafeScaleReciprocal ( const TVector< RealType > &  InScale,
RealType  Tolerance = TMathUtil<RealType>::ZeroTolerance 
)
inlinestatic

◆ GetScale()

template<typename RealType >
const TVector< RealType > & UE::Geometry::TTransformSRT3< RealType >::GetScale ( ) const
inline
Returns
Scale portion of transform

◆ GetScale3D()

template<typename RealType >
const TVector< RealType > & UE::Geometry::TTransformSRT3< RealType >::GetScale3D ( ) const
inline
Returns
Scale portion of transform

◆ GetTranslation()

template<typename RealType >
const TVector< RealType > & UE::Geometry::TTransformSRT3< RealType >::GetTranslation ( ) const
inline
Returns
Translation portion of transform

◆ HasNonUniformScale()

template<typename RealType >
bool UE::Geometry::TTransformSRT3< RealType >::HasNonUniformScale ( RealType  Tolerance = TMathUtil<RealType>::ZeroTolerance) const
inline
Returns
true if scale is nonuniform, within tolerance

◆ Identity()

template<typename RealType >
static TTransformSRT3< RealType > UE::Geometry::TTransformSRT3< RealType >::Identity ( )
inlinestatic
Returns
identity transform, IE no rotation, zero origin, unit scale

◆ InverseTransformNormal()

template<typename RealType >
template<typename RealType2 >
TVector< RealType2 > UE::Geometry::TTransformSRT3< RealType >::InverseTransformNormal ( const UE::Math::TVector< RealType2 > &  Normal) const
inline

Surface Normals are special, their inverse transform is InverseRotate( Normalize(Scale * Normal) ) )

Returns
input surface normal with inverse transform applied.

◆ InverseTransformPosition()

template<typename RealType >
template<typename RealType2 >
TVector< RealType2 > UE::Geometry::TTransformSRT3< RealType >::InverseTransformPosition ( const UE::Math::TVector< RealType2 > &  P) const
inline
Returns
input vector with inverse-QST transformation applied, ie QSTinv(P) = InverseScale(InverseRotate(P - Translate))

◆ InverseTransformRay()

template<typename RealType >
UE::Math::TRay< RealType > UE::Geometry::TTransformSRT3< RealType >::InverseTransformRay ( const UE::Math::TRay< RealType > &  Ray) const
inline

◆ InverseTransformVector()

template<typename RealType >
template<typename RealType2 >
TVector< RealType2 > UE::Geometry::TTransformSRT3< RealType >::InverseTransformVector ( const UE::Math::TVector< RealType2 > &  V) const
inline
Returns
input vector with inverse-QS transformation applied, ie QSinv(V) = InverseScale(InverseRotate(V))

◆ InverseTransformVectorNoScale()

template<typename RealType >
template<typename RealType2 >
TVector< RealType2 > UE::Geometry::TTransformSRT3< RealType >::InverseTransformVectorNoScale ( const UE::Math::TVector< RealType2 > &  V) const
inline
Returns
input vector with inverse-Q transformation applied, ie Qinv(V) = InverseRotate(V)

◆ InverseUnsafe()

template<typename RealType >
TTransformSRT3< RealType > UE::Geometry::TTransformSRT3< RealType >::InverseUnsafe ( RealType  Tolerance = TMathUtil<RealType>::ZeroTolerance) const
inline

Attempts to return an inverse, but will give an incorrect result if the transform has both non-uniform scaling and rotation, because TTransformSRT3<RealType> cannot represent the true inverse in that case.

◆ operator FTransform3d()

template<typename RealType >
UE::Geometry::TTransformSRT3< RealType >::operator FTransform3d ( ) const
inline
Returns
this transform converted to FTransform3d

◆ operator FTransform3f()

template<typename RealType >
UE::Geometry::TTransformSRT3< RealType >::operator FTransform3f ( ) const
inline
Returns
this transform converted to FTransform

◆ SetRotation()

template<typename RealType >
void UE::Geometry::TTransformSRT3< RealType >::SetRotation ( const TQuaternion< RealType > &  RotationIn)
inline

Set Rotation portion of Transform

◆ SetScale()

template<typename RealType >
void UE::Geometry::TTransformSRT3< RealType >::SetScale ( const UE::Math::TVector< RealType > &  ScaleIn)
inline

set Scale portion of transform

◆ SetTranslation()

template<typename RealType >
void UE::Geometry::TTransformSRT3< RealType >::SetTranslation ( const UE::Math::TVector< RealType > &  TranslationIn)
inline

set Translation portion of transform

◆ TransformNormal()

template<typename RealType >
template<typename RealType2 >
TVector< RealType2 > UE::Geometry::TTransformSRT3< RealType >::TransformNormal ( const UE::Math::TVector< RealType2 > &  Normal) const
inline

Surface Normals are special, their transform is Rotate( Normalize( (1/Scale) * Normal) ) ). However 1/Scale requires special handling in case any component is near-zero.

Returns
input surface normal with transform applied.

◆ TransformPosition()

template<typename RealType >
template<typename RealType2 >
TVector< RealType2 > UE::Geometry::TTransformSRT3< RealType >::TransformPosition ( const TVector< RealType2 > &  P) const
inline
Returns
input point with QST transformation applied, ie QST(P) = Rotate(Scale*P) + Translate

◆ TransformRay()

template<typename RealType >
UE::Math::TRay< RealType > UE::Geometry::TTransformSRT3< RealType >::TransformRay ( const UE::Math::TRay< RealType > &  Ray) const
inline

◆ TransformVector()

template<typename RealType >
template<typename RealType2 >
TVector< RealType2 > UE::Geometry::TTransformSRT3< RealType >::TransformVector ( const UE::Math::TVector< RealType2 > &  V) const
inline
Returns
input vector with QS transformation applied, ie QS(V) = Rotate(Scale*V)

◆ TransformVectorNoScale()

template<typename RealType >
template<typename RealType2 >
TVector< RealType2 > UE::Geometry::TTransformSRT3< RealType >::TransformVectorNoScale ( const UE::Math::TVector< RealType2 > &  V) const
inline
Returns
input vector with Q transformation applied, ie Q(V) = Rotate(V)

Member Data Documentation

◆ Rotation

template<typename RealType >
TQuaternion<RealType> UE::Geometry::TTransformSRT3< RealType >::Rotation
protected

◆ Scale3D

template<typename RealType >
TVector<RealType> UE::Geometry::TTransformSRT3< RealType >::Scale3D
protected

◆ Translation

template<typename RealType >
TVector<RealType> UE::Geometry::TTransformSRT3< RealType >::Translation
protected

The documentation for this class was generated from the following file: