Choose your operating system:
Windows
macOS
Linux
| TQuat
|
Module |
|
Header |
/Engine/Source/Runtime/Core/Public/CoreFwd.h |
Include |
#include "CoreFwd.h" |
template<typename T>
struct TQuat
Floating point quaternion that can represent a rotation about an axis in 3-D space. The X, Y, Z, W components also double as the Axis/Angle format.
Order matters when composing quaternions: C = A * B will yield a quaternion C that logically first applies B then A to any subsequent transformation (right first, then left).
that this is the opposite order of FTransform multiplication. Example: LocalToWorld = (LocalToWorld * DeltaRotation) will change rotation in local space by DeltaRotation. Example: LocalToWorld = (DeltaRotation * LocalToWorld) will change rotation in world space by DeltaRotation.
Name | Description | ||
---|---|---|---|
|
T |
W |
The quaternion's W-component. |
|
T |
X |
The quaternion's X-component. |
|
T |
Y |
The quaternion's Y-component. |
|
T |
Z |
The quaternion's Z-component. |
Name | Description | |
---|---|---|
|
TQuat() |
Default constructor (no initialization). |
|
TQuat ( |
Creates and initializes a new quaternion, with the W component either 0 or 1. |
|
TQuat ( |
Initializes all elements to V |
|
TQuat ( |
Creates and initializes a new quaternion from the given rotator. |
|
TQuat ( |
Creates and initializes a new quaternion from the given matrix. |
|
TQuat ( |
Conversion to other type. |
|
TQuat ( |
Creates and initializes a new quaternion from the XYZW values in the given VectorRegister4Float. |
|
TQuat ( |
Creates and initializes a new quaternion from the a rotation around the given axis. |
|
TQuat ( |
Constructor. |
Name | Description | ||
---|---|---|---|
|
T |
AngularDistance ( |
Find the angular distance between two rotation quaternions (in radians) |
|
CalcTangents |
Calculate tangents between given points |
|
|
ContainsNaN() |
Utility to check if there are any non-finite values (NaN or Inf) in this Quat. |
|
|
DiagnosticCheckNaN ( |
||
|
DiagnosticCheckNaN() |
||
|
EnforceShortestArcWith ( |
Enforce that the delta between this Quaternion and another one represents the shortest possible rotation angle |
|
|
Equals ( |
Checks whether another Quaternion is equal to this, within specified tolerance. |
|
|
T |
Error |
Error measure (angle) between two quaternions, ranged [0..1]. |
|
T |
ErrorAutoNormalize |
TQuat |
|
TVector< T > |
Euler() |
Convert a Quaternion into floating-point Euler angles (in degrees). |
|
TQuat< T > |
Exp() |
@note Exp should really only be used after Log. |
|
TQuat< T > |
FastBilerp |
Bi-Linear Quaternion interpolation. Result is NOT normalized. |
|
TQuat< T > |
FastLerp |
Fast Linear Quaternion Interpolation. Result is NOT normalized. |
|
TQuat< T > |
FindBetween |
Generates the 'smallest' (geodesic) rotation between two vectors of arbitrary length. |
|
TQuat< T > |
FindBetweenNormals |
Generates the 'smallest' (geodesic) rotation between two normals (assumed to be unit length). |
|
TQuat< T > |
FindBetweenVectors |
Generates the 'smallest' (geodesic) rotation between two vectors of arbitrary length. |
|
T |
GetAngle() |
Get the angle of this quaternion |
|
TVector< T > |
GetAxisX() |
Get the forward direction (X axis) after it has been rotated by this Quaternion. |
|
TVector< T > |
GetAxisY() |
Get the right direction (Y axis) after it has been rotated by this Quaternion. |
|
TVector< T > |
GetAxisZ() |
Get the up direction (Z axis) after it has been rotated by this Quaternion. |
|
TVector< T > |
GetForwardVector() |
Get the forward direction (X axis) after it has been rotated by this Quaternion. |
|
TQuat< T > |
GetNormalized ( |
Get a normalized copy of this quaternion. If it is too small, returns an identity quaternion. |
|
TVector< T > |
GetRightVector() |
Get the right direction (Y axis) after it has been rotated by this Quaternion. |
|
TVector< T > |
GetRotationAxis() |
Get the axis of rotation of the Quaternion. |
|
T |
GetTwistAngle ( |
Get the twist angle (in radians) for a specified axis |
|
TVector< T > |
GetUpVector() |
Get the up direction (Z axis) after it has been rotated by this Quaternion. |
|
Identical |
Identical implementation for TQuat properties. |
|
|
InitFromString ( |
||
|
TQuat< T > |
Inverse() |
|
|
IsIdentity ( |
Checks whether this Quaternion is an Identity Quaternion. Assumes Quaternion tested is normalized. |
|
|
IsNormalized() |
Return true if this quaternion is normalized. |
|
|
TQuat< T > |
Log() |
|
|
TQuat< T > |
MakeFromEuler ( |
Convert a vector of floating-point Euler angles (in degrees) into a Quaternion. |
|
TQuat< T > |
MakeFromRotator ( |
|
|
TQuat< T > |
MakeFromVectorRegister ( |
|
|
NetSerialize ( |
Serializes the vector compressed for e.g. network transmission. |
|
|
Normalize ( |
Normalize this quaternion if it is large enough. |
|
|
TVector< T > |
RotateVector ( |
Rotate a vector by this quaternion. |
|
TRotator< T ... |
Rotator() |
Forward declare all explicit specializations (in UnrealMath.cpp) |
|
Serialize ( |
||
|
SerializeFromMismatchedTag |
||
|
T |
Size() |
Get the length of this quaternion. |
|
T |
SizeSquared() |
Get the length squared of this quaternion. |
|
TQuat< T > |
Slerp |
Spherical interpolation. Will correct alignment. Result is normalized. |
|
TQuat< T > |
Slerp_NotNormalized |
Spherical interpolation. Will correct alignment. Result is NOT normalized. |
|
TQuat< T > |
SlerpFullPath |
Simpler Slerp that doesn't do any checks for 'shortest distance' etc. |
|
TQuat< T > |
SlerpFullPath_NotNormalized |
Simpler Slerp that doesn't do any checks for 'shortest distance' etc. |
|
TQuat< T > |
Squad |
Given start and end quaternions of quat1 and quat2, and tangents at those points tang1 and tang2, calculate the point at Alpha (between 0 and 1) between them. |
|
TQuat< T > |
SquadFullPath |
Simpler Squad that doesn't do any checks for 'shortest distance' etc. |
|
ToAxisAndAngle ( |
Get the axis and angle of rotation of this quaternion : assumes normalized quaternions. |
|
|
ToAxisAndAngle ( |
Get the axis and angle of rotation of this quaternion : assumes normalized quaternions. |
|
|
ToMatrix ( |
Get the TMatrix |
|
|
TMatrix< T > |
ToMatrix() |
Get the TMatrix |
|
ToString() |
Get a textual representation of the vector. |
|
|
ToSwingTwist |
Get the swing and twist decomposition for a specified axis |
|
|
TVector< T > |
UnrotateVector ( |
Rotate a vector by the inverse of this quaternion. |
|
TVector< T > |
Vector() |
Convert a rotation into a unit vector facing in its direction. |
Name | Description | ||
---|---|---|---|
|
TQuat< T > |
operator- ( |
Gets the result of subtracting a Quaternion to this. |
|
TQuat< T > |
operator-() |
Negates the quaternion. that this represents the same rotation. |
|
operator!= ( |
Checks whether two quaternions are not identical. |
|
|
TQuat< T > |
operator* ( |
Get the result of scaling this quaternion. |
|
TMatrix< T > |
operator* ( |
Multiply this by a matrix. |
|
TVector< T > |
operator* ( |
Rotate a vector by this quaternion. |
|
TQuat< T > |
operator* ( |
Gets the result of multiplying this by another quaternion (this * Q). |
|
TQuat< T > |
operator*= ( |
Multiply this quaternion by a scaling factor. |
|
TQuat< T > |
operator*= ( |
Multiply this by a quaternion (this = this * Q). |
|
TQuat< T > |
operator/ ( |
Divide this quaternion by scale. |
|
TQuat< T > |
operator/= ( |
Divide this quaternion by scale. |
|
T |
operator| ( |
Calculates dot product of two quaternions. |
|
TQuat< T > |
operator+ ( |
Gets the result of adding a Quaternion to this. |
|
TQuat< T > |
operator+= ( |
Adds to this quaternion. |
|
TQuat< T > |
operator-= ( |
Subtracts another quaternion from this. |
|
operator== ( |
Checks whether two quaternions are identical. |
Name |
Description |
---|---|
FReal |
Can't have a TEMPLATE_REQUIRES in the declaration because of the forward declarations, so check for allowed types here. |
QuatVectorRegister |
Name |
Description |
---|---|
Identity |
Identity quaternion. |