6#include "Math/UnrealMathUtility.h"
7#include "Math/Matrix.h"
15struct TScaleRotationTranslationMatrix
22
23
24
25
26
27
28 TScaleRotationTranslationMatrix(
const TVector<T>& Scale,
const TRotator<T>& Rot,
const TVector<T>& Origin);
32 explicit TScaleRotationTranslationMatrix(
const TScaleRotationTranslationMatrix<FArg>& From) : TMatrix<T>(From) {}
38 void GetSinCos(T& S, T& C, T Degrees)
45 else if (Degrees == 90.f)
50 else if (Degrees == 180.f)
55 else if (Degrees == 270.f)
62 FMath::SinCos(&S, &C, FMath::DegreesToRadians(Degrees));
68FORCEINLINE TScaleRotationTranslationMatrix<T>::TScaleRotationTranslationMatrix(
const TVector<T>& Scale,
const TRotator<T>& Rot,
const TVector<T>& Origin)
72 GetSinCos(SP, CP, (T)Rot.Pitch);
73 GetSinCos(SY, CY, (T)Rot.Yaw);
74 GetSinCos(SR, CR, (T)Rot.Roll);
76 M[0][0] = (CP * CY) * Scale.X;
77 M[0][1] = (CP * SY) * Scale.X;
78 M[0][2] = (SP) * Scale.X;
81 M[1][0] = (SR * SP * CY - CR * SY) * Scale.Y;
82 M[1][1] = (SR * SP * SY + CR * CY) * Scale.Y;
83 M[1][2] = (- SR * CP) * Scale.Y;
86 M[2][0] = ( -( CR * SP * CY + SR * SY ) ) * Scale.Z;
87 M[2][1] = (CY * SR - CR * SP * SY) * Scale.Z;
88 M[2][2] = (CR * CP) * Scale.Z;
102template<>
struct TIsUECoreVariant<FScaleRotationTranslationMatrix44f> {
enum { Value =
true }; };
103template<>
struct TIsUECoreVariant<FScaleRotationTranslationMatrix44d> {
enum { Value =
true }; };
#define UE_DECLARE_LWC_TYPE(...)
#define TEMPLATE_REQUIRES(...)