Ark Server API (ASE) - Wiki
|
Go to the source code of this file.
Classes | |
struct | TIsPODType< FQuat > |
Functions | |
MS_ALIGN (16) struct FQuat | |
GCC_ALIGN (16) | |
GCC_ALIGN | ( | 16 | ) |
MS_ALIGN | ( | 16 | ) |
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). Note 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.
The quaternion's X-component.
The quaternion's Y-component.
The quaternion's Z-component.
The quaternion's W-component.
Identity quaternion.
Default constructor (no initialization).
Creates and initializes a new quaternion, with the W component either 0 or 1.
EForceInit | Force init enum: if equal to ForceInitToZero then W is 0, otherwise W = 1 (creating an identity transform) |
Constructor.
InX | X component of the quaternion |
InY | Y component of the quaternion |
InZ | Z component of the quaternion |
InW | W component of the quaternion |
Copy constructor.
Q | A FQuat object to use to create new quaternion from. |
Creates and initializes a new quaternion from the given rotator.
R | The rotator to initialize from. |
Creates and initializes a new quaternion from the a rotation around the given axis.
Axis | assumed to be a normalized vector |
Angle | angle to rotate above the given axis (in radians) |
Gets the result of adding a Quaternion to this. This is a component-wise addition; composing quaternions should be done via multiplication.
Q | The Quaternion to add. |
Adds to this quaternion. This is a component-wise addition; composing quaternions should be done via multiplication.
Other | The quaternion to add to this. |
Gets the result of subtracting a Quaternion to this. This is a component-wise subtraction; composing quaternions should be done via multiplication.
Q | The Quaternion to subtract. |
Checks whether another Quaternion is equal to this, within specified tolerance.
Q | The other Quaternion. |
Tolerance | Error tolerance for comparison with other Quaternion. |
Checks whether this Quaternion is an Identity Quaternion. Assumes Quaternion tested is normalized.
Tolerance | Error tolerance for comparison with Identity Quaternion. |
Subtracts another quaternion from this. This is a component-wise subtraction; composing quaternions should be done via multiplication.
Q | The other quaternion. |
Rotate a vector by this quaternion.
V | the vector to be rotated |
Multiply this quaternion by a scaling factor.
Scale | The scaling factor. |
Get the result of scaling this quaternion.
Scale | The scaling factor. |
Divide this quaternion by scale.
Scale | What to divide by. |
Divide this quaternion by scale.
Scale | What to divide by. |
Checks whether two quaternions are identical. This is an exact comparison per-component;see Equals() for a comparison that allows for a small error tolerance and flipped axes of rotation.
Q | The other quaternion. |
Checks whether two quaternions are not identical.
Q | The other quaternion. |
Calculates dot product of two quaternions.
Q | The other quaternions. |
Convert a vector of floating-point Euler angles (in degrees) into a Quaternion.
Euler | the Euler angles |
Convert a Quaternion into floating-point Euler angles (in degrees).
Normalize this quaternion if it is large enough. If it is too small, returns an identity quaternion.
Tolerance | Minimum squared length of quaternion for normalization. |
Get a normalized copy of this quaternion. If it is too small, returns an identity quaternion.
Tolerance | Minimum squared length of quaternion for normalization. |
Get the length of this quaternion.
Get the length squared of this quaternion.
Get the angle of this quaternion
get the axis and angle of rotation of this quaternion
Axis{out] | vector of axis of the quaternion |
Angle{out] | angle of the quaternion |
Get the swing and twist decomposition for a specified axis
InTwistAxis | Axis to use for decomposition |
OutSwing | swing component quaternion |
OutTwist | Twist component quaternion |
Rotate a vector by this quaternion.
V | the vector to be rotated |
Rotate a vector by the inverse of this quaternion.
V | the vector to be rotated |
Enforce that the delta between this Quaternion and another one represents the shortest possible rotation angle
Get the forward direction (X axis) after it has been rotated by this Quaternion.
Get the right direction (Y axis) after it has been rotated by this Quaternion.
Get the up direction (Z axis) after it has been rotated by this Quaternion.
Get the forward direction (X axis) after it has been rotated by this Quaternion.
Get the right direction (Y axis) after it has been rotated by this Quaternion.
Get the up direction (Z axis) after it has been rotated by this Quaternion.
Convert a rotation into a unit vector facing in its direction. Equivalent to GetForwardVector().
Get the FRotator representation of this Quaternion.
Get the axis of rotation of the Quaternion. This is the axis around which rotation occurs to transform the canonical coordinate system to the target orientation. For the identity Quaternion which has no such rotation, FVector(1,0,0) is returned.
Find the angular distance between two rotation quaternions (in radians)
Utility to check if there are any non-finite values (NaN or Inf) in this Quat.
Get a textual representation of the vector.
Initialize this FQuat from a FString. The string is expected to contain X=, Y=, Z=, W=, otherwise this FQuat will have indeterminate (invalid) values.
InSourceString | FString containing the quaternion values. |
Generates the 'smallest' (geodesic) rotation between two vectors of arbitrary length.
Generates the 'smallest' (geodesic) rotation between two normals (assumed to be unit length).
Generates the 'smallest' (geodesic) rotation between two vectors of arbitrary length.
Error measure (angle) between two quaternions, ranged [0..1]. Returns the hypersphere-angle between two quaternions; alignment shouldn't matter, though
FQuat::Error with auto-normalization.
Fast Linear Quaternion Interpolation. Result is NOT normalized.
Bi-Linear Quaternion interpolation. Result is NOT normalized.
Spherical interpolation. Will correct alignment. Result is NOT normalized.
Spherical interpolation. Will correct alignment. Result is normalized.
Simpler Slerp that doesn't do any checks for 'shortest distance' etc. We need this for the cubic interpolation stuff so that the multiple Slerps dont go in different directions. Result is NOT normalized.
Simpler Slerp that doesn't do any checks for 'shortest distance' etc. We need this for the cubic interpolation stuff so that the multiple Slerps dont go in different directions. Result is normalized.
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. Result is normalized. This will correct alignment by ensuring that the shortest path is taken.
Simpler Squad that doesn't do any checks for 'shortest distance' etc. 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. Result is normalized.
Calculate tangents between given points
PrevP | quaternion at P-1 |
P | quaternion to return the tangent |
NextP | quaternion P+1 |
Tension |
OutTan | Out control point |