0.9.9 API documentation
Functions
GLM_EXT_quaternion_transform

Functions

template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > exp (qua< T, Q > const &q)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > log (qua< T, Q > const &q)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > pow (qua< T, Q > const &q, T y)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > rotate (qua< T, Q > const &q, T const &angle, vec< 3, T, Q > const &axis)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL qua< T, Q > sqrt (qua< T, Q > const &q)
 

Detailed Description

Provides transformation functions for quaternion types.

Include <glm/ext/quaternion_transform.hpp> to use the features of this extension.

See also
GLM_EXT_quaternion_float
GLM_EXT_quaternion_double
GLM_EXT_quaternion_exponential
GLM_EXT_quaternion_geometric
GLM_EXT_quaternion_relational
GLM_EXT_quaternion_trigonometric

Function Documentation

◆ exp()

GLM_FUNC_DECL qua<T, Q> glm::exp ( qua< T, Q > const &  q)

Returns a exponential of a quaternion.

Template Parameters
TA floating-point scalar type
QA value from qualifier enum

◆ log()

GLM_FUNC_DECL qua<T, Q> glm::log ( qua< T, Q > const &  q)

Returns a logarithm of a quaternion.

Template Parameters
TA floating-point scalar type
QA value from qualifier enum

◆ pow()

GLM_FUNC_DECL qua<T, Q> glm::pow ( qua< T, Q > const &  q,
y 
)

Returns a quaternion raised to a power.

Template Parameters
TA floating-point scalar type
QA value from qualifier enum

◆ rotate()

GLM_FUNC_DECL qua<T, Q> glm::rotate ( qua< T, Q > const &  q,
T const &  angle,
vec< 3, T, Q > const &  axis 
)

Rotates a quaternion from a vector of 3 components axis and an angle.

Parameters
qSource orientation
angleAngle expressed in radians.
axisAxis of the rotation
Template Parameters
TFloating-point scalar types
QValue from qualifier enum

◆ sqrt()

GLM_FUNC_DECL qua<T, Q> glm::sqrt ( qua< T, Q > const &  q)

Returns the square root of a quaternion.

Template Parameters
TA floating-point scalar type
QA value from qualifier enum