Quaternion for interpolating rotation along longer path. More...
#include <kanzi/core/math/quaternion.hpp>
Public Member Functions | |
QuaternionLongerPath (const Quaternion &quaternion) | |
Public Member Functions inherited from kanzi::Quaternion | |
Quaternion | conjugated () const |
Get conjugated copy of this quaternion. | |
float | getW () const |
Get the w component of the quaternion. | |
float | getX () const |
Get the x component of the quaternion. | |
float | getY () const |
Get the y component of the quaternion. | |
float | getZ () const |
Get the z component of the quaternion. | |
KZ_NO_DISCARD Quaternion | normalized () const |
Get normalized copy of this quaternion. | |
Quaternion | operator* (float scalar) const |
Multiplies each quaternion component with a scalar and returns the result. | |
Quaternion & | operator*= (float scalar) |
Multiplies each quaternion component with a scalar. | |
Quaternion | operator/ (float scalar) const |
Divides each quaternion component with a scalar and returns the result. | |
Quaternion & | operator/= (float scalar) |
Divides each quaternion component with a scalar. | |
float & | operator[] (size_t index) |
Access individual components of a quaternion. | |
const float & | operator[] (size_t index) const |
Access individual components of a quaternion. | |
Quaternion () | |
Default constructor, initializes the quaternion components to identity, representing no rotation (x=0, y=0, z=0, w=1). | |
Quaternion (float x, float y, float z, float w) | |
Constructor, initializes the quaternion components to x, y, z and w. | |
void | setW (float w) |
Sets the w component of the quaternion. | |
void | setX (float x) |
Sets the x component of the quaternion. | |
void | setY (float y) |
Sets the y component of the quaternion. | |
void | setZ (float z) |
Sets the z component of the quaternion. | |
Additional Inherited Members | |
Static Public Member Functions inherited from kanzi::Quaternion | |
static Quaternion | createFromEulerAngles (float rotationX, float rotationY, float rotationZ) |
Creates a quaternion from Euler angles. | |
static Quaternion | createFromEulerAngles (Vector3 anglesInRadians) |
Creates a quaternion from Euler angles. | |
static Quaternion | createFromVector (Vector3 axis, float angleInRadians) |
Creates quaternion from axis and angle. | |
Quaternion for interpolating rotation along longer path.
When doing spherical interpolation of two quaternions, one quaternion can be interpolated towards another one either along shorter path (less than 180 degrees turn) or along longer path (more than 180 degrees turn). By default, quaternions are interpolated along shorter path (see quaternionSlerp()). Construct quaternions of QuaternionLongerPath type to specify that interpolation between them should be done along longer path for Kanzi subsystems which recognize this type (for example, animation system). quaternionSlerpLongerPath()).
|
inlineexplicit |