Classes | Typedefs | Functions
GLM_GTC_quaternion: Quaternion types and functions
GTC Extensions (Stable)

Defines a templated quaternion type and several quaternion operations. More...

Classes

struct  tquat< T >
 Template for quaternion. More...

Typedefs

typedef detail::tquat< double > dquat
typedef detail::tquat< float > fquat
typedef detail::tquat
< detail::thalf > 
hquat
typedef detail::tquat< float > quat

Functions

template<typename T >
detail::tquat< T > conjugate (detail::tquat< T > const &q)
template<typename T >
GLM_DEPRECATED detail::tquat< T > cross (detail::tquat< T > const &q1, detail::tquat< T > const &q2)
template<typename T >
detail::tquat< T >::value_type dot (detail::tquat< T > const &q1, detail::tquat< T > const &q2)
template<typename T >
detail::tquat< T > inverse (detail::tquat< T > const &q)
template<typename T >
detail::tquat< T >::value_type length (detail::tquat< T > const &q)
template<typename T >
detail::tmat3x3< T > mat3_cast (detail::tquat< T > const &x)
template<typename T >
detail::tmat4x4< T > mat4_cast (detail::tquat< T > const &x)
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)
template<typename T >
detail::tquat< T > normalize (detail::tquat< T > const &q)
template<typename T >
detail::tquat< T > quat_cast (detail::tmat4x4< T > const &x)
template<typename T >
detail::tquat< T > quat_cast (detail::tmat3x3< T > const &x)
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)

Detailed Description

Defines a templated quaternion type and several quaternion operations.

<glm/gtc/quaternion.hpp> need to be included to use these functionalities.


Typedef Documentation

typedef detail::tquat<double> dquat

Quaternion of double-precision floating-point numbers.

From GLM_GTC_quaternion extension.

Definition at line 217 of file gtc/quaternion.hpp.

typedef detail::tquat<float> fquat

Quaternion of single-precision floating-point numbers.

From GLM_GTC_quaternion extension.

Definition at line 213 of file gtc/quaternion.hpp.

typedef detail::tquat<detail::thalf> hquat

Quaternion of half-precision floating-point numbers.

From GLM_GTC_quaternion extension.

Definition at line 209 of file gtc/quaternion.hpp.

typedef detail::tquat<float> quat

Quaternion of floating-point numbers.

From GLM_GTC_quaternion extension.

Definition at line 205 of file gtc/quaternion.hpp.


Function Documentation

detail::tquat<T> glm::gtc::quaternion::conjugate ( detail::tquat< T > const &  q)

Returns the q conjugate.

From GLM_GTC_quaternion extension.

GLM_DEPRECATED detail::tquat<T> glm::gtc::quaternion::cross ( detail::tquat< T > const &  q1,
detail::tquat< T > const &  q2 
)

Returns the cross product of q1 and q2.

From GLM_GTC_quaternion extension.

detail::tquat<T>::value_type glm::gtc::quaternion::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] + ...

From GLM_GTC_quaternion extension.

detail::tquat<T> glm::gtc::quaternion::inverse ( detail::tquat< T > const &  q)

Returns the q inverse.

From GLM_GTC_quaternion extension.

detail::tquat<T>::value_type glm::gtc::quaternion::length ( detail::tquat< T > const &  q)

Returns the length of the quaternion x.

From GLM_GTC_quaternion extension.

detail::tmat3x3<T> glm::gtc::quaternion::mat3_cast ( detail::tquat< T > const &  x)

Converts a quaternion to a 3 * 3 matrix.

From GLM_GTC_quaternion extension.

Referenced by glm::gtx::quaternion::toMat3().

detail::tmat4x4<T> glm::gtc::quaternion::mat4_cast ( detail::tquat< T > const &  x)

Converts a quaternion to a 4 * 4 matrix.

From GLM_GTC_quaternion extension.

Referenced by glm::gtx::quaternion::toMat4().

detail::tquat<T> glm::gtc::quaternion::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.

From GLM_GTC_quaternion extension.

detail::tquat<T> glm::gtc::quaternion::normalize ( detail::tquat< T > const &  q)

Returns the normalized quaternion of from x.

From GLM_GTC_quaternion extension.

detail::tquat<T> glm::gtc::quaternion::quat_cast ( detail::tmat4x4< T > const &  x)

Converts a 4 * 4 matrix to a quaternion.

From GLM_GTC_quaternion extension.

detail::tquat<T> glm::gtc::quaternion::quat_cast ( detail::tmat3x3< T > const &  x)

Converts a 3 * 3 matrix to a quaternion.

From GLM_GTC_quaternion extension.

Referenced by glm::gtx::quaternion::toQuat().

detail::tquat<T> glm::gtc::quaternion::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.

From GLM_GTC_quaternion extension.