Implements a container for rotation information. 更多...
#include <Rotator.h>
Public 成员函数 | |
| FRotator | Add (float DeltaPitch, float DeltaYaw, float DeltaRoll) |
| Adds to each component of the rotator. 更多... | |
| FRotator | Clamp () const |
| Gets the rotation values so they fall within the range [0,360] 更多... | |
| bool | ContainsNaN () const |
| Utility to check if there are any non-finite values (NaN or Inf) in this Rotator. 更多... | |
| bool | Equals (const FRotator &R, float Tolerance=KINDA_SMALL_NUMBER) const |
| Checks whether two rotators are equal within specified tolerance, when treated as an orientation. 更多... | |
| CORE_API FVector | Euler () const |
| Convert a Rotator into floating-point Euler angles (in degrees). 更多... | |
| FORCEINLINE | FRotator () |
| Default constructor (no initialization). | |
| CORE_API | FRotator (const FQuat &Quat) |
| Constructor. 更多... | |
| FORCEINLINE | FRotator (EForceInit) |
| Constructor. 更多... | |
| FORCEINLINE | FRotator (float InF) |
| Constructor 更多... | |
| FORCEINLINE | FRotator (float InPitch, float InYaw, float InRoll) |
| Constructor. 更多... | |
| float | GetComponentForAxis (EAxis::Type Axis) const |
| Get a specific component of the vector, given a specific axis by enum | |
| FRotator | GetDenormalized () const |
| Create a copy of this rotator and denormalize, clamping each axis to 0 - 360. 更多... | |
| FRotator | GetEquivalentRotator () const |
| Return a Rotator that has the same rotation but has different degree values for Yaw, Pitch, and Roll. 更多... | |
| CORE_API FRotator | GetInverse () const |
| Returns the inverse of the rotator. | |
| float | GetManhattanDistance (const FRotator &Rotator) const |
| Return the manhattan distance in degrees between this Rotator and the passed in one. 更多... | |
| FRotator | GetNormalized () const |
| Create a copy of this rotator and normalize, removes all winding and creates the "shortest route" rotation. 更多... | |
| CORE_API void | GetWindingAndRemainder (FRotator &Winding, FRotator &Remainder) const |
| Decompose this Rotator into a Winding part (multiples of 360) and a Remainder part. 更多... | |
| FRotator | GridSnap (const FRotator &RotGrid) const |
| Get the rotation, snapped to specified degree segments. 更多... | |
| bool | InitFromString (const FString &InSourceString) |
| Initialize this Rotator based on an FString. 更多... | |
| bool | IsNearlyZero (float Tolerance=KINDA_SMALL_NUMBER) const |
| Checks whether rotator is nearly zero within specified tolerance, when treated as an orientation. 更多... | |
| bool | IsZero () const |
| Checks whether this has exactly zero rotation, when treated as an orientation. 更多... | |
| void | Normalize () |
| In-place normalize, removes all winding and creates the "shortest route" rotation. | |
| bool | operator!= (const FRotator &V) const |
| Checks whether two rotators are different. 更多... | |
| FRotator | operator* (float Scale) const |
| Get the result of scaling this rotator. 更多... | |
| FRotator | operator*= (float Scale) |
| Multiply this rotator by a scaling factor. 更多... | |
| FRotator | operator+ (const FRotator &R) const |
| Get the result of adding a rotator to this. 更多... | |
| FRotator | operator+= (const FRotator &R) |
| Adds another rotator to this. 更多... | |
| FRotator | operator- (const FRotator &R) const |
| Get the result of subtracting a rotator from this. 更多... | |
| FRotator | operator-= (const FRotator &R) |
| Subtracts another rotator from this. 更多... | |
| bool | operator== (const FRotator &R) const |
| Checks whether two rotators are identical. 更多... | |
| CORE_API FQuat | Quaternion () const |
| Get Rotation as a quaternion. 更多... | |
| CORE_API FVector | RotateVector (const FVector &V) const |
| Rotate a vector rotated by this rotator. 更多... | |
| CORE_API void | SerializeCompressed (FArchive &Ar) |
| Serializes the rotator compressed for e.g. 更多... | |
| CORE_API void | SerializeCompressedShort (FArchive &Ar) |
| Serializes the rotator compressed for e.g. 更多... | |
| void | SetClosestToMe (FRotator &MakeClosest) const |
| Modify if necessary the passed in rotator to be the closest rotator to it based upon it's equivalent. 更多... | |
| void | SetComponentForAxis (EAxis::Type Axis, float Component) |
| Set a specified componet of the vector, given a specific axis by enum | |
| FString | ToCompactString () const |
| Get a short textural representation of this vector, for compact readable logging. | |
| FString | ToString () const |
| Get a textual representation of the vector. 更多... | |
| CORE_API FVector | UnrotateVector (const FVector &V) const |
| Returns the vector rotated by the inverse of this rotator. 更多... | |
| CORE_API FVector | Vector () const |
| Convert a rotation into a unit vector facing in its direction. 更多... | |
静态 Public 成员函数 | |
| static float | ClampAxis (float Angle) |
| Clamps an angle to the range of [0, 360). 更多... | |
| static uint8 | CompressAxisToByte (float Angle) |
| Compresses a floating point angle into a byte. 更多... | |
| static uint16 | CompressAxisToShort (float Angle) |
| Compress a floating point angle into a word. 更多... | |
| static float | DecompressAxisFromByte (uint8 Angle) |
| Decompress a word into a floating point angle. 更多... | |
| static float | DecompressAxisFromShort (uint16 Angle) |
| Decompress a short into a floating point angle. 更多... | |
| static CORE_API FRotator | MakeFromEuler (const FVector &Euler) |
| Convert a vector of floating-point Euler angles (in degrees) into a Rotator. 更多... | |
| static float | NormalizeAxis (float Angle) |
| Clamps an angle to the range of (-180, 180]. 更多... | |
静态 Public 属性 | |
| static CORE_API const FRotator | ZeroRotator |
| A rotator of zero degrees on each axis. | |
友元 | |
| FArchive & | operator<< (FArchive &Ar, FRotator &R) |
| Serializer. 更多... | |
Implements a container for rotation information.
All rotation values are stored in degrees.
|
explicit |
Constructor
| InF | Value to set all components to. |
| FORCEINLINE FRotator::FRotator | ( | float | InPitch, |
| float | InYaw, | ||
| float | InRoll | ||
| ) |
Constructor.
| InPitch | Pitch in degrees. |
| InYaw | Yaw in degrees. |
| InRoll | Roll in degrees. |
|
explicit |
Constructor.
| EForceInit | Force Init Enum. |
|
explicit |
Constructor.
| Quat | Quaternion used to specify rotation. |
| FORCEINLINE FRotator FRotator::Add | ( | float | DeltaPitch, |
| float | DeltaYaw, | ||
| float | DeltaRoll | ||
| ) |
Adds to each component of the rotator.
| DeltaPitch | Change in pitch. (+/-) |
| DeltaYaw | Change in yaw. (+/-) |
| DeltaRoll | Change in roll. (+/-) |
| FORCEINLINE FRotator FRotator::Clamp | ( | ) | const |
Gets the rotation values so they fall within the range [0,360]
|
static |
Clamps an angle to the range of [0, 360).
| Angle | The angle to clamp. |
|
static |
Compresses a floating point angle into a byte.
| Angle | The angle to compress. |
|
static |
Compress a floating point angle into a word.
| Angle | The angle to compress. |
| FORCEINLINE bool FRotator::ContainsNaN | ( | ) | const |
Utility to check if there are any non-finite values (NaN or Inf) in this Rotator.
|
static |
Decompress a word into a floating point angle.
| Angle | The word angle. |
|
static |
Decompress a short into a floating point angle.
| Angle | The word angle. |
| FORCEINLINE bool FRotator::Equals | ( | const FRotator & | R, |
| float | Tolerance = KINDA_SMALL_NUMBER |
||
| ) | const |
Checks whether two rotators are equal within specified tolerance, when treated as an orientation.
This means that FRotator(0, 0, 360).Equals(FRotator(0,0,0)) is true, because they represent the same final orientation.
| R | The other rotator. |
| Tolerance | Error Tolerance. |
| CORE_API FVector FRotator::Euler | ( | ) | const |
Convert a Rotator into floating-point Euler angles (in degrees).
Rotator now stored in degrees.
| FORCEINLINE FRotator FRotator::GetDenormalized | ( | ) | const |
Create a copy of this rotator and denormalize, clamping each axis to 0 - 360.
| FORCEINLINE FRotator FRotator::GetEquivalentRotator | ( | ) | const |
Return a Rotator that has the same rotation but has different degree values for Yaw, Pitch, and Roll.
This rotator should be within -180,180 range,
| FORCEINLINE float FRotator::GetManhattanDistance | ( | const FRotator & | 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 FRotator FRotator::GetNormalized | ( | ) | const |
Create a copy of this rotator and normalize, removes all winding and creates the "shortest route" rotation.
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 |
Get the rotation, snapped to specified degree segments.
| RotGrid | A Rotator specifying how to snap each component. |
| FORCEINLINE bool FRotator::InitFromString | ( | const FString & | InSourceString | ) |
| FORCEINLINE bool FRotator::IsNearlyZero | ( | float | Tolerance = KINDA_SMALL_NUMBER | ) | const |
Checks whether rotator is nearly zero within specified tolerance, when treated as an orientation.
This means that FRotator(0, 0, 360) is "zero", because it is the same final orientation as the zero rotator.
| Tolerance | Error Tolerance. |
| FORCEINLINE bool FRotator::IsZero | ( | ) | const |
Checks whether this has exactly zero rotation, when treated as an orientation.
This means that FRotator(0, 0, 360) is "zero", because it is the same final orientation as the zero rotator.
Convert a vector of floating-point Euler angles (in degrees) into a Rotator.
Rotator now stored in degrees
| Euler | Euler angle vector. |
|
static |
Clamps an angle to the range of (-180, 180].
| Angle | The Angle to clamp. |
| FORCEINLINE bool FRotator::operator!= | ( | const FRotator & | V | ) | const |
Checks whether two rotators are different.
| V | The other rotator. |
| FORCEINLINE FRotator FRotator::operator* | ( | float | Scale | ) | const |
Get the result of scaling this rotator.
| Scale | The scaling factor. |
| FORCEINLINE FRotator FRotator::operator*= | ( | float | Scale | ) |
Multiply this rotator by a scaling factor.
| Scale | The scaling factor. |
Get the result of adding a rotator to this.
| R | The other rotator. |
Adds another rotator to this.
| R | The other rotator. |
Get the result of subtracting a rotator from this.
| R | The other rotator. |
Subtracts another rotator from this.
| R | The other rotator. |
| FORCEINLINE bool FRotator::operator== | ( | const FRotator & | R | ) | const |
Checks whether two rotators are identical.
This checks each component for exact equality.
| R | The other rotator. |
| CORE_API FQuat FRotator::Quaternion | ( | ) | const |
Get Rotation as a quaternion.
Rotate a vector rotated by this rotator.
| V | The vector to rotate. |
| CORE_API void FRotator::SerializeCompressed | ( | FArchive & | Ar | ) |
Serializes the rotator compressed for e.g.
network transmission.
| Ar | Archive to serialize to/ from |
| CORE_API void FRotator::SerializeCompressedShort | ( | FArchive & | Ar | ) |
Serializes the rotator compressed for e.g.
network transmission (use shorts though).
| Ar | Archive to serialize to/ from |
| FORCEINLINE void FRotator::SetClosestToMe | ( | FRotator & | 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 FString FRotator::ToString | ( | ) | const |
Get a textual representation of the vector.
Returns the vector rotated by the inverse of this rotator.
| V | The vector to rotate. |
| CORE_API FVector FRotator::Vector | ( | ) | const |
Convert a rotation into a unit vector facing in its direction.
Serializer.
| Ar | Serialization Archive. |
| R | Rotator being serialized. |