TTransform

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 TTransform

Variables

Name Description

Protected variable

TQuat< T >

 

Rotation

Rotation of this transformation, as a quaternion.

Protected variable

TVector< T >

 

Scale3D

3D scale (always applied in local space) as a vector.

Protected variable

TVector< T >

 

Translation

Translation of this transformation, as a vector.

Public variable

friend

 

Z_Construct_UScriptStruct_FTransform_Statics

Public variable

friend

 

Z_Construct_UScriptStruct_FTransform3d_Statics

Public variable

friend

 

Z_Construct_UScriptStruct_FTransform3f_Statics

Constructors

Name Description

Public function

TTransform()

Default constructor.

Public function

TTransform

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

Constructor that takes basis axes and translation

Public function

TTransform

(
    const TVector< T >& InTranslation
)

Constructor with an initial translation

Public function

TTransform

(
    ENoInit
)

Constructor with leaving uninitialized memory

Public function

TTransform

(
    const TQuat< T >& InRotation
)

Constructor with an initial rotation

Public function

TTransform

(
    const TRotator< T >& InRotation
)

Constructor with an initial rotation

Public function

TTransform

(
    const TMatrix< T >& InMatrix
)

Constructor for converting a Matrix (including scale) into a TTransform.

Public function

TTransform

(
    const TTransform< FArg >& From
)

Conversion to other type.

Public function

TTransform

(
    const TQuat< T >& InRotation,
    const TVector< T >& InTranslation,
    const TVector< T >& InScale3D
)

Constructor with all components initialized

Public function

TTransform

(
    const TRotator< T >& InRotation,
    const TVector< T >& InTranslation,
    const TVector< T >& InScale3D
)

Constructor with all components initialized, taking a TRotator as the rotation component

Functions

Name Description

Public function

void

 

Accumulate

(
    const TTransform< T >& SourceAtom
)

@note Added template type function for Accumulate The template type isn't much useful yet, but it is with the plan to move forward to unify blending features with just type of additive or full pose Eventually it would be nice to just call blend and it all works depending on full pose or additive, but right now that is a lot more refactoring For now this types only defines the different functionality of accumulate Accumulates another transform with this one

Public function

void

 

Accumulate

(
    const TTransform< T >& Atom,
    FReal BlendWeight
)

Accumulates another transform with this one, with a blending weight

Public function

void

 

AccumulateWithAdditiveScale

(
    const TTransform< T >& Atom,
    T BlendWeight
)

Accumulates another transform with this one, with a blending weight

Public function

void

 

AccumulateWithShortestRotation

(
    const TTransform< T >& DeltaAtom,
    FReal BlendWeight
)

Accumulates another transform with this one, with an optional blending weight

Public function

void

 

AddToTranslation

(
    const TVector< T >& DeltaTranslati...
)

Adjusts the translation component of this transformation

Public function Static

TVector< T >

 

AddTranslations

(
    const TTransform< T >& A,
    const TTransform< T >& B
)

Add the translations from two TTransforms and return the result.

Public function Static

bool

 

AnyHasNegativeScale

(
    const TVector< T >& InScale3D,
    const TVector< T >& InOtherScale3D
)

Public function Static

bool

 

AreRotationsEqual

(
    const TTransform< T >& A,
    const TTransform< T >& B,
    FReal Tolerance
)

Test if A's rotation equals B's rotation, within a tolerance. Preferred over "A.GetRotation().Equals(B.GetRotation())" because it is faster on some platforms.

Public function Static

bool

 

AreScale3DsEqual

(
    const TTransform< T >& A,
    const TTransform< T >& B,
    FReal Tolerance
)

Test if A's scale equals B's scale, within a tolerance. Preferred over "A.GetScale3D().Equals(B.GetScale3D())" because it is faster on some platforms.

Public function Static

bool

 

AreTranslationsEqual

(
    const TTransform< T >& A,
    const TTransform< T >& B,
    FReal Tolerance
)

