Quaternion operations. More...
#include <kanzi/core/legacy/debug/kzs_error.hpp>
Classes | |
struct | KzcQuaternion |
Structure of quaternion. More... | |
Functions | |
KANZI_API void | kzcQuaternionSetIdentity (KzcQuaternion *quaternion) |
Sets identity quaternion. More... | |
KANZI_API void | kzcQuaternionInitializeFromVector (const KzcVector3 *axis, kzFloat angleInRadians, KzcQuaternion *out_quaternion) |
Creates quaternion from vector and and angle. More... | |
KANZI_API void | kzcQuaternionInitializeFromMatrix4x4 (const KzcMatrix4x4 *matrix, KzcQuaternion *out_quaternion) |
Creates quaternion from matrix. More... | |
KANZI_API void | kzcQuaternionConvertToMatrix4x4 (const KzcQuaternion *quaternion, KzcMatrix4x4 *out_matrix) |
Converts quaternion from 4x4 matrix. More... | |
KANZI_API void | kzcQuaternionMultiply (const KzcQuaternion *quaternion1, const KzcQuaternion *quaternion2, KzcQuaternion *out_quaternion) |
Multiplies 2 quaternions, resulting rotation. More... | |
KANZI_API void | kzcQuaternionMultiplyVector3 (const KzcQuaternion *quaternion, const KzcVector3 *vector3, KzcVector3 *out_vector3) |
Multiplies quaternion with vector, i.e. More... | |
KANZI_API void | kzcQuaternionNormalize (KzcQuaternion *quaternion) |
Normalizes a quaternion. More... | |
KANZI_API KzcQuaternion | kzcQuaternionCreateNormalized (KzcQuaternion quaternion) |
Creates normalized quaternion from specified quaternion and returns it. More... | |
KANZI_API void | kzcQuaternionInverse (KzcQuaternion *quaternion) |
Inverses a quaternion. More... | |
KANZI_API void | kzcQuaternionSlerp (const KzcQuaternion *quaternion1, const KzcQuaternion *quaternion2, kzFloat t, KzcQuaternion *out_quaternion) |
Spherical interpolation between two quaternions. More... | |
KANZI_API void | kzcQuaternionSlerpLongerPath (const KzcQuaternion *quaternion1, const KzcQuaternion *quaternion2, kzFloat t, KzcQuaternion *out_quaternion) |
Spherical interpolation between two quaternions. More... | |
KANZI_API KzcQuaternion | kzcQuaternionFromRotationAngles (struct KzcVector3 angles) |
Creates quaternion from Euler rotation angles specified in radians. More... | |
KANZI_API KzcQuaternion | kzcQuaternionFromRotationAngles (float x, float y, float z) |
Creates quaternion from Euler rotation angles specified in radians. More... | |
KANZI_API KzcVector3 | kzcQuaternionToEulerAngles (const KzcQuaternion &quaternion) |
KANZI_API KzcQuaternion | operator* (const KzcQuaternion &left, const KzcQuaternion &right) |
KANZI_API KzcVector3 | operator* (const KzcQuaternion &quaternion, const KzcVector3 vector) |
KANZI_API bool | operator== (const KzcQuaternion &q1, const KzcQuaternion &q2) |
KANZI_API bool | operator!= (const KzcQuaternion &q1, const KzcQuaternion &q2) |
Quaternion operations.
Copyright 2008-2017 by Rightware. All rights reserved.
KANZI_API void kzcQuaternionSetIdentity | ( | KzcQuaternion * | quaternion | ) |
Sets identity quaternion.
KANZI_API void kzcQuaternionInitializeFromVector | ( | const KzcVector3 * | axis, |
kzFloat | angleInRadians, | ||
KzcQuaternion * | out_quaternion | ||
) |
Creates quaternion from vector and and angle.
KANZI_API void kzcQuaternionInitializeFromMatrix4x4 | ( | const KzcMatrix4x4 * | matrix, |
KzcQuaternion * | out_quaternion | ||
) |
Creates quaternion from matrix.
KANZI_API void kzcQuaternionConvertToMatrix4x4 | ( | const KzcQuaternion * | quaternion, |
KzcMatrix4x4 * | out_matrix | ||
) |
Converts quaternion from 4x4 matrix.
KANZI_API void kzcQuaternionMultiply | ( | const KzcQuaternion * | quaternion1, |
const KzcQuaternion * | quaternion2, | ||
KzcQuaternion * | out_quaternion | ||
) |
Multiplies 2 quaternions, resulting rotation.
KANZI_API void kzcQuaternionMultiplyVector3 | ( | const KzcQuaternion * | quaternion, |
const KzcVector3 * | vector3, | ||
KzcVector3 * | out_vector3 | ||
) |
Multiplies quaternion with vector, i.e.
applies rotation to vector.
KANZI_API void kzcQuaternionNormalize | ( | KzcQuaternion * | quaternion | ) |
Normalizes a quaternion.
KANZI_API KzcQuaternion kzcQuaternionCreateNormalized | ( | KzcQuaternion | quaternion | ) |
Creates normalized quaternion from specified quaternion and returns it.
KANZI_API void kzcQuaternionInverse | ( | KzcQuaternion * | quaternion | ) |
Inverses a quaternion.
KANZI_API void kzcQuaternionSlerp | ( | const KzcQuaternion * | quaternion1, |
const KzcQuaternion * | quaternion2, | ||
kzFloat | t, | ||
KzcQuaternion * | out_quaternion | ||
) |
Spherical interpolation between two quaternions.
t is the interpolation parameter from range [0, 1].
KANZI_API void kzcQuaternionSlerpLongerPath | ( | const KzcQuaternion * | quaternion1, |
const KzcQuaternion * | quaternion2, | ||
kzFloat | t, | ||
KzcQuaternion * | out_quaternion | ||
) |
Spherical interpolation between two quaternions.
Goes through the longer path (more than 180 degree turn). t is the interpolation parameter from range [0, 1].
KANZI_API KzcQuaternion kzcQuaternionFromRotationAngles | ( | struct KzcVector3 | angles | ) |
Creates quaternion from Euler rotation angles specified in radians.
KANZI_API KzcQuaternion kzcQuaternionFromRotationAngles | ( | float | x, |
float | y, | ||
float | z | ||
) |
Creates quaternion from Euler rotation angles specified in radians.
KANZI_API KzcVector3 kzcQuaternionToEulerAngles | ( | const KzcQuaternion & | quaternion | ) |
KANZI_API KzcQuaternion operator* | ( | const KzcQuaternion & | left, |
const KzcQuaternion & | right | ||
) |
KANZI_API KzcVector3 operator* | ( | const KzcQuaternion & | quaternion, |
const KzcVector3 | vector | ||
) |
KANZI_API bool operator== | ( | const KzcQuaternion & | q1, |
const KzcQuaternion & | q2 | ||
) |
KANZI_API bool operator!= | ( | const KzcQuaternion & | q1, |
const KzcQuaternion & | q2 | ||
) |