Ark Server API (ASA) - Wiki
|
#include <Rotator.h>
Public Types | |
using | FReal = T |
Static Public Member Functions | |
static T | ClampAxis (T Angle) |
static T | NormalizeAxis (T Angle) |
static uint8 | CompressAxisToByte (T Angle) |
static T | DecompressAxisFromByte (uint8 Angle) |
static uint16 | CompressAxisToShort (T Angle) |
static T | DecompressAxisFromShort (uint16 Angle) |
static TRotator | MakeFromEuler (const TVector< T > &Euler) |
Public Attributes | |
T | Pitch |
T | Yaw |
T | Roll |
Static Public Attributes | |
static const TRotator< T > | ZeroRotator |
Implements a container for rotation information.
All rotation values are stored in degrees.
The angles are interpreted as intrinsic rotations applied in the order Yaw, then Pitch, then Roll. I.e., an object would be rotated first by the specified yaw around its up axis (with positive angles interpreted as clockwise when viewed from above, along -Z), then pitched around its (new) right axis (with positive angles interpreted as 'nose up', i.e. clockwise when viewed along +Y), and then finally rolled around its (final) forward axis (with positive angles interpreted as clockwise rotations when viewed along +X).
Note that these conventions differ from quaternion axis/angle. UE Quat always considers a positive angle to be a left-handed rotation, whereas Rotator treats yaw as left-handed but pitch and roll as right-handed.
|
inline |
|
explicit |
FORCEINLINE UE::Math::TRotator< T >::TRotator | ( | T | InPitch, |
T | InYaw, | ||
T | InRoll ) |
|
explicit |
Constructor.
Quat | Quaternion used to specify rotation. |
|
inlineexplicit |
FORCEINLINE TRotator< T > UE::Math::TRotator< T >::Add | ( | T | DeltaPitch, |
T | DeltaYaw, | ||
T | DeltaRoll ) |
FORCEINLINE TRotator< T > UE::Math::TRotator< T >::Clamp | ( | ) | const |
|
static |
|
static |
|
static |
FORCEINLINE bool UE::Math::TRotator< T >::ContainsNaN | ( | ) | const |
|
static |
|
static |
|
inline |
|
inline |
FORCEINLINE bool UE::Math::TRotator< T >::Equals | ( | const TRotator< T > & | R, |
T | Tolerance = UE_KINDA_SMALL_NUMBER ) const |
Checks whether two rotators are equal within specified tolerance, when treated as an orientation. This means that TRotator(0, 0, 360).Equals(TRotator(0,0,0)) is true, because they represent the same final orientation.
R | The other rotator. |
Tolerance | Error Tolerance. |
Convert a Rotator into floating-point Euler angles (in degrees). Rotator now stored in degrees.
FORCEINLINE T UE::Math::TRotator< T >::GetComponentForAxis | ( | EAxis::Type | Axis | ) | const |
FORCEINLINE TRotator< T > UE::Math::TRotator< T >::GetDenormalized | ( | ) | const |
FORCEINLINE TRotator< T > UE::Math::TRotator< T >::GetEquivalentRotator | ( | ) | const |
TRotator UE::Math::TRotator< T >::GetInverse | ( | ) | const |
Returns the inverse of the rotator.
FORCEINLINE T UE::Math::TRotator< T >::GetManhattanDistance | ( | const TRotator< T > & | Rotator | ) | const |
Return the manhattan distance in degrees between this Rotator and the passed in one.
Rotator[In] | the Rotator we are comparing with. |
FORCEINLINE TRotator< T > UE::Math::TRotator< T >::GetNormalized | ( | ) | const |
void UE::Math::TRotator< T >::GetWindingAndRemainder | ( | TRotator< T > & | Winding, |
TRotator< T > & | Remainder ) const |
Decompose this Rotator into a Winding part (multiples of 360) and a Remainder part. Remainder will always be in [-180, 180] range.
Winding[Out] | the Winding part of this Rotator |
Remainder[Out] | the Remainder |
FORCEINLINE TRotator< T > UE::Math::TRotator< T >::GridSnap | ( | const TRotator< T > & | RotGrid | ) | const |
FORCEINLINE bool UE::Math::TRotator< T >::InitFromString | ( | const FString & | InSourceString | ) |
FORCEINLINE bool UE::Math::TRotator< T >::IsNearlyZero | ( | T | Tolerance = UE_KINDA_SMALL_NUMBER | ) | const |
Checks whether rotator is nearly zero within specified tolerance, when treated as an orientation. This means that TRotator(0, 0, 360) is "zero", because it is the same final orientation as the zero rotator.
Tolerance | Error Tolerance. |
FORCEINLINE bool UE::Math::TRotator< T >::IsZero | ( | ) | const |
Convert a vector of floating-point Euler angles (in degrees) into a Rotator. Rotator now stored in degrees
Euler | Euler angle vector. |
bool UE::Math::TRotator< T >::NetSerialize | ( | FArchive & | Ar, |
class UPackageMap * | Map, | ||
bool & | bOutSuccess ) |
FORCEINLINE void UE::Math::TRotator< T >::Normalize | ( | ) |
|
static |
FORCEINLINE bool UE::Math::TRotator< T >::operator!= | ( | const TRotator< T > & | V | ) | const |
|
inline |
|
inline |
FORCEINLINE TRotator< T > UE::Math::TRotator< T >::operator+ | ( | const TRotator< T > & | R | ) | const |
FORCEINLINE TRotator< T > UE::Math::TRotator< T >::operator+= | ( | const TRotator< T > & | R | ) |
FORCEINLINE TRotator< T > UE::Math::TRotator< T >::operator- | ( | const TRotator< T > & | R | ) | const |
FORCEINLINE TRotator< T > UE::Math::TRotator< T >::operator-= | ( | const TRotator< T > & | R | ) |
FORCEINLINE bool UE::Math::TRotator< T >::operator== | ( | const TRotator< T > & | R | ) | const |
FQuat4d FRotator3d::Quaternion | ( | ) | const |
Get Rotation as a quaternion.
TVector< T > UE::Math::TRotator< T >::RotateVector | ( | const UE::Math::TVector< T > & | V | ) | const |
Rotate a vector rotated by this rotator.
V | The vector to rotate. |
Serializes the rotator compressed for e.g. network transmission.
Ar | Archive to serialize to/ from |
Serializes the rotator compressed for e.g. network transmission (use shorts though).
Ar | Archive to serialize to/ from |
FORCEINLINE void UE::Math::TRotator< T >::SetClosestToMe | ( | TRotator< T > & | MakeClosest | ) | const |
Modify if necessary the passed in rotator to be the closest rotator to it based upon it's equivalent. This Rotator should be within (-180, 180], usually just constructed from a Matrix or a Quaternion.
MakeClosest[In/Out] | the Rotator we want to make closest to us. Should be between (-180, 180]. This Rotator may change if we need to use different degree values to make it closer. |
FORCEINLINE void UE::Math::TRotator< T >::SetComponentForAxis | ( | EAxis::Type | Axis, |
T | Component ) |
FORCEINLINE FString UE::Math::TRotator< T >::ToCompactString | ( | ) | const |
FORCEINLINE FString UE::Math::TRotator< T >::ToString | ( | ) | const |
TVector< T > UE::Math::TRotator< T >::UnrotateVector | ( | const UE::Math::TVector< T > & | V | ) | const |
Returns the vector rotated by the inverse of this rotator.
V | The vector to rotate. |
Convert a rotation into a unit vector facing in its direction.
T UE::Math::TRotator< T >::Pitch |
T UE::Math::TRotator< T >::Roll |
T UE::Math::TRotator< T >::Yaw |