20template<
typename RealType>
130 return ((
FQuat)*
this).Rotator();
134 X = (RealType)
Quat.X;
135 Y = (RealType)
Quat.Y;
136 Z = (RealType)
Quat.Z;
137 W = (RealType)
Quat.W;
141 X = (RealType)
Quat.X;
142 Y = (RealType)
Quat.Y;
143 Z = (RealType)
Quat.Z;
144 W = (RealType)
Quat.W;
149 X = (RealType)
Quat.X;
150 Y = (RealType)
Quat.Y;
151 Z = (RealType)
Quat.Z;
152 W = (RealType)
Quat.W;
168template<
typename RealType>
171 X =
Y =
Z = 0;
W = 1;
174template<
typename RealType>
183template<
typename RealType>
192template<
typename RealType>
193template<
typename RealType2>
197 Y = (RealType)
Copy.Y;
198 Z = (RealType)
Copy.Z;
199 W = (RealType)
Copy.W;
202template<
typename RealType>
205 X =
Y =
Z = 0;
W = 1;
209template<
typename RealType>
212 X =
Y =
Z = 0;
W = 1;
216template<
typename RealType>
219 X =
Y =
Z = 0;
W = 1;
223template<
typename RealType>
226 X =
Y =
Z = 0;
W = 1;
234template<
typename RealType>
237 RealType length =
Length();
238 if (length > Epsilon)
240 RealType
invLength = ((RealType)1) / length;
247 X =
Y =
Z =
W = (RealType)0;
251template<
typename RealType>
254 RealType length =
Length();
255 if (length > Epsilon)
257 RealType
invLength = ((RealType)1) / length;
263template<
typename RealType>
270template<
typename RealType>
273 RealType
W =
A.
W *
B.W -
A.X *
B.X -
A.Y *
B.Y -
A.Z *
B.Z;
274 RealType
X =
A.W *
B.X +
A.X *
B.W +
A.Y *
B.Z -
A.Z *
B.Y;
275 RealType
Y =
A.W *
B.Y +
A.Y *
B.W +
A.Z *
B.X -
A.X *
B.Z;
276 RealType
Z =
A.W *
B.Z +
A.Z *
B.W +
A.X *
B.Y -
A.Y *
B.X;
281template<
typename RealType>
287template<
typename RealType>
294template<
typename RealType>
301template<
typename RealType>
307template<
typename RealType>
312 RealType
twoX = (RealType)2*Q.
X; RealType
twoY = (RealType)2*Q.
Y; RealType
twoZ = (RealType)2*Q.
Z;
323template<
typename RealType>
331 RealType
twoX = (RealType)2 *
qX; RealType
twoY = (RealType)2 *
qY; RealType
twoZ = (RealType)2 *
qZ;
344template<
typename RealType>
347 RealType
twoY = (RealType)2 *
Y; RealType
twoZ = (RealType)2 *
Z;
354template<
typename RealType>
357 RealType
twoX = (RealType)2 *
X; RealType
twoY = (RealType)2 *
Y; RealType
twoZ = (RealType)2 *
Z;
363template<
typename RealType>
366 RealType
twoX = (RealType)2 *
X; RealType
twoY = (RealType)2 *
Y; RealType
twoZ = (RealType)2 *
Z;
372template<
typename RealType>
375 RealType
twoX = (RealType)2 *
X; RealType
twoY = (RealType)2 *
Y; RealType
twoZ = (RealType)2 *
Z;
385template<
typename RealType>
389 if (
norm > (RealType)0)
399template<
typename RealType>
405template<
typename RealType>
419template<
typename RealType>
463template<
typename RealType>
468 RealType cs = From.
Dot(To);
473 if (cs < (RealType)-0.99)
482 RealType
invSn = (RealType)1 / sn;
504template<
typename RealType>
517 root = (RealType)
sqrt(
trace + (RealType)1);
518 W = ((RealType)0.5) * root;
519 root = ((RealType)0.5) / root;
542 quat[i] = ((RealType)0.5) * root;
543 root = ((RealType)0.5) / root;
556template<
typename RealType>
572template<
typename RealType>
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
UE::Math::TQuat< double > FQuat4d
Definition MathFwd.h:63
UE::Math::TQuat< float > FQuat4f
Definition MathFwd.h:76
UE::Math::TRotator< double > FRotator
Definition MathFwd.h:57
int next(int i, int n)
Definition RecastMesh.cpp:164
USkinnedMeshComponent float
Definition SkinnedMeshComponent.h:60
Definition MathUtil.h:150
static RealType Sin(const RealType Value)
Definition MathUtil.h:366
static RealType ACos(const RealType Value)
Definition MathUtil.h:378
UE::Math::TVector2< T > Normalized(const UE::Math::TVector2< T > &Vector, const T Epsilon=0)
Definition VectorTypes.h:61
TQuaternion< double > FQuaterniond
Definition Quaternion.h:163
TQuaternion< float > FQuaternionf
Definition Quaternion.h:162
TQuaternion< RealType > operator+(const TQuaternion< RealType > &A, const TQuaternion< RealType > &B)
Definition Quaternion.h:295
UE_FORCEINLINE_HINT TQuat< T > operator*(const float Scale, const TQuat< T > &Q)
Definition Quat.h:1055
Definition AdvancedWidgetsModule.cpp:13
Definition IndexTypes.h:158
Definition MatrixTypes.h:17
static TMatrix3< RealType > Zero()
Definition MatrixTypes.h:82
Definition Quaternion.h:22
void SetToSlerp(TQuaternion< RealType > From, TQuaternion< RealType > To, RealType InterpT)
Definition Quaternion.h:464
static TQuaternion< RealType > Identity()
Definition Quaternion.h:59
const RealType & operator[](int i) const
Definition Quaternion.h:67
constexpr TQuaternion< RealType > operator-() const
Definition Quaternion.h:100
TQuaternion(const FQuat4f &Quat)
Definition Quaternion.h:132
void SetAxisAngleD(const TVector< RealType > &Axis, RealType AngleDeg)
Definition Quaternion.h:400
TQuaternion()
Definition Quaternion.h:169
TMatrix3< RealType > ToRotationMatrix() const
Definition Quaternion.h:557
TQuaternion< RealType > Normalized(const RealType epsilon=0) const
Definition Quaternion.h:252
void GetAxes(TVector< RealType > &X, TVector< RealType > &Y, TVector< RealType > &Z) const
Definition Quaternion.h:373
RealType W
Definition Quaternion.h:31
TQuaternion< RealType > Inverse() const
Definition Quaternion.h:386
TVector< RealType > AxisZ() const
Definition Quaternion.h:364
TVector< RealType > AxisX() const
Definition Quaternion.h:345
TVector< RealType > InverseMultiply(const TVector< RealType > &Other) const
Definition Quaternion.h:324
RealType & operator[](int i)
Definition Quaternion.h:61
RealType SquaredLength() const
Definition Quaternion.h:83
TQuaternion(const FRotator &Rotator)
Definition Quaternion.h:146
RealType X
Definition Quaternion.h:28
RealType Z
Definition Quaternion.h:30
TVector< RealType > AxisY() const
Definition Quaternion.h:355
TQuaternion(const FQuat4d &Quat)
Definition Quaternion.h:139
RealType Length() const
Definition Quaternion.h:82
RealType XYZW[4]
Definition Quaternion.h:35
bool IsIdentity(RealType Tolerance=TMathUtil< RealType >::ZeroTolerance) const
Definition Quaternion.h:77
RealType Normalize(const RealType epsilon=0)
Definition Quaternion.h:235
void SetFromRotationMatrix(const TMatrix3< RealType > &RotationMatrix)
Definition Quaternion.h:505
RealType Dot(const TQuaternion< RealType > &Other) const
Definition Quaternion.h:264
bool EpsilonEqual(const TQuaternion< RealType > &Other, RealType Tolerance=TMathUtil< RealType >::ZeroTolerance) const
Definition Quaternion.h:573
void SetAxisAngleR(const TVector< RealType > &Axis, RealType AngleRad)
Definition Quaternion.h:406
void SetFromTo(const TVector< RealType > &From, const TVector< RealType > &To)
Definition Quaternion.h:420
static TQuaternion< RealType > Zero()
Definition Quaternion.h:58
RealType Y
Definition Quaternion.h:29
T Z
Definition Vector.h:68
static TVector< T > Zero()
Definition Vector.h:112
T Y
Definition Vector.h:65
UE_FORCEINLINE_HINT TVector< T > Cross(const TVector< T > &V2) const
Definition Vector.h:1535
T X
Definition Vector.h:62