Warnings
The axis calculation cannot succeed for small angles due to numerical error. In this case, the function will return false, but set the axis to DefaultAxis. @note EpsilonSq is approximately the square of the angle below which we cannot calculate the axis. It needs to be "much greater" than square of the error in the quaternion values which is usually ~1e-4, so values around 1e-3^2 = 1e-6 or greater are about right.
Module |
|
Header |
/Engine/Source/Runtime/Experimental/Chaos/Public/Chaos/Rotation.h |
Include |
#include "Chaos/Rotation.h" |
Extract the axis from the Quaternion.
The axis calculation cannot succeed for small angles due to numerical error. In this case, the function will return false, but set the axis to DefaultAxis. @note EpsilonSq is approximately the square of the angle below which we cannot calculate the axis. It needs to be "much greater" than square of the error in the quaternion values which is usually ~1e-4, so values around 1e-3^2 = 1e-6 or greater are about right.
Whether the axis was successfully calculated (true except for very small angles around or less than Epsilon).
Parameter |
Description |
---|---|
OutAxis |
The axis of rotation. |
DefaultAxis |
The axis to set when the angle is too small to accurately calculate the axis. |
EpsilonSq |
The squared tolerance used to check for small angles. |