Typedefs | Functions

glm::gtc::quaternion Namespace Reference

GLM_GTC_quaternion extension: Quaternion types and functions. More...

Typedefs

typedef detail::tquat< double > dquat
 Quaternion of double-precision floating-point numbers.
typedef detail::tquat< float > fquat
 Quaternion of single-precision floating-point numbers.
typedef detail::tquat
< detail::thalf
hquat
 Quaternion of half-precision floating-point numbers.
typedef detail::tquat< float > quat
 Quaternion of floating-point numbers.

Functions

template<typename T >
detail::tquat< T > conjugate (detail::tquat< T > const &q)
 Returns the q conjugate.
template<typename T >
GLM_DEPRECATED detail::tquat< T > cross (detail::tquat< T > const &q1, detail::tquat< T > const &q2)
 Returns the cross product of q1 and q2.
template<typename T >
detail::tquat< T >::value_type dot (detail::tquat< T > const &q1, detail::tquat< T > const &q2)
 Returns dot product of q1 and q2, i.e., q1[0] * q2[0] + q1[1] * q2[1] + ...
template<typename T >
detail::tquat< T > inverse (detail::tquat< T > const &q)
 Returns the q inverse.
template<typename T >
detail::tquat< T >::value_type length (detail::tquat< T > const &q)
 Returns the length of the quaternion x.
template<typename T >
detail::tmat3x3< T > mat3_cast (detail::tquat< T > const &x)
 Converts a quaternion to a 3 * 3 matrix.
template<typename T >
detail::tmat4x4< T > mat4_cast (detail::tquat< T > const &x)
 Converts a quaternion to a 4 * 4 matrix.
template<typename T >
detail::tquat< T > mix (detail::tquat< T > const &x, detail::tquat< T > const &y, typename detail::tquat< T >::value_type const &a)
 Returns a SLERP interpolated quaternion of x and y according a.
template<typename T >
detail::tquat< T > normalize (detail::tquat< T > const &q)
 Returns the normalized quaternion of from x.
template<typename T >
detail::tquat< T > quat_cast (detail::tmat4x4< T > const &x)
 Converts a 4 * 4 matrix to a quaternion.
template<typename T >
detail::tquat< T > quat_cast (detail::tmat3x3< T > const &x)
 Converts a 3 * 3 matrix to a quaternion.
template<typename T >
detail::tquat< T > rotate (detail::tquat< T > const &q, typename detail::tquat< T >::value_type const &angle, detail::tvec3< T > const &v)
 Rotates a quaternion from an vector of 3 components axis and an angle expressed in degrees.

Detailed Description

GLM_GTC_quaternion extension: Quaternion types and functions.