Navigation
Unreal Engine C++ API Reference > Runtime > Core > Math
Inheritance Hierarchy
- TTransform
- TRigidTransform< FReal, 2 >
- TRigidTransform< FRealDouble, 3 >
- TRigidTransform< FRealSingle, 3 >
References
Module | Core |
Header | /Engine/Source/Runtime/Core/Public/Math/MathFwd.h |
Include | #include "Math/MathFwd.h" |
Syntax
template<typename T>
struct TTransform
Variables
Type | Name | Description | |
---|---|---|---|
![]() |
TQuat< T > | Rotation | Rotation of this transformation, as a quaternion. |
![]() |
TVector< T > | Scale3D | 3D scale (always applied in local space) as a vector. |
![]() |
TVector< T > | Translation | Translation of this transformation, as a vector. |
![]() |
friend | Z_Construct_UScriptStruct_FTransform_Statics | |
![]() |
friend | Z_Construct_UScriptStruct_FTransform3d_Statics | |
![]() |
friend | Z_Construct_UScriptStruct_FTransform3f_Statics |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
TTransform () |
Default constructor. | |
![]() |
TTransform
(
const TVector< T >& InX, |
Constructor that takes basis axes and translation | |
![]() |
TTransform
(
const TVector< T >& InTranslation |
Constructor with an initial translation | |
![]() |
TTransform
(
ENoInit |
Constructor with leaving uninitialized memory | |
![]() |
TTransform
(
const TQuat< T >& InRotation |
Constructor with an initial rotation | |
![]() |
TTransform
(
const TRotator< T >& InRotation |
Constructor with an initial rotation | |
![]() |
TTransform
(
const TMatrix< T >& InMatrix |
Constructor for converting a Matrix (including scale) into a TTransform |
|
![]() |
TTransform
(
const TTransform< FArg >& From |
Conversion to other type. | |
![]() |
TTransform
(
const TQuat< T >& InRotation, |
Constructor with all components initialized | |
![]() |
TTransform
(
const TRotator< T >& InRotation, |
Constructor with all components initialized, taking a TRotator |
Functions
Type | Name | Description | |
---|---|---|---|
![]() |
void | Accumulate
(
const TTransform< T >& SourceAtom |
: 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 |
![]() |
void | Accumulate
(
const TTransform< T >& Atom, |
Accumulates another transform with this one, with a blending weight |
![]() |
void | AccumulateWithAdditiveScale
(
const TTransform< T >& Atom, |
Accumulates another transform with this one, with a blending weight |
![]() |
void | AccumulateWithShortestRotation
(
const TTransform< T >& DeltaAtom, |
Accumulates another transform with this one, with an optional blending weight |
![]() |
void | AddToTranslation
(
const TVector< T >& DeltaTranslation |
Adjusts the translation component of this transformation |
![]() ![]() |
TVector< T > | AddTranslations
(
const TTransform< T >& A, |
Add the translations from two TTransform |
![]() ![]() |
bool | AnyHasNegativeScale
(
const TVector< T >& InScale3D, |
|
![]() ![]() |
bool | AreRotationsEqual
(
const TTransform< T >& A, |
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. |
![]() ![]() |
bool | AreScale3DsEqual
(
const TTransform< T >& A, |
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. |
![]() ![]() |
bool | AreTranslationsEqual
(
const TTransform< T >& A, |
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. |
![]() |
void | Blend
(
const TTransform< T >& Atom1, |
Set this transform to the weighted blend of the supplied two transforms. |
![]() ![]() |
void | BlendFromIdentityAndAccumulate
(
TTransform< T >& FinalAtom, |
Blends the Identity transform with a weighted source transform and accumulates that into a destination transform |
![]() |
void | BlendWith
(
const TTransform< T >& OtherAtom, |
Set this Transform to the weighted blend of it and the supplied Transform. |
![]() |
void | ConcatenateRotation
(
const TQuat< T >& DeltaRotation |
Concatenates another rotation to this transformation |
![]() ![]() |
bool | ContainsNaN () |
Checks the components for non-finite values (NaN or Inf). |
![]() |
void | CopyRotation
(
const TTransform< T >& Other |
Copy rotation from another TTransform |
![]() |
void | CopyRotationPart
(
const TTransform< T >& SrcBA |
Sets the Rotation and Scale3D of this transformation from another transform |
![]() |
void | CopyScale3D
(
const TTransform< T >& Other |
Copy scale from another TTransform |
![]() |
void | CopyTranslation
(
const TTransform< T >& Other |
Copy translation from another TTransform |
![]() |
void | CopyTranslationAndScale3D
(
const TTransform< T >& SrcBA |
Sets the Translation and Scale3D of this transformation from another transform |
![]() ![]() |
bool | DebugEqualMatrix
(
const TMatrix< T >& Matrix |
Debug purpose only |
![]() ![]() |
void | DebugPrint () |
Does a debugf of the contents of this Transform.Does a debugf of the contents of this BoneAtom. |
![]() ![]() |
void | ||
![]() ![]() |
void | ||
![]() ![]() |
void | ||
![]() ![]() |
void | ||
![]() ![]() |
void | ||
![]() ![]() |
bool | Equals
(
const TTransform< T >& Other, |
Test if all components of the transforms are equal, within a tolerance. |
![]() ![]() |
bool | EqualsNoScale
(
const TTransform< T >& Other, |
Test if rotation and translation components of the transforms are equal, within a tolerance. |
![]() ![]() |
FReal | Calculate the determinant of this transformation | |
![]() ![]() |
TVector< T > | GetLocation () |
Temp function for easy conversion |
![]() ![]() |
T | Same version of TMatrix |
|
![]() ![]() |
T | ||
![]() ![]() |
TTransform< T > | GetRelativeTransform
(
const TTransform< T >& Other |
|
![]() ![]() |
TTransform< T > | GetRelativeTransformReverse
(
const TTransform< T >& Other |
|
![]() ![]() |
TQuat< T > | GetRotation () |
Returns the rotation component |
![]() ![]() |
TransformVectorRegister | ||
![]() ![]() |
TVector< T > | GetSafeScaleReciprocal
(
const TVector< T >& InScale, |
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 |
![]() ![]() |
TVector< T > | GetScale3D () |
Returns the Scale3D component |
![]() ![]() |
TTransform< T > | GetScaled
(
T Scale |
Apply Scale to this transform |
![]() ![]() |
TTransform< T > | Apply Scale to this transformApply Scale to this transform | |
![]() ![]() |
TVector< T > | GetScaledAxis
(
EAxis::Type InAxis |
X = 0, y = 1, z = 2Apply Scale to this transform |
![]() ![]() |
TVector< T > | Returns the translation component | |
![]() ![]() |
TransformVectorRegister | For low-level VectorRegister programming. | |
![]() ![]() |
TVector< T > | GetUnitAxis
(
EAxis::Type InAxis |
X = 0, y = 1, z = 2 |
![]() ![]() |
bool | Identical
(
const TTransform< T >* Other, |
Test if all components of the transform property are equal. |
![]() |
bool | InitFromString
(
const FString& InSourceString |
Acceptable form: "%f,%f,%f|%f,%f,%f|%f,%f,%f" |
![]() ![]() |
TTransform< T > | Inverse () |
Convert this Transform to inverse. |
![]() ![]() |
TVector< T > | InverseTransformPosition
(
const TVector< T >& V |
Do backward operation when inverse, translation -> rotation -> scale |
![]() ![]() |
TVector< T > | InverseTransformPositionNoScale
(
const TVector< T >& V |
Do backward operation when inverse, translation -> rotation -> scale |
![]() ![]() |
TQuat< T > | InverseTransformRotation
(
const TQuat< T >& Q |
Inverse transform a rotation. |
![]() ![]() |
TVector< T > | InverseTransformVector
(
const TVector< T >& V |
Do backward operation when inverse, translation -> rotation -> scale |
![]() ![]() |
TVector< T > | InverseTransformVectorNoScale
(
const TVector< T >& V |
Do backward operation when inverse, translation -> rotation -> scale |
![]() ![]() |
bool | Checks whether the rotation component is normalized or not | |
![]() ![]() |
bool | IsValid () |
|
![]() |
void | LerpTranslationScale3D
(
const TTransform< T >& SourceAtom1, |
Set the translation and Scale3D components of this transform to a linearly interpolated combination of two other transforms |
![]() |
void | Mirror
(
EAxis::Type MirrorAxis, |
|
![]() ![]() |
void | Multiply
(
TTransform< T >* OutTransform, |
Create a new transform: OutTransform = A * B. |
![]() |
void | MultiplyScale3D
(
const TVector< T >& Scale3DMultiplier |
Scales the Scale3D component by a new factor |
![]() |
void | Normalize the rotation component of this transformation | |
![]() |
void | RemoveScaling
(
FReal Tolerance |
This function is from matrix, and all it does is to normalize rotation portion |
![]() ![]() |
bool | RotationEquals
(
const TTransform< T >& Other, |
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. |
![]() ![]() |
TRotator< T > | Rotator () |
|
![]() ![]() |
bool | Scale3DEquals
(
const TTransform< T >& Other, |
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. |
![]() |
void | ScaleTranslation
(
const TVector< T >& InScale3D |
Scale the translation part of the Transform by the supplied vector. |
![]() |
void | ScaleTranslation
(
const FReal& Scale |
|
![]() |
bool | ||
![]() |
bool | SerializeFromMismatchedTag
(
FName StructTag, |
|
![]() |
void | SetComponents
(
const TQuat< T >& InRotation, |
Sets the components |
![]() |
void | SetFromMatrix
(
const TMatrix< T >& InMatrix |
|
![]() |
void | SetIdentity () |
Sets the components to the identity transform: Rotation = (0,0,0,1) Translation = (0,0,0) Scale3D = (1,1,1) |
![]() |
void | Sets the components to the 'additive' identity transform: Rotation = (0,0,0,1) Translation = (0,0,0) Scale3D = (0,0,0) | |
![]() |
void | SetLocation
(
const TVector< T >& Origin |
Set the translation of this transformation |
![]() |
void | SetRotation
(
const TQuat< T >& NewRotation |
Sets the rotation component |
![]() |
void | SetRotationRegister
(
TransformVectorRegister InRotation |
|
![]() |
void | SetScale3D
(
const TVector< T >& NewScale3D |
Sets the Scale3D component |
![]() |
void | SetToRelativeTransform
(
const TTransform< T >& ParentTransform |
Set current transform and the relative to ParentTransform. |
![]() |
void | SetTranslation
(
const TVector< T >& NewTranslation |
Sets the translation component |
![]() |
void | SetTranslationAndScale3D
(
const TVector< T >& NewTranslation, |
Sets both the translation and Scale3D components at the same time |
![]() |
void | SetTranslationRegister
(
TransformVectorRegister InTranslation |
|
![]() ![]() |
TVector< T > | SubtractTranslations
(
const TTransform< T >& A, |
Subtract translations from two TTransform |
![]() ![]() |
FString | Convert TTransform |
|
![]() ![]() |
TMatrix< T > | Convert this Transform to matrix with scaling and compute the inverse of that. | |
![]() ![]() |
TMatrix< T > | Convert this Transform to a transformation matrix, ignoring its scaling | |
![]() ![]() |
TMatrix< T > | Convert this Transform to a transformation matrix with scaling. | |
![]() ![]() |
FString | ToString () |
|
![]() ![]() |
TVector4< T > | TransformFVector4
(
const TVector4< T >& V |
Transform TVector4 |
![]() ![]() |
TVector4< T > | TransformFVector4NoScale
(
const TVector4< T >& V |
Transform TVector4 |
![]() ![]() |
TVector< T > | TransformPosition
(
const TVector< T >& V |
|
![]() ![]() |
TVector< T > | TransformPositionNoScale
(
const TVector< T >& V |
|
![]() ![]() |
TQuat< T > | TransformRotation
(
const TQuat< T >& Q |
Transform a rotation. |
![]() ![]() |
TVector< T > | TransformVector
(
const TVector< T >& V |
|
![]() ![]() |
TVector< T > | TransformVectorNoScale
(
const TVector< T >& V |
|
![]() ![]() |
bool | TranslationEquals
(
const TTransform< T >& Other, |
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
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
TTransform< T > | Return a transform that is the result of this multiplied by another transform (made only from a rotation). | |
![]() ![]() |
TTransform< T > | operator*
(
T Mult |
|
![]() ![]() |
TTransform< T > | operator*
(
const TTransform< T >& Other |
Return a transform that is the result of this multiplied by another transform. |
![]() |
TTransform< T > & | operator*=
(
T Mult |
|
![]() |
void | operator*=
(
const TTransform< T >& Other |
Sets this transform to the result of this multiplied by another transform. |
![]() |
void | operator*=
(
const TQuat< T >& Other |
Sets this transform to the result of this multiplied by another transform (made only from a rotation). |
![]() ![]() |
TTransform< T > | operator+
(
const TTransform< T >& Atom |
Quaternion addition is wrong here. |
![]() |
TTransform< T > & | operator+=
(
const TTransform< T >& Atom |
Typedefs
Name | Description |
---|---|
FReal | |
TransformVectorRegister |
Constants
Name | Description |
---|---|
Identity | The identity transformation (Rotation = TQuat |