Extented quaternion types and functions. More...
Functions | |
template<typename T , precision P> | |
GLM_FUNC_DECL detail::tvec3< T, P > | glm::cross (detail::tquat< T, P > const &q, detail::tvec3< T, P > const &v) |
template<typename T , precision P> | |
GLM_FUNC_DECL detail::tvec3< T, P > | glm::cross (detail::tvec3< T, P > const &v, detail::tquat< T, P > const &q) |
template<typename T , precision P> | |
GLM_FUNC_DECL detail::tquat< T, P > | glm::exp (detail::tquat< T, P > const &q) |
template<typename T , precision P> | |
GLM_FUNC_DECL T | glm::extractRealComponent (detail::tquat< T, P > const &q) |
template<typename T , precision P> | |
GLM_FUNC_DECL detail::tquat< T, P > | glm::fastMix (detail::tquat< T, P > const &x, detail::tquat< T, P > const &y, T const &a) |
template<typename T , precision P> | |
GLM_FUNC_DECL detail::tquat< T, P > | glm::intermediate (detail::tquat< T, P > const &prev, detail::tquat< T, P > const &curr, detail::tquat< T, P > const &next) |
template<typename T , precision P> | |
GLM_FUNC_DECL T | glm::length2 (detail::tquat< T, P > const &q) |
template<typename T , precision P> | |
GLM_FUNC_DECL detail::tquat< T, P > | glm::log (detail::tquat< T, P > const &q) |
template<typename T , precision P> | |
GLM_FUNC_DECL detail::tquat< T, P > | glm::pow (detail::tquat< T, P > const &x, T const &y) |
template<typename T , precision P> | |
GLM_FUNC_DECL detail::tvec3< T, P > | glm::rotate (detail::tquat< T, P > const &q, detail::tvec3< T, P > const &v) |
template<typename T , precision P> | |
GLM_FUNC_DECL detail::tvec4< T, P > | glm::rotate (detail::tquat< T, P > const &q, detail::tvec4< T, P > const &v) |
template<typename T , precision P> | |
GLM_FUNC_DECL detail::tquat< T, P > | glm::rotation (detail::tvec3< T, P > const &orig, detail::tvec3< T, P > const &dest) |
template<typename T , precision P> | |
GLM_FUNC_DECL detail::tquat< T, P > | glm::shortMix (detail::tquat< T, P > const &x, detail::tquat< T, P > const &y, T const &a) |
template<typename T , precision P> | |
GLM_FUNC_DECL detail::tquat< T, P > | glm::squad (detail::tquat< T, P > const &q1, detail::tquat< T, P > const &q2, detail::tquat< T, P > const &s1, detail::tquat< T, P > const &s2, T const &h) |
template<typename T , precision P> | |
GLM_FUNC_DECL detail::tmat3x3< T, P > | glm::toMat3 (detail::tquat< T, P > const &x) |
template<typename T , precision P> | |
GLM_FUNC_DECL detail::tmat4x4< T, P > | glm::toMat4 (detail::tquat< T, P > const &x) |
template<typename T , precision P> | |
GLM_FUNC_DECL detail::tquat< T, P > | glm::toQuat (detail::tmat3x3< T, P > const &x) |
template<typename T , precision P> | |
GLM_FUNC_DECL detail::tquat< T, P > | glm::toQuat (detail::tmat4x4< T, P > const &x) |
Extented quaternion types and functions.
<glm/gtx/quaternion.hpp> need to be included to use these functionalities.
GLM_FUNC_DECL detail::tvec3<T, P> glm::cross | ( | detail::tquat< T, P > const & | q, |
detail::tvec3< T, P > const & | v | ||
) |
Compute a cross product between a quaternion and a vector.
GLM_FUNC_DECL detail::tvec3<T, P> glm::cross | ( | detail::tvec3< T, P > const & | v, |
detail::tquat< T, P > const & | q | ||
) |
Compute a cross product between a vector and a quaternion.
GLM_FUNC_DECL detail::tquat<T, P> glm::exp | ( | detail::tquat< T, P > const & | q | ) |
Returns a exp of a quaternion.
GLM_FUNC_DECL T glm::extractRealComponent | ( | detail::tquat< T, P > const & | q | ) |
Extract the real component of a quaternion.
GLM_FUNC_DECL detail::tquat<T, P> glm::fastMix | ( | detail::tquat< T, P > const & | x, |
detail::tquat< T, P > const & | y, | ||
T const & | a | ||
) |
Quaternion normalized linear interpolation.
GLM_FUNC_DECL detail::tquat<T, P> glm::intermediate | ( | detail::tquat< T, P > const & | prev, |
detail::tquat< T, P > const & | curr, | ||
detail::tquat< T, P > const & | next | ||
) |
Returns an intermediate control point for squad interpolation.
GLM_FUNC_DECL T glm::length2 | ( | detail::tquat< T, P > const & | q | ) |
Returns the squared length of x.
GLM_FUNC_DECL detail::tquat<T, P> glm::log | ( | detail::tquat< T, P > const & | q | ) |
Returns a log of a quaternion.
GLM_FUNC_DECL detail::tquat<T, P> glm::pow | ( | detail::tquat< T, P > const & | x, |
T const & | y | ||
) |
Returns x raised to the y power.
GLM_FUNC_DECL detail::tvec3<T, P> glm::rotate | ( | detail::tquat< T, P > const & | q, |
detail::tvec3< T, P > const & | v | ||
) |
Returns quarternion square root.
GLM_FUNC_DECL detail::tvec4<T, P> glm::rotate | ( | detail::tquat< T, P > const & | q, |
detail::tvec4< T, P > const & | v | ||
) |
Rotates a 4 components vector by a quaternion.
GLM_FUNC_DECL detail::tquat<T, P> glm::rotation | ( | detail::tvec3< T, P > const & | orig, |
detail::tvec3< T, P > const & | dest | ||
) |
Compute the rotation between two vectors. param orig vector, needs to be normalized param dest vector, needs to be normalized
GLM_FUNC_DECL detail::tquat<T, P> glm::shortMix | ( | detail::tquat< T, P > const & | x, |
detail::tquat< T, P > const & | y, | ||
T const & | a | ||
) |
Quaternion interpolation using the rotation short path.
GLM_FUNC_DECL detail::tquat<T, P> glm::squad | ( | detail::tquat< T, P > const & | q1, |
detail::tquat< T, P > const & | q2, | ||
detail::tquat< T, P > const & | s1, | ||
detail::tquat< T, P > const & | s2, | ||
T const & | h | ||
) |
Compute a point on a path according squad equation. q1 and q2 are control points; s1 and s2 are intermediate control points.
GLM_FUNC_DECL detail::tmat3x3<T, P> glm::toMat3 | ( | detail::tquat< T, P > const & | x | ) |
Converts a quaternion to a 3 * 3 matrix.
Definition at line 149 of file gtx/quaternion.hpp.
GLM_FUNC_DECL detail::tmat4x4<T, P> glm::toMat4 | ( | detail::tquat< T, P > const & | x | ) |
Converts a quaternion to a 4 * 4 matrix.
Definition at line 156 of file gtx/quaternion.hpp.
GLM_FUNC_DECL detail::tquat<T, P> glm::toQuat | ( | detail::tmat3x3< T, P > const & | x | ) |
Converts a 3 * 3 matrix to a quaternion.
Definition at line 163 of file gtx/quaternion.hpp.
GLM_FUNC_DECL detail::tquat<T, P> glm::toQuat | ( | detail::tmat4x4< T, P > const & | x | ) |
Converts a 4 * 4 matrix to a quaternion.
Definition at line 170 of file gtx/quaternion.hpp.