UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TransformCalculus2D.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreTypes.h"
8#include "Math/Vector2D.h"
10
11#include <type_traits>
12
14// Transform calculus for 2D types. UE4 already has a 2D Vector class that we
15// will adapt to be interpreted as a translate transform. The rest we create
16// new classes for.
17//
18// The following types are supported
19// * float/double -> represents a uniform scale.
20// * FScale2D -> represents a 2D non-uniform scale.
21// * FVector2D -> represents a 2D translation.
22// * FShear2D -> represents a "2D shear", interpreted as a shear parallel to the X axis followed by a shear parallel to the Y axis.
23// * FQuat2D -> represents a pure 2D rotation.
24// * FMatrix2x2 -> represents a general 2D transform.
25//
27
28template<typename T> class TMatrix2x2;
29
30
32// Adapters for TVector2.
33//
34// Since it is an existing UE4 types, we cannot rely on the default
35// template that calls member functions. Instead, we provide direct overloads.
37
38namespace UE
39{
40namespace Math
41{
42
44template<typename T>
46{
47 return LHS + RHS;
48}
49
50} // namespace UE::Math
51} // namespace UE
52
54template<typename T>
59
61template<typename T>
66
68template<typename T>
73
75// Adapters for 2D uniform scale.
76//
77// Since it is a fundamental type, we cannot rely on the default
78// template that calls member functions. Instead, we provide direct overloads.
80
84template<typename PositionType>
89
90template<typename PositionType>
95
99template<typename VectorType>
104
105template<typename VectorType>
110
112template<typename T>
114{
115 static_assert(std::is_floating_point_v<T>, "T must be floating point");
116
117public:
118 using FReal = T;
120
122 [[nodiscard]] TScale2() : Scale(1.0f, 1.0f) {}
124 [[nodiscard]] explicit TScale2(T InScale) :Scale(InScale, InScale) {}
126 [[nodiscard]] explicit TScale2(T InScaleX, T InScaleY) :Scale(InScaleX, InScaleY) {}
128 template<typename ArgType>
130
132 template<typename ArgType>
137
139 template<typename ArgType>
144
146 [[nodiscard]] TScale2 Concatenate(const TScale2& RHS) const
147 {
148 return TScale2(Scale * RHS.Scale);
149 }
152 {
153 return TScale2(1.0f / Scale.X, 1.0f / Scale.Y);
154 }
155
157 [[nodiscard]] bool operator==(const TScale2& Other) const
158 {
159 return Scale == Other.Scale;
160 }
161
163 [[nodiscard]] bool operator!=(const TScale2& Other) const
164 {
165 return !operator==(Other);
166 }
167
169 [[nodiscard]] const Vector2Type& GetVector() const
170 {
171 return Scale;
172 }
173
174private:
176 Vector2Type Scale;
177};
178
182typedef FScale2f FScale2D; // Default type (for backwards compat)
183
185template<typename T> struct ConcatenateRules<float , TScale2<T> > { typedef TScale2<T> ResultType; };
186template<typename T> struct ConcatenateRules<double , TScale2<T> > { typedef TScale2<T> ResultType; };
188template<typename T> struct ConcatenateRules<TScale2<T> , float > { typedef TScale2<T> ResultType; };
189template<typename T> struct ConcatenateRules<TScale2<T> , double > { typedef TScale2<T> ResultType; };
190
197template<typename T>
199{
200 static_assert(std::is_floating_point_v<T>, "T must be floating point");
201
202public:
203 using FReal = T;
205
207 TShear2() :Shear(0, 0) {}
209 explicit TShear2(T ShearX, T ShearY) :Shear(ShearX, ShearY) {}
211 template<typename VType>
213
219 template<typename VType>
221 {
222 // Compute the M (Shear Slot) = CoTan(90 - SlopeAngle)
223
224 // 0 is a special case because Tan(90) == infinity
225 T ShearX = InShearAngles.X == 0 ? 0 : (1.0f / FMath::Tan(FMath::DegreesToRadians(90 - FMath::Clamp<T>((T)InShearAngles.X, -89.0f, 89.0f))));
226 T ShearY = InShearAngles.Y == 0 ? 0 : (1.0f / FMath::Tan(FMath::DegreesToRadians(90 - FMath::Clamp<T>((T)InShearAngles.Y, -89.0f, 89.0f))));
227
228 return TShear2(ShearX, ShearY);
229 }
230
236 template<typename ArgType>
242 template<typename ArgType>
247
254 [[nodiscard]] inline TMatrix2x2<T> Concatenate(const TShear2& RHS) const;
255
262 [[nodiscard]] TMatrix2x2<T> Inverse() const;
263
264
266 [[nodiscard]] bool operator==(const TShear2& Other) const
267 {
268 return Shear == Other.Shear;
269 }
270
272 [[nodiscard]] bool operator!=(const TShear2& Other) const
273 {
274 return !operator==(Other);
275 }
276
278 [[nodiscard]] const Vector2Type& GetVector() const
279 {
280 return Shear;
281 }
282
283private:
285 Vector2Type Shear;
286};
287
291typedef FShear2f FShear2D; // Default type (for backwards compat)
292
293
301template<typename T>
303{
304 static_assert(std::is_floating_point_v<T>, "T must be floating point");
305
306public:
307 using FReal = T;
309
311 TQuat2() :Rot(1.0f, 0.0f) {}
315 template<typename VType>
316 explicit TQuat2(const UE::Math::TVector2<VType>& InRot) :Rot((Vector2Type)InRot) {}
317
329 template<typename ArgType>
331 {
333 Point.X * (ArgType)Rot.X - Point.Y * (ArgType)Rot.Y,
334 Point.X * (ArgType)Rot.Y + Point.Y * (ArgType)Rot.X);
335 }
339 template<typename ArgType>
358 TQuat2 Concatenate(const TQuat2& RHS) const
359 {
360 return TQuat2(TransformPoint(FVector2D(RHS.Rot)));
361 }
368 {
369 return TQuat2(Vector2Type(Rot.X, -Rot.Y));
370 }
371
373 bool operator==(const TQuat2& Other) const
374 {
375 return Rot == Other.Rot;
376 }
377
379 bool operator!=(const TQuat2& Other) const
380 {
381 return !operator==(Other);
382 }
383
385 const Vector2Type& GetVector() const { return Rot; }
386
387private:
389 Vector2Type Rot;
390};
391
395typedef FQuat2f FQuat2D; // Default type (for backwards compat)
396
402template<typename T>
404{
405 static_assert(std::is_floating_point_v<T>, "T must be floating point");
406
407public:
408 using FReal = T;
410
413 {
414 M[0][0] = 1; M[0][1] = 0;
415 M[1][0] = 0; M[1][1] = 1;
416 }
417
419 {
420 M[0][0] = m00; M[0][1] = m01;
421 M[1][0] = m10; M[1][1] = m11;
423 }
424
425
427 explicit TMatrix2x2(T UniformScale)
428 {
429 M[0][0] = UniformScale; M[0][1] = 0;
430 M[1][0] = 0; M[1][1] = UniformScale;
432 }
433
435 explicit TMatrix2x2(const TScale2<T>& Scale)
436 {
437 T ScaleX = (T)Scale.GetVector().X;
438 T ScaleY = (T)Scale.GetVector().Y;
439 M[0][0] = ScaleX; M[0][1] = 0;
440 M[1][0] = 0; M[1][1] = ScaleY;
442 }
443
445 explicit TMatrix2x2(const TShear2<T>& Shear)
446 {
447 T XX = (T)Shear.GetVector().X;
448 T YY = (T)Shear.GetVector().Y;
449 M[0][0] = 1; M[0][1] =YY;
450 M[1][0] = XX; M[1][1] = 1;
452 }
453
456 {
457 T CosAngle = (T)Rotation.GetVector().X;
458 T SinAngle = (T)Rotation.GetVector().Y;
459 M[0][0] = CosAngle; M[0][1] = SinAngle;
460 M[1][0] = -SinAngle; M[1][1] = CosAngle;
462 }
463
469 template<typename ArgType>
471 {
473 Point.X * (ArgType)M[0][0] + Point.Y * (ArgType)M[1][0],
474 Point.X * (ArgType)M[0][1] + Point.Y * (ArgType)M[1][1]);
475 }
479 template<typename ArgType>
490 {
491 T A, B, C, D;
492 GetMatrix(A, B, C, D);
493 T E, F, G, H;
494 RHS.GetMatrix(E, F, G, H);
495 TMatrix2x2 Result = TMatrix2x2(
496 A*E + B*G, A*F + B*H,
497 C*E + D*G, C*F + D*H);
498 Result.DiagnosticCheckNaN();
499 return Result;
500 }
505 {
506 T A, B, C, D;
507 GetMatrix(A, B, C, D);
509 TMatrix2x2 Result = TMatrix2x2(
510 D*InvDet, -B*InvDet,
511 -C*InvDet, A*InvDet);
512 Result.DiagnosticCheckNaN();
513 return Result;
514 }
515
517 bool operator==(const TMatrix2x2& RHS) const
518 {
519 T A, B, C, D;
520 GetMatrix(A, B, C, D);
521 T E, F, G, H;
522 RHS.GetMatrix(E, F, G, H);
523 return
528 }
529
531 bool operator!=(const TMatrix2x2& Other) const
532 {
533 return !operator==(Other);
534 }
535
536 void GetMatrix(float& A, float& B, float& C, float& D) const
537 {
538 A = (float)M[0][0]; B = (float)M[0][1];
539 C = (float)M[1][0]; D = (float)M[1][1];
540 }
541
542 void GetMatrix(double& A, double& B, double& C, double& D) const
543 {
544 A = (double)M[0][0]; B = (double)M[0][1];
545 C = (double)M[1][0]; D = (double)M[1][1];
546 }
547
548 T Determinant() const
549 {
550 T A, B, C, D;
551 GetMatrix(A, B, C, D);
552 return (A*D - B*C);
553 }
554
556 {
557 T Det = Determinant();
558 checkSlow(Det != 0.0f);
559 return 1.0f / Det;
560 }
561
564 {
565 T A, B, C, D;
566 GetMatrix(A, B, C, D);
567 return TScale2<T>(A*A + B*B, C*C + D*D);
568 }
569
572 {
574 return TScale2<T>(FMath::Sqrt(ScaleSquared.GetVector().X), FMath::Sqrt(ScaleSquared.GetVector().Y));
575 }
576
579 {
580 T A, B, C, D;
581 GetMatrix(A, B, C, D);
582 return FMath::Atan(C / D);
583 }
584
586 bool IsIdentity() const
587 {
588 return M[0][0] == 1.0f && M[0][1] == 0.0f
589 && M[1][0] == 0.0f && M[1][1] == 1.0f;
590 }
591
592 bool IsNearlyIdentity(T ErrorTolerance = UE_KINDA_SMALL_NUMBER) const
593 {
594 return
595 FMath::IsNearlyEqual(M[0][0], 1.0f, ErrorTolerance) &&
596 FMath::IsNearlyEqual(M[0][1], 0.0f, ErrorTolerance) &&
597 FMath::IsNearlyEqual(M[1][0], 0.0f, ErrorTolerance) &&
598 FMath::IsNearlyEqual(M[1][1], 1.0f, ErrorTolerance);
599 }
600
601 bool ContainsNaN() const
602 {
603 return (!FMath::IsFinite(M[0][0]) ||
604 !FMath::IsFinite(M[0][1]) ||
605 !FMath::IsFinite(M[1][0]) ||
606 !FMath::IsFinite(M[1][1]));
607 }
608
609#if ENABLE_NAN_DIAGNOSTIC
610 inline void DiagnosticCheckNaN() const
611 {
612 if (ContainsNaN())
613 {
614 logOrEnsureNanError(TEXT("Matrix2x2 contains NaN"));
615 *const_cast<TMatrix2x2<T>*>(static_cast<const TMatrix2x2<T>*>(this)) = TMatrix2x2<T>(ForceInitToZero);
616 }
617 }
618#else
620#endif
621
622private:
623 T M[2][2];
624};
625
629typedef FMatrix2x2f FMatrix2x2; // Default type (for backwards compat)
630
631
632template<typename T>
634{
635 T XXA = (T)Shear.X;
636 T YYA = (T)Shear.Y;
637 T XXB = (T)RHS.Shear.X;
638 T YYB = (T)RHS.Shear.Y;
639 return TMatrix2x2<T>(
640 1+YYA*XXB, YYB*YYA,
641 XXA+XXB, XXA*XXB+1);
642}
643
644template<typename T>
646{
647 T InvDet = 1.0f / T(1.0f - Shear.X*Shear.Y);
648 return TMatrix2x2<T>(
649 InvDet, T(-Shear.Y * InvDet),
650 T(-Shear.X * InvDet), InvDet);
651}
652
654template<typename T> struct ConcatenateRules<float , TMatrix2x2<T> > { typedef TMatrix2x2<T> ResultType; };
655template<typename T> struct ConcatenateRules<double , TMatrix2x2<T> > { typedef TMatrix2x2<T> ResultType; };
656template<typename T> struct ConcatenateRules<TScale2<T> , TMatrix2x2<T> > { typedef TMatrix2x2<T> ResultType; };
657template<typename T> struct ConcatenateRules<TShear2<T> , TMatrix2x2<T> > { typedef TMatrix2x2<T> ResultType; };
658template<typename T> struct ConcatenateRules<TQuat2<T> , TMatrix2x2<T> > { typedef TMatrix2x2<T> ResultType; };
659template<typename T> struct ConcatenateRules<TMatrix2x2<T> , float > { typedef TMatrix2x2<T> ResultType; };
660template<typename T> struct ConcatenateRules<TMatrix2x2<T> , double > { typedef TMatrix2x2<T> ResultType; };
661template<typename T> struct ConcatenateRules<TMatrix2x2<T> , TScale2<T> > { typedef TMatrix2x2<T> ResultType; };
662template<typename T> struct ConcatenateRules<TMatrix2x2<T> , TShear2<T> > { typedef TMatrix2x2<T> ResultType; };
663template<typename T> struct ConcatenateRules<TMatrix2x2<T> , TQuat2<T> > { typedef TMatrix2x2<T> ResultType; };
664
666template<typename T> struct ConcatenateRules<TScale2<T> , TShear2<T> > { typedef TMatrix2x2<T> ResultType; };
667template<typename T> struct ConcatenateRules<TScale2<T> , TQuat2<T> > { typedef TMatrix2x2<T> ResultType; };
668template<typename T> struct ConcatenateRules<TShear2<T> , TScale2<T> > { typedef TMatrix2x2<T> ResultType; };
669template<typename T> struct ConcatenateRules<TQuat2<T> , TScale2<T> > { typedef TMatrix2x2<T> ResultType; };
670template<typename T> struct ConcatenateRules<TShear2<T> , TQuat2<T> > { typedef TMatrix2x2<T> ResultType; };
671template<typename T> struct ConcatenateRules<TQuat2<T> , TShear2<T> > { typedef TMatrix2x2<T> ResultType; };
672
680template<typename T>
682{
683 static_assert(std::is_floating_point_v<T>, "T must be floating point");
684
685public:
686 using FReal = T;
689
691 template<typename VType = float>
696
698 template<typename VType = float>
700 : M(TScale2<T>(UniformScale)), Trans((Vector2Type)Translation)
701 {
702 }
703
705 template<typename VType = float>
710
712 template<typename VType = float>
717
719 template<typename VType = float>
721 : M(Rot), Trans((Vector2Type)Translation)
722 {
723 }
724
726 template<typename VType = float>
731
735 template<typename VType>
740
744 template<typename VType>
749
758 {
759 return TTransform2(
760 ::Concatenate(M, RHS.M),
761 ::Concatenate(::TransformPoint(RHS.M, Trans), RHS.Trans));
762 }
763
793 {
794 Matrix2Type InvM = ::Inverse(M);
796 return TTransform2(InvM, InvTrans);
797 }
798
800 bool operator==(const TTransform2& Other) const
801 {
802 return M == Other.M && Trans == Other.Trans;
803 }
804
806 bool operator!=(const TTransform2& Other) const
807 {
808 return !operator==(Other);
809 }
810
812 const Matrix2Type& GetMatrix() const { return M; }
814 //const Vector2Type GetTranslation() const { return Vector2Type(Trans); }
815 const FVector2D GetTranslation() const { return (FVector2D)Trans; } // TODO: should be Vector2Type in general, but retaining FVector2D for now for compilation backwards compat.
816
817 template<typename VType>
819
823 bool IsIdentity() const
824 {
825 return M.IsIdentity() && Trans == Vector2Type::ZeroVector;
826 }
827
832 {
833 T A, B, C, D;
834 M.GetMatrix(A, B, C, D);
835
837 UE::Math::TPlane<T>( A, B, 0.0f, 0.0f),
838 UE::Math::TPlane<T>( C, D, 0.0f, 0.0f),
839 UE::Math::TPlane<T>( 0.0f, 0.0f, 1.0f, 0.0f),
840 UE::Math::TPlane<T>(Trans.X, Trans.Y, 0.0f, 1.0f)
841 );
842 }
843
845 bool ContainsNaN() const
846 {
847 return M.ContainsNaN() || Trans.ContainsNaN();
848 }
849
850private:
851 Matrix2Type M;
852 Vector2Type Trans;
853};
854
858typedef FTransform2f FTransform2D; // default type, for backwards compat
859
860template<> struct TIsPODType<FTransform2f> { enum { Value = true }; };
861template<> struct TIsPODType<FTransform2d> { enum { Value = true }; };
862
864// Concatenate overloads.
865//
866// Efficient overloads for concatenating 2D affine transforms.
867// Better than simply upcasting both to FTransform2D first.
869
871template<typename T, typename V>
876
878template<typename T, typename V>
883
885template<typename T, typename V>
890
892template<typename T, typename V>
897
899template<typename T, typename V>
904
906template<typename T, typename V>
911
913template<typename T, typename V>
918
920template<typename T, typename V>
925
927template<typename T, typename V>
932
934template<typename T, typename V>
939
942{
943 template<typename T>
945 {
946 enum { Value = false };
947 };
948
949 template<> struct TIsTransform2< FTransform2f > { enum { Value = true }; };
950 template<> struct TIsTransform2< FTransform2d > { enum { Value = true }; };
951}
952
954template<typename TransformType> struct ConcatenateRules<std::enable_if_t<!TransformCalculusHelper::TIsTransform2<TransformType>::Value, FTransform2f>, TransformType> { typedef FTransform2f ResultType; };
955template<typename TransformType> struct ConcatenateRules<std::enable_if_t<!TransformCalculusHelper::TIsTransform2<TransformType>::Value, FTransform2d>, TransformType> { typedef FTransform2d ResultType; };
956template<typename TransformType> struct ConcatenateRules<TransformType, std::enable_if_t<!TransformCalculusHelper::TIsTransform2<TransformType>::Value, FTransform2f>> { typedef FTransform2f ResultType; };
957template<typename TransformType> struct ConcatenateRules<TransformType, std::enable_if_t<!TransformCalculusHelper::TIsTransform2<TransformType>::Value, FTransform2d>> { typedef FTransform2d ResultType; };
#define checkSlow(expr)
Definition AssertionMacros.h:332
@ ForceInitToZero
Definition CoreMiscDefines.h:156
#define TEXT(x)
Definition Platform.h:1272
#define UE_FORCEINLINE_HINT
Definition Platform.h:723
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define logOrEnsureNanError(_FormatString_,...)
Definition LogMacros.h:436
UE::Math::TVector2< double > FVector2D
Definition MathFwd.h:48
USkinnedMeshComponent float
Definition SkinnedMeshComponent.h:60
TTransform2< double > FTransform2d
Definition TransformCalculus2D.h:857
TQuat2< float > FQuat2f
Definition TransformCalculus2D.h:393
TMatrix2x2< double > FMatrix2x2d
Definition TransformCalculus2D.h:628
TQuat2< double > FQuat2d
Definition TransformCalculus2D.h:394
TShear2< float > FShear2f
Definition TransformCalculus2D.h:289
const UE::Math::TVector2< T > & TransformVector(const UE::Math::TVector2< T > &Transform, const UE::Math::TVector2< T > &Vector)
Definition TransformCalculus2D.h:69
TMatrix2x2< float > FMatrix2x2f
Definition TransformCalculus2D.h:627
TTransform2< float > FTransform2f
Definition TransformCalculus2D.h:856
FScale2f FScale2D
Definition TransformCalculus2D.h:182
TScale2< double > FScale2d
Definition TransformCalculus2D.h:181
TScale2< float > FScale2f
Definition TransformCalculus2D.h:180
FTransform2f FTransform2D
Definition TransformCalculus2D.h:858
TShear2< double > FShear2d
Definition TransformCalculus2D.h:290
UE::Math::TVector2< T > TransformPoint(const UE::Math::TVector2< T > &Transform, const UE::Math::TVector2< T > &Point)
Definition TransformCalculus2D.h:62
FMatrix2x2f FMatrix2x2
Definition TransformCalculus2D.h:629
TTransform2< T > Concatenate(const TScale2< T > &Scale, const UE::Math::TVector2< V > &Translation)
Definition TransformCalculus2D.h:872
FShear2f FShear2D
Definition TransformCalculus2D.h:291
FQuat2f FQuat2D
Definition TransformCalculus2D.h:395
#define UE_KINDA_SMALL_NUMBER
Definition UnrealMathUtility.h:131
Definition TransformCalculus2D.h:404
bool operator!=(const TMatrix2x2 &Other) const
Definition TransformCalculus2D.h:531
void GetMatrix(float &A, float &B, float &C, float &D) const
Definition TransformCalculus2D.h:536
TScale2< T > GetScaleSquared() const
Definition TransformCalculus2D.h:563
bool IsNearlyIdentity(T ErrorTolerance=UE_KINDA_SMALL_NUMBER) const
Definition TransformCalculus2D.h:592
UE::Math::TVector2< ArgType > TransformPoint(const UE::Math::TVector2< ArgType > &Point) const
Definition TransformCalculus2D.h:470
TMatrix2x2()
Definition TransformCalculus2D.h:412
TMatrix2x2(const TScale2< T > &Scale)
Definition TransformCalculus2D.h:435
UE_FORCEINLINE_HINT void DiagnosticCheckNaN() const
Definition TransformCalculus2D.h:619
T Determinant() const
Definition TransformCalculus2D.h:548
T InverseDeterminant() const
Definition TransformCalculus2D.h:555
void GetMatrix(double &A, double &B, double &C, double &D) const
Definition TransformCalculus2D.h:542
bool operator==(const TMatrix2x2 &RHS) const
Definition TransformCalculus2D.h:517
bool ContainsNaN() const
Definition TransformCalculus2D.h:601
bool IsIdentity() const
Definition TransformCalculus2D.h:586
TMatrix2x2(T UniformScale)
Definition TransformCalculus2D.h:427
TMatrix2x2 Concatenate(const TMatrix2x2 &RHS) const
Definition TransformCalculus2D.h:489
T GetRotationAngle() const
Definition TransformCalculus2D.h:578
TMatrix2x2(T m00, T m01, T m10, T m11)
Definition TransformCalculus2D.h:418
TMatrix2x2(const TShear2< T > &Shear)
Definition TransformCalculus2D.h:445
UE::Math::TVector2< ArgType > TransformVector(const UE::Math::TVector2< ArgType > &Vector) const
Definition TransformCalculus2D.h:480
TMatrix2x2(const TQuat2< T > &Rotation)
Definition TransformCalculus2D.h:455
TScale2< T > GetScale() const
Definition TransformCalculus2D.h:571
T FReal
Definition TransformCalculus2D.h:408
TMatrix2x2 Inverse() const
Definition TransformCalculus2D.h:504
Definition TransformCalculus2D.h:303
UE::Math::TVector2< ArgType > TransformPoint(const UE::Math::TVector2< ArgType > &Point) const
Definition TransformCalculus2D.h:330
bool operator==(const TQuat2 &Other) const
Definition TransformCalculus2D.h:373
TQuat2 Inverse() const
Definition TransformCalculus2D.h:367
TQuat2(T RotRadians)
Definition TransformCalculus2D.h:313
TQuat2()
Definition TransformCalculus2D.h:311
TQuat2(const UE::Math::TVector2< VType > &InRot)
Definition TransformCalculus2D.h:316
const Vector2Type & GetVector() const
Definition TransformCalculus2D.h:385
UE::Math::TVector2< ArgType > TransformVector(const UE::Math::TVector2< ArgType > &Vector) const
Definition TransformCalculus2D.h:340
T FReal
Definition TransformCalculus2D.h:307
UE::Math::TVector2< T > Vector2Type
Definition TransformCalculus2D.h:308
bool operator!=(const TQuat2 &Other) const
Definition TransformCalculus2D.h:379
TQuat2 Concatenate(const TQuat2 &RHS) const
Definition TransformCalculus2D.h:358
Definition TransformCalculus2D.h:114
const Vector2Type & GetVector() const
Definition TransformCalculus2D.h:169
TScale2()
Definition TransformCalculus2D.h:122
T FReal
Definition TransformCalculus2D.h:118
TScale2(const UE::Math::TVector2< ArgType > &InScale)
Definition TransformCalculus2D.h:129
UE::Math::TVector2< ArgType > TransformVector(const UE::Math::TVector2< ArgType > &Vector) const
Definition TransformCalculus2D.h:140
TScale2 Inverse() const
Definition TransformCalculus2D.h:151
bool operator==(const TScale2 &Other) const
Definition TransformCalculus2D.h:157
TScale2(T InScale)
Definition TransformCalculus2D.h:124
TScale2(T InScaleX, T InScaleY)
Definition TransformCalculus2D.h:126
bool operator!=(const TScale2 &Other) const
Definition TransformCalculus2D.h:163
UE::Math::TVector2< ArgType > TransformPoint(const UE::Math::TVector2< ArgType > &Point) const
Definition TransformCalculus2D.h:133
UE::Math::TVector2< T > Vector2Type
Definition TransformCalculus2D.h:119
TScale2 Concatenate(const TScale2 &RHS) const
Definition TransformCalculus2D.h:146
Definition TransformCalculus2D.h:199
UE::Math::TVector2< T > Vector2Type
Definition TransformCalculus2D.h:204
TShear2()
Definition TransformCalculus2D.h:207
TMatrix2x2< T > Inverse() const
Definition TransformCalculus2D.h:645
TShear2(T ShearX, T ShearY)
Definition TransformCalculus2D.h:209
bool operator==(const TShear2 &Other) const
Definition TransformCalculus2D.h:266
TShear2(const UE::Math::TVector2< VType > &InShear)
Definition TransformCalculus2D.h:212
bool operator!=(const TShear2 &Other) const
Definition TransformCalculus2D.h:272
TMatrix2x2< T > Concatenate(const TShear2 &RHS) const
Definition TransformCalculus2D.h:633
static TShear2 FromShearAngles(const UE::Math::TVector2< VType > &InShearAngles)
Definition TransformCalculus2D.h:220
T FReal
Definition TransformCalculus2D.h:203
UE::Math::TVector2< ArgType > TransformPoint(const UE::Math::TVector2< ArgType > &Point) const
Definition TransformCalculus2D.h:237
const Vector2Type & GetVector() const
Definition TransformCalculus2D.h:278
UE::Math::TVector2< ArgType > TransformVector(const UE::Math::TVector2< ArgType > &Vector) const
Definition TransformCalculus2D.h:243
Definition TransformCalculus2D.h:682
void SetTranslation(const UE::Math::TVector2< VType > &InTrans)
Definition TransformCalculus2D.h:818
bool IsIdentity() const
Definition TransformCalculus2D.h:823
UE::Math::TVector2< T > Vector2Type
Definition TransformCalculus2D.h:687
bool ContainsNaN() const
Definition TransformCalculus2D.h:845
TTransform2(const TQuat2< T > &Rot, const UE::Math::TVector2< VType > &Translation=UE::Math::TVector2< VType >(0.f, 0.f))
Definition TransformCalculus2D.h:720
bool operator!=(const TTransform2 &Other) const
Definition TransformCalculus2D.h:806
TTransform2(const TShear2< T > &Shear, const UE::Math::TVector2< VType > &Translation=UE::Math::TVector2< VType >(0.f, 0.f))
Definition TransformCalculus2D.h:713
const FVector2D GetTranslation() const
Definition TransformCalculus2D.h:815
TTransform2(const UE::Math::TVector2< VType > &Translation=UE::Math::TVector2< VType >(0.f, 0.f))
Definition TransformCalculus2D.h:692
TMatrix2x2< T > Matrix2Type
Definition TransformCalculus2D.h:688
TTransform2 Inverse() const
Definition TransformCalculus2D.h:792
UE::Math::TVector2< VType > TransformVector(const UE::Math::TVector2< VType > &Vector) const
Definition TransformCalculus2D.h:745
TTransform2(const TScale2< T > &Scale, const UE::Math::TVector2< VType > &Translation=UE::Math::TVector2< VType >(0.f, 0.f))
Definition TransformCalculus2D.h:706
TTransform2(const TMatrix2x2< T > &Transform, const UE::Math::TVector2< VType > &Translation=UE::Math::TVector2< VType >(0.f, 0.f))
Definition TransformCalculus2D.h:727
T FReal
Definition TransformCalculus2D.h:686
bool operator==(const TTransform2 &Other) const
Definition TransformCalculus2D.h:800
const Matrix2Type & GetMatrix() const
Definition TransformCalculus2D.h:812
TTransform2(T UniformScale, const UE::Math::TVector2< VType > &Translation=UE::Math::TVector2< VType >(0.f, 0.f))
Definition TransformCalculus2D.h:699
UE::Math::TVector2< VType > TransformPoint(const UE::Math::TVector2< VType > &Point) const
Definition TransformCalculus2D.h:736
TTransform2 Concatenate(const TTransform2 &RHS) const
Definition TransformCalculus2D.h:757
UE::Math::TMatrix< T > To3DMatrix() const
Definition TransformCalculus2D.h:831
Definition TransformCalculus2D.h:942
UE::Math::TVector2< T > Concatenate(const UE::Math::TVector2< T > &LHS, const UE::Math::TVector2< T > &RHS)
Definition TransformCalculus2D.h:45
Definition AdvancedWidgetsModule.cpp:13
TMatrix2x2< T > ResultType
Definition TransformCalculus2D.h:663
TMatrix2x2< T > ResultType
Definition TransformCalculus2D.h:661
TMatrix2x2< T > ResultType
Definition TransformCalculus2D.h:662
TMatrix2x2< T > ResultType
Definition TransformCalculus2D.h:660
TMatrix2x2< T > ResultType
Definition TransformCalculus2D.h:659
TMatrix2x2< T > ResultType
Definition TransformCalculus2D.h:658
TMatrix2x2< T > ResultType
Definition TransformCalculus2D.h:669
TMatrix2x2< T > ResultType
Definition TransformCalculus2D.h:671
TMatrix2x2< T > ResultType
Definition TransformCalculus2D.h:656
TMatrix2x2< T > ResultType
Definition TransformCalculus2D.h:667
TMatrix2x2< T > ResultType
Definition TransformCalculus2D.h:666
TScale2< T > ResultType
Definition TransformCalculus2D.h:189
TScale2< T > ResultType
Definition TransformCalculus2D.h:188
TMatrix2x2< T > ResultType
Definition TransformCalculus2D.h:657
TMatrix2x2< T > ResultType
Definition TransformCalculus2D.h:670
TMatrix2x2< T > ResultType
Definition TransformCalculus2D.h:668
TMatrix2x2< T > ResultType
Definition TransformCalculus2D.h:655
TScale2< T > ResultType
Definition TransformCalculus2D.h:186
TMatrix2x2< T > ResultType
Definition TransformCalculus2D.h:654
TScale2< T > ResultType
Definition TransformCalculus2D.h:185
Definition TransformCalculus.h:273
Definition UnrealMathUtility.h:270
static constexpr UE_FORCEINLINE_HINT auto DegreesToRadians(T const &DegVal) -> decltype(DegVal *(UE_PI/180.f))
Definition UnrealMathUtility.h:871
static UE_FORCEINLINE_HINT bool IsNearlyEqual(float A, float B, float ErrorTolerance=UE_SMALL_NUMBER)
Definition UnrealMathUtility.h:388
Definition IsPODType.h:12
@ Value
Definition IsPODType.h:13
Definition TransformCalculus2D.h:945
@ Value
Definition TransformCalculus2D.h:946
Definition Matrix.h:43
Definition Plane.h:35
Definition Vector2D.h:38
bool ContainsNaN() const
Definition Vector2D.h:691
T Y
Definition Vector2D.h:52
T X
Definition Vector2D.h:49
static CORE_API const TVector2< T > ZeroVector
Definition Vector2D.h:63