Test if A's translation equals B's translation, within a tolerance. Preferred over "A.GetTranslation().Equals(B.GetTranslation())" because it is faster on some platforms.

Public function

void

 

Blend

(
    const TTransform< T >& Atom1,
    const TTransform< T >& Atom2,
    float Alpha
)

Set this transform to the weighted blend of the supplied two transforms.

Public function Static

void

 

BlendFromIdentityAndAccumulate

(
    TTransform< T >& FinalAtom,
    const TTransform< T >& SourceAtom,
    float BlendWeight
)

Blends the Identity transform with a weighted source transform and accumulates that into a destination transform

Public function

void

 

BlendWith

(
    const TTransform< T >& OtherAtom,
    float Alpha
)

Set this Transform to the weighted blend of it and the supplied Transform.

Public function

void

 

ConcatenateRotation

(
    const TQuat< T >& DeltaRotation
)

Concatenates another rotation to this transformation

Public function Const

bool

 

ContainsNaN()

Checks the components for non-finite values (NaN or Inf).

Public function

void

 

CopyRotation

(
    const TTransform< T >& Other
)

Copy rotation from another TTransform.

Public function

void

 

CopyRotationPart

(
    const TTransform< T >& SrcBA
)

Sets the Rotation and Scale3D of this transformation from another transform

Public function

void

 

CopyScale3D

(
    const TTransform< T >& Other
)

Copy scale from another TTransform.

Public function

void

 

CopyTranslation

(
    const TTransform< T >& Other
)

Copy translation from another TTransform.

Public function

void

 

CopyTranslationAndScale3D

(
    const TTransform< T >& SrcBA
)

Sets the Translation and Scale3D of this transformation from another transform

Public function Const

bool

 

DebugEqualMatrix

(
    const TMatrix< T >& Matrix
)

Debug purpose only

Public function Const

void

 

DebugPrint()

Does a debugf of the contents of this Transform.

Does a debugf of the contents of this BoneAtom.

Public function Const

void

 

DiagnosticCheck_IsValid()

Public function Const

void

 

DiagnosticCheckNaN_All()

Public function Const

void

 

DiagnosticCheckNaN_Rotate()

Public function Const

void

 

DiagnosticCheckNaN_Scale3D()

Public function Const

void

 

DiagnosticCheckNaN_Translate()

Public function Const

bool

 

Equals

(
    const TTransform< T >& Other,
    FReal Tolerance
)

Test if all components of the transforms are equal, within a tolerance.

Public function Const

bool

 

EqualsNoScale

(
    const TTransform< T >& Other,
    FReal Tolerance
)

Test if rotation and translation components of the transforms are equal, within a tolerance.

Public function Const

FReal

 

GetDeterminant()

Calculate the determinant of this transformation

Public function Const

TVector< T >

 

GetLocation()

Temp function for easy conversion

Public function Const

T

 

GetMaximumAxisScale()

Same version of TMatrix::GetMaximumAxisScale function

Public function Const

T

 

GetMinimumAxisScale()

Public function Const

TTransform< ...

 

GetRelativeTransform

(
    const TTransform< T >& Other
)

Public function Const

TTransform< ...

 

GetRelativeTransformReverse

(
    const TTransform< T >& Other
)

Public function Const

TQuat< T >

 

GetRotation()

Returns the rotation component

Public function Static

TVector< T >

 

GetSafeScaleReciprocal

(
    const TVector< T >& InScale,
    FReal Tolerance
)

Mathematically if you have 0 scale, it should be infinite, however, in practice if you have 0 scale, and relative transform doesn't make much sense anymore because you should be instead of showing gigantic infinite mesh also returning BIG_NUMBER causes sequential NaN issues by multiplying so we hardcode as 0

Public function Const

TVector< T >

 

GetScale3D()

Returns the Scale3D component

Public function Const

TTransform< ...

 

GetScaled

(
    T Scale
)

Apply Scale to this transform

Public function Const

TTransform< ...

 

GetScaled

(
    TVector< T > Scale
)

Apply Scale to this transform

