GLM_GTC_quaternion: Quaternion types and functions
GTC Extensions (Stable)

## Classes

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

## Typedefs

typedef detail::tquat< double > dquat
typedef detail::tquat< float > fquat
typedef detail::tquat
< highp_float >
highp_quat
typedef detail::tquat
< detail::half >
hquat
typedef detail::tquat< lowp_float > lowp_quat
typedef detail::tquat
< mediump_float >
mediump_quat
typedef detail::tquat< float > quat

## Functions

template<typename T >
detail::tquat< T > conjugate (detail::tquat< T > const &q)
template<typename T >
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 >
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, T const &a)
template<typename T >
detail::tquat< T > normalize (detail::tquat< T > const &q)
template<typename T >
detail::tquat< T > quat_cast (detail::tmat3x3< T > const &x)
template<typename T >
detail::tquat< T > quat_cast (detail::tmat4x4< 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 dquat

Quaternion of double-precision floating-point numbers.

GLM_GTC_quaternion: Quaternion types and functions

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

 typedef detail::tquat fquat

Quaternion of single-precision floating-point numbers.

GLM_GTC_quaternion: Quaternion types and functions

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

 typedef detail::tquat highp_quat

Quaternion of high precision floating-point numbers.

GLM_GTC_quaternion: Quaternion types and functions

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

 typedef detail::tquat hquat

Quaternion of half-precision floating-point numbers.

GLM_GTC_quaternion: Quaternion types and functions

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

 typedef detail::tquat lowp_quat

Quaternion of low precision floating-point numbers.

GLM_GTC_quaternion: Quaternion types and functions

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

 typedef detail::tquat mediump_quat

Quaternion of medium precision floating-point numbers.

GLM_GTC_quaternion: Quaternion types and functions

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

 typedef detail::tquat quat

Quaternion of floating-point numbers.

GLM_GTC_quaternion: Quaternion types and functions

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

## Function Documentation

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

Returns the q conjugate.

GLM_GTC_quaternion: Quaternion types and functions
 T glm::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] + ...

GLM_GTC_quaternion: Quaternion types and functions
 detail::tquat glm::inverse ( detail::tquat< T > const & q )

Returns the q inverse.

GLM_GTC_quaternion: Quaternion types and functions
 T glm::length ( detail::tquat< T > const & q )

Returns the length of the quaternion.

GLM_GTC_quaternion: Quaternion types and functions
 detail::tmat3x3 glm::mat3_cast ( detail::tquat< T > const & x )

Converts a quaternion to a 3 * 3 matrix.

GLM_GTC_quaternion: Quaternion types and functions

Referenced by glm::toMat3().

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

Converts a quaternion to a 4 * 4 matrix.

GLM_GTC_quaternion: Quaternion types and functions

Referenced by glm::toMat4().

 detail::tquat glm::mix ( detail::tquat< T > const & x, detail::tquat< T > const & y, T const & a )

Returns a SLERP interpolated quaternion of x and y according a.

GLM_GTC_quaternion: Quaternion types and functions
 detail::tquat glm::normalize ( detail::tquat< T > const & q )

Returns the normalized quaternion.

GLM_GTC_quaternion: Quaternion types and functions
 detail::tquat glm::quat_cast ( detail::tmat3x3< T > const & x )

Converts a 3 * 3 matrix to a quaternion.

GLM_GTC_quaternion: Quaternion types and functions

Referenced by glm::toQuat().

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

Converts a 4 * 4 matrix to a quaternion.