PSMoveService
Classes | Typedefs | Functions
GLM_GTC_quaternion: Quaternion types and functions

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

Classes

struct  glm::detail::tquat< T >
 Template for quaternion. More...
 

Typedefs

typedef detail::tquat< float > glm::quat
 Quaternion of floating-point numbers. More...
 
typedef detail::tquat< detail::halfglm::hquat
 Quaternion of half-precision floating-point numbers. More...
 
typedef detail::tquat< float > glm::fquat
 Quaternion of single-precision floating-point numbers. More...
 
typedef detail::tquat< double > glm::dquat
 Quaternion of double-precision floating-point numbers. More...
 
typedef detail::tquat< lowp_floatglm::lowp_quat
 Quaternion of low precision floating-point numbers. More...
 
typedef detail::tquat< mediump_floatglm::mediump_quat
 Quaternion of medium precision floating-point numbers. More...
 
typedef detail::tquat< highp_floatglm::highp_quat
 Quaternion of high precision floating-point numbers. More...
 

Functions

template<typename T >
glm::length (detail::tquat< T > const &q)
 Returns the length of the quaternion. More...
 
template<typename T >
detail::tquat< T > glm::normalize (detail::tquat< T > const &q)
 Returns the normalized quaternion. More...
 
template<typename 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] + ... More...
 
template<typename T >
detail::tquat< T > 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. More...
 
template<typename T >
detail::tquat< T > glm::conjugate (detail::tquat< T > const &q)
 Returns the q conjugate. More...
 
template<typename T >
detail::tquat< T > glm::inverse (detail::tquat< T > const &q)
 Returns the q inverse. More...
 
template<typename T >
detail::tquat< T > glm::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. More...
 
template<typename T >
detail::tvec3< T > glm::eulerAngles (detail::tquat< T > const &x)
 Returns euler angles, yitch as x, yaw as y, roll as z. More...
 
template<typename T >
detail::tmat3x3< T > glm::mat3_cast (detail::tquat< T > const &x)
 Converts a quaternion to a 3 * 3 matrix. More...
 
template<typename T >
detail::tmat4x4< T > glm::mat4_cast (detail::tquat< T > const &x)
 Converts a quaternion to a 4 * 4 matrix. More...
 
template<typename T >
detail::tquat< T > glm::quat_cast (detail::tmat3x3< T > const &x)
 Converts a 3 * 3 matrix to a quaternion. More...
 
template<typename T >
detail::tquat< T > glm::quat_cast (detail::tmat4x4< T > const &x)
 Converts a 4 * 4 matrix to a quaternion. More...
 

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

§ dquat

typedef detail::tquat<double> glm::dquat

Quaternion of double-precision floating-point numbers.

See also
GLM_GTC_quaternion: Quaternion types and functions

§ fquat

typedef detail::tquat<float> glm::fquat

Quaternion of single-precision floating-point numbers.

See also
GLM_GTC_quaternion: Quaternion types and functions

§ highp_quat

Quaternion of high precision floating-point numbers.

See also
GLM_GTC_quaternion: Quaternion types and functions

§ hquat

Quaternion of half-precision floating-point numbers.

See also
GLM_GTC_quaternion: Quaternion types and functions

§ lowp_quat

Quaternion of low precision floating-point numbers.

See also
GLM_GTC_quaternion: Quaternion types and functions

§ mediump_quat

Quaternion of medium precision floating-point numbers.

See also
GLM_GTC_quaternion: Quaternion types and functions

§ quat

typedef detail::tquat<float> glm::quat

Quaternion of floating-point numbers.

See also
GLM_GTC_quaternion: Quaternion types and functions

Function Documentation

§ conjugate()

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

Returns the q conjugate.

See also
GLM_GTC_quaternion: Quaternion types and functions

§ dot()

template<typename T >
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] + ...

See also
GLM_GTC_quaternion: Quaternion types and functions

§ eulerAngles()

template<typename T >
detail::tvec3<T> glm::eulerAngles ( detail::tquat< T > const &  x)

Returns euler angles, yitch as x, yaw as y, roll as z.

See also
GLM_GTC_quaternion: Quaternion types and functions

§ inverse()

template<typename T >
detail::tquat<T> glm::inverse ( detail::tquat< T > const &  q)

§ length()

template<typename T >
T glm::length ( detail::tquat< T > const &  q)

Returns the length of the quaternion.

See also
GLM_GTC_quaternion: Quaternion types and functions

§ mat3_cast()

template<typename T >
detail::tmat3x3<T> glm::mat3_cast ( detail::tquat< T > const &  x)

Converts a quaternion to a 3 * 3 matrix.

See also
GLM_GTC_quaternion: Quaternion types and functions

§ mat4_cast()

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

Converts a quaternion to a 4 * 4 matrix.

See also
GLM_GTC_quaternion: Quaternion types and functions

§ mix()

template<typename T >
detail::tquat<T> 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.

See also
GLM_GTC_quaternion: Quaternion types and functions

§ normalize()

template<typename T >
detail::tquat<T> glm::normalize ( detail::tquat< T > const &  q)

Returns the normalized quaternion.

See also
GLM_GTC_quaternion: Quaternion types and functions

§ quat_cast() [1/2]

template<typename T >
detail::tquat<T> glm::quat_cast ( detail::tmat3x3< T > const &  x)

Converts a 3 * 3 matrix to a quaternion.

See also
GLM_GTC_quaternion: Quaternion types and functions

§ quat_cast() [2/2]

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

Converts a 4 * 4 matrix to a quaternion.

See also
GLM_GTC_quaternion: Quaternion types and functions

§ rotate()

template<typename T >
detail::tquat<T> glm::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.

See also
GLM_GTC_quaternion: Quaternion types and functions