Apply Scale to this transform

Public function Const

TVector< T >

 

GetScaledAxis

(
    EAxis::Type InAxis
)

X = 0, y = 1, z = 2

Apply Scale to this transform

Public function Const

TVector< T >

 

GetTranslation()

Returns the translation component

Public function Const

TVector< T >

 

GetUnitAxis

(
    EAxis::Type InAxis
)

X = 0, y = 1, z = 2

Public function Const

bool

 

Identical

(
    const TTransform< T >* Other,
    uint32 PortFlags
)

Test if all components of the transform property are equal.

Public function

bool

 

InitFromString

(
    const FString& InSourceString
)

Acceptable form: "%f,%f,%f|%f,%f,%f|%f,%f,%f"

Public function Const

TTransform< ...

 

Inverse()

Convert this Transform to inverse.

Public function Const

TVector< T >

 

InverseTransformPosition

(
    const TVector< T >& V
)

Do backward operation when inverse, translation -> rotation -> scale

Public function Const

TVector< T >

 

InverseTransformPositionNoScale

(
    const TVector< T >& V
)

Do backward operation when inverse, translation -> rotation -> scale

Public function Const

TQuat< T >

 

InverseTransformRotation

(
    const TQuat< T >& Q
)

Inverse transform a rotation.

Public function Const

TVector< T >

 

InverseTransformVector

(
    const TVector< T >& V
)

Do backward operation when inverse, translation -> rotation -> scale

Public function Const

TVector< T >

 

InverseTransformVectorNoScale

(
    const TVector< T >& V
)

Do backward operation when inverse, translation -> rotation -> scale

Public function Const

bool

 

IsRotationNormalized()

Checks whether the rotation component is normalized or not

Public function Const

bool

 

IsValid()

Public function

void

 

LerpTranslationScale3D

(
    const TTransform< T >& SourceAtom1,
    const TTransform< T >& SourceAtom2,
    float Alpha
)

Set the translation and Scale3D components of this transform to a linearly interpolated combination of two other transforms

Public function

void

 

Mirror

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

Public function Static

void

 

Multiply

(
    TTransform< T >* OutTransform,
    const TTransform< T >* A,
    const TTransform< T >* B
)

Create a new transform: OutTransform = A * B.

Public function

void

 

MultiplyScale3D

(
    const TVector< T >& Scale3DMultipl...
)

Scales the Scale3D component by a new factor

Public function

void

 

NormalizeRotation()

Normalize the rotation component of this transformation

Public function

void

 

RemoveScaling

(
    FReal Tolerance
)

This function is from matrix, and all it does is to normalize rotation portion

Public function Const

bool

 

RotationEquals

(
    const TTransform< T >& Other,
    FReal Tolerance
)

Test if this Transform's rotation equals another's rotation, within a tolerance. Preferred over "GetRotation().Equals(Other.GetRotation())" because it is faster on some platforms.

Public function Const

TRotator< T ...

 

Rotator()

Public function Const

bool

 

Scale3DEquals

(
    const TTransform< T >& Other,
    FReal Tolerance
)

Test if this Transform's scale equals another's scale, within a tolerance. Preferred over "GetScale3D().Equals(Other.GetScale3D())" because it is faster on some platforms.

Public function

void

 

ScaleTranslation

(
    const TVector< T >& InScale3D
)

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

Public function

void

 

ScaleTranslation

(
    const FReal& Scale
)

Public function

bool

 

Serialize

(
    FArchive& Ar
)

Public function

bool

 

SerializeFromMismatchedTag

(
    FName StructTag,
    FArchive& Ar
)

Public function

void

 

SetComponents

(
    const TQuat< T >& InRotation,
    const TVector< T >& InTranslation,
    const TVector< T >& InScale3D
)

Sets the components

Public function

void

 

SetFromMatrix

(
    const TMatrix< T >& InMatrix
)

Public function

void

 

SetIdentity()

Sets the components to the identity transform: Rotation = (0,0,0,1) Translation = (0,0,0) Scale3D = (1,1,1)

