0.9.9 API documenation
|
Functions | |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL qua< T, Q > | conjugate (qua< T, Q > const &q) |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL qua< T, Q > | inverse (qua< T, Q > const &q) |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL vec< 4, bool, Q > | isinf (qua< T, Q > const &x) |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL vec< 4, bool, Q > | isnan (qua< T, Q > const &x) |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL qua< T, Q > | lerp (qua< T, Q > const &x, qua< T, Q > const &y, T a) |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL qua< T, Q > | mix (qua< T, Q > const &x, qua< T, Q > const &y, T a) |
template<typename T , qualifier Q> | |
GLM_FUNC_DECL qua< T, Q > | slerp (qua< T, Q > const &x, qua< T, Q > const &y, T a) |
Provides common functions for quaternion types.
Include <glm/ext/quaternion_common.hpp> to use the features of this extension.
GLM_FUNC_DECL qua<T, Q> glm::conjugate | ( | qua< T, Q > const & | q | ) |
Returns the q conjugate.
T | A floating-point scalar type |
Q | A value from qualifier enum |
GLM_FUNC_DECL qua<T, Q> glm::inverse | ( | qua< T, Q > const & | q | ) |
Returns the q inverse.
T | A floating-point scalar type |
Q | A value from qualifier enum |
GLM_FUNC_DECL vec<4, bool, Q> glm::isinf | ( | qua< T, Q > const & | x | ) |
Returns true if x holds a positive infinity or negative infinity representation in the underlying implementation's set of floating point representations.
Returns false otherwise, including for implementations with no infinity representations.
T | A floating-point scalar type |
Q | A value from qualifier enum |
GLM_FUNC_DECL vec<4, bool, Q> glm::isnan | ( | qua< T, Q > const & | x | ) |
Returns true if x holds a NaN (not a number) representation in the underlying implementation's set of floating point representations.
Returns false otherwise, including for implementations with no NaN representations.
/!\ When using compiler fast math, this function may fail.
T | A floating-point scalar type |
Q | A value from qualifier enum |
GLM_FUNC_DECL qua<T, Q> glm::lerp | ( | qua< T, Q > const & | x, |
qua< T, Q > const & | y, | ||
T | a | ||
) |
Linear interpolation of two quaternions.
The interpolation is oriented.
x | A quaternion |
y | A quaternion |
a | Interpolation factor. The interpolation is defined in the range [0, 1]. |
T | A floating-point scalar type |
Q | A value from qualifier enum |
GLM_FUNC_DECL qua<T, Q> glm::mix | ( | qua< T, Q > const & | x, |
qua< T, Q > const & | y, | ||
T | a | ||
) |
Spherical linear interpolation of two quaternions.
The interpolation is oriented and the rotation is performed at constant speed. For short path spherical linear interpolation, use the slerp function.
x | A quaternion |
y | A quaternion |
a | Interpolation factor. The interpolation is defined beyond the range [0, 1]. |
T | A floating-point scalar type |
Q | A value from qualifier enum |
GLM_FUNC_DECL qua<T, Q> glm::slerp | ( | qua< T, Q > const & | x, |
qua< T, Q > const & | y, | ||
T | a | ||
) |
Spherical linear interpolation of two quaternions.
The interpolation always take the short path and the rotation is performed at constant speed.
x | A quaternion |
y | A quaternion |
a | Interpolation factor. The interpolation is defined beyond the range [0, 1]. |
T | A floating-point scalar type |
Q | A value from qualifier enum |