Navigation
API > API/Runtime > API/Runtime/Core
Support for generalized 2D affine transforms. Implemented as a 2x2 transform followed by translation. In matrix form: [A B 0] [C D 0] [X Y 1]
| Name | TTransform2 |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Math/TransformCalculus2D.h |
| Include Path | #include "Math/TransformCalculus2D.h" |
Syntax
template<typename T>
class TTransform2
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TTransform2
(
const UE::Math::TVector2< VType >& Translation |
Initialize the transform using an identity matrix and a translation. | Math/TransformCalculus2D.h | |
TTransform2
(
T UniformScale, |
Initialize the transform using a uniform scale and a translation. | Math/TransformCalculus2D.h | |
TTransform2
(
const TScale2< T >& Scale, |
Initialize the transform using a 2D scale and a translation. | Math/TransformCalculus2D.h | |
TTransform2
(
const TShear2< T >& Shear, |
Initialize the transform using a 2D shear and a translation. | Math/TransformCalculus2D.h | |
TTransform2
(
const TQuat2< T >& Rot, |
Initialize the transform using a 2D rotation and a translation. | Math/TransformCalculus2D.h | |
TTransform2
(
const TMatrix2x2< T >& Transform, |
Initialize the transform using a general 2x2 transform and a translation. | Math/TransformCalculus2D.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FReal | T | Math/TransformCalculus2D.h | |
| Matrix2Type | TMatrix2x2< T > | Math/TransformCalculus2D.h | |
| Vector2Type | UE::Math::TVector2< T > | Math/TransformCalculus2D.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| M | Matrix2Type | Math/TransformCalculus2D.h | ||
| Trans | Vector2Type | Math/TransformCalculus2D.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TTransform2 Concatenate
(
const TTransform2& RHS |
Concatenates two transforms. | Math/TransformCalculus2D.h | |
bool ContainsNaN() |
Utility to check if there are any non-finite values (NaN or Inf) in this transform. | Math/TransformCalculus2D.h | |
const Matrix2Type & GetMatrix() |
Access to the 2x2 transform | Math/TransformCalculus2D.h | |
const FVector2D GetTranslation() |
Const Vector2Type GetTranslation() const { return Vector2Type(Trans); } | Math/TransformCalculus2D.h | |
| Inverts a transform. | Math/TransformCalculus2D.h | ||
bool IsIdentity () |
Specialized function to determine if a transform is precisely the identity transform. | Math/TransformCalculus2D.h | |
void SetTranslation
(
const UE::Math::TVector2< VType >& InTrans |
Math/TransformCalculus2D.h | ||
UE::Math::TMatrix< T > To3DMatrix() |
Converts this affine 2D Transform into an affine 3D transform. | Math/TransformCalculus2D.h | |
UE::Math::TVector2< VType > TransformPoint
(
const UE::Math::TVector2< VType >& Point |
2D transformation of a point. Transforms position, rotation, and scale. | Math/TransformCalculus2D.h | |
UE::Math::TVector2< VType > TransformVector
(
const UE::Math::TVector2< VType >& Vector |
2D transformation of a vector. Transforms rotation and scale. | Math/TransformCalculus2D.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool operator!=
(
const TTransform2& Other |
Inequality. | Math/TransformCalculus2D.h | |
bool operator==
(
const TTransform2& Other |
Equality. | Math/TransformCalculus2D.h |