Public function

void

 

SetIdentityZeroScale()

Sets the components to the 'additive' identity transform: Rotation = (0,0,0,1) Translation = (0,0,0) Scale3D = (0,0,0)

Public function

void

 

SetLocation

(
    const TVector< T >& Origin
)

Set the translation of this transformation

Public function

void

 

SetRotation

(
    const TQuat< T >& NewRotation
)

Sets the rotation component

Public function

void

 

SetScale3D

(
    const TVector< T >& NewScale3D
)

Sets the Scale3D component

Public function

void

 

SetToRelativeTransform

(
    const TTransform< T >& ParentTrans...
)

Set current transform and the relative to ParentTransform.

Public function

void

 

SetTranslation

(
    const TVector< T >& NewTranslation
)

Sets the translation component

Public function

void

 

SetTranslationAndScale3D

(
    const TVector< T >& NewTranslation,
    const TVector< T >& NewScale3D
)

Sets both the translation and Scale3D components at the same time

Public function Static

TVector< T >

 

SubtractTranslations

(
    const TTransform< T >& A,
    const TTransform< T >& B
)

Subtract translations from two TTransforms and return the difference.

Public function Const

FString

 

ToHumanReadableString()

Convert TTransform contents to a string

Public function Const

TMatrix< T >

 

ToInverseMatrixWithScale()

Convert this Transform to matrix with scaling and compute the inverse of that.

Public function Const

TMatrix< T >

 

ToMatrixNoScale()

Convert this Transform to a transformation matrix, ignoring its scaling

Public function Const

TMatrix< T >

 

ToMatrixWithScale()

Convert this Transform to a transformation matrix with scaling.

Public function Const

FString

 

ToString()

Public function Const

FVector4

 

TransformFVector4

(
    const FVector4& V
)

Transform FVector4

Public function Const

FVector4

 

TransformFVector4NoScale

(
    const FVector4& V
)

Transform FVector4

Transform homogenous FVector4, ignoring the scaling part of this transform

Public function Const

TVector< T >

 

TransformPosition

(
    const TVector< T >& V
)

Public function Const

TVector< T >

 

TransformPositionNoScale

(
    const TVector< T >& V
)

Public function Const

TQuat< T >

 

TransformRotation

(
    const TQuat< T >& Q
)

Transform a rotation.

Public function Const

TVector< T >

 

TransformVector

(
    const TVector< T >& V
)

Public function Const

TVector< T >

 

TransformVectorNoScale

(
    const TVector< T >& V
)

Public function Const

bool

 

TranslationEquals

(
    const TTransform< T >& Other,
    FReal Tolerance
)

Test if this Transform's translation equals another's translation, within a tolerance. Preferred over "GetTranslation().Equals(Other.GetTranslation())" because it is faster on some platforms.

Operators

Name Description

Public function Const

TTransform< ...

 

operator*

(
    const TTransform< T >& Other
)

Return a transform that is the result of this multiplied by another transform.

Public function Const

TTransform< ...

 

operator*

(
    T Mult
)

Public function Const

TTransform< ...

 

operator*

(
    const TQuat< T >& Other
)

Return a transform that is the result of this multiplied by another transform (made only from a rotation).

Public function

TTransform< ...

 

operator*=

(
    T Mult
)

Public function

void

 

operator*=

(
    const TTransform< T >& Other
)

Sets this transform to the result of this multiplied by another transform.

Public function

void

 

operator*=

(
    const TQuat< T >& Other
)

Sets this transform to the result of this multiplied by another transform (made only from a rotation).

Public function Const

TTransform< ...

 

operator+

(
    const TTransform< T >& Atom
)

Quaternion addition is wrong here.

Public function

TTransform< ...

 

operator+=

(
    const TTransform< T >& Atom
)

Typedefs

Name

Description

FReal

Constants

Name

Description

Identity

The identity transformation (Rotation = TQuat::Identity, Translation = TVector::ZeroVector, Scale3D = (1,1,1)).