GLM  0.9.5
Functions

Functions

template<typename T , precision P>
detail::tvec3< T, P > cross (detail::tquat< T, P > const &q, detail::tvec3< T, P > const &v)
 
template<typename T , precision P>
detail::tvec3< T, P > cross (detail::tvec3< T, P > const &v, detail::tquat< T, P > const &q)
 
template<typename T , precision P>
detail::tquat< T, P > exp (detail::tquat< T, P > const &q)
 
template<typename T , precision P>
extractRealComponent (detail::tquat< T, P > const &q)
 
template<typename T , precision P>
detail::tquat< T, P > fastMix (detail::tquat< T, P > const &x, detail::tquat< T, P > const &y, T const &a)
 
template<typename T , precision P>
detail::tquat< T, P > intermediate (detail::tquat< T, P > const &prev, detail::tquat< T, P > const &curr, detail::tquat< T, P > const &next)
 
template<typename T , precision P>
length2 (detail::tquat< T, P > const &q)
 
template<typename T , precision P>
detail::tquat< T, P > log (detail::tquat< T, P > const &q)
 
template<typename T , precision P>
detail::tquat< T, P > pow (detail::tquat< T, P > const &x, T const &y)
 
template<typename T , precision P>
detail::tvec3< T, P > rotate (detail::tquat< T, P > const &q, detail::tvec3< T, P > const &v)
 
template<typename T , precision P>
detail::tvec4< T, P > rotate (detail::tquat< T, P > const &q, detail::tvec4< T, P > const &v)
 
template<typename T , precision P>
detail::tquat< T, P > rotation (detail::tvec3< T, P > const &orig, detail::tvec3< T, P > const &dest)
 
template<typename T , precision P>
detail::tquat< T, P > shortMix (detail::tquat< T, P > const &x, detail::tquat< T, P > const &y, T const &a)
 
template<typename T , precision P>
detail::tquat< T, P > squad (detail::tquat< T, P > const &q1, detail::tquat< T, P > const &q2, detail::tquat< T, P > const &s1, detail::tquat< T, P > const &s2, T const &h)
 
template<typename T , precision P>
detail::tmat3x3< T, P > toMat3 (detail::tquat< T, P > const &x)
 
template<typename T , precision P>
detail::tmat4x4< T, P > toMat4 (detail::tquat< T, P > const &x)
 
template<typename T , precision P>
detail::tquat< T, P > toQuat (detail::tmat3x3< T, P > const &x)
 
template<typename T , precision P>
detail::tquat< T, P > toQuat (detail::tmat4x4< T, P > const &x)
 

Detailed Description

Extented quaternion types and functions.

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

Function Documentation

detail::tvec3<T, P> glm::cross ( detail::tquat< T, P > const &  q,
detail::tvec3< T, P > const &  v 
)

Compute a cross product between a quaternion and a vector.

See Also
GLM_GTX_quaternion
detail::tvec3<T, P> glm::cross ( detail::tvec3< T, P > const &  v,
detail::tquat< T, P > const &  q 
)

Compute a cross product between a vector and a quaternion.

See Also
GLM_GTX_quaternion
detail::tquat<T, P> glm::exp ( detail::tquat< T, P > const &  q)

Returns a exp of a quaternion.

See Also
GLM_GTX_quaternion
T glm::extractRealComponent ( detail::tquat< T, P > const &  q)

Extract the real component of a quaternion.

See Also
GLM_GTX_quaternion
detail::tquat<T, P> glm::fastMix ( detail::tquat< T, P > const &  x,
detail::tquat< T, P > const &  y,
T const &  a 
)

Quaternion normalized linear interpolation.

See Also
GLM_GTX_quaternion
detail::tquat<T, P> glm::intermediate ( detail::tquat< T, P > const &  prev,
detail::tquat< T, P > const &  curr,
detail::tquat< T, P > const &  next 
)

Returns an intermediate control point for squad interpolation.

See Also
GLM_GTX_quaternion
T glm::length2 ( detail::tquat< T, P > const &  q)

Returns the squared length of x.

See Also
GLM_GTX_quaternion
detail::tquat<T, P> glm::log ( detail::tquat< T, P > const &  q)

Returns a log of a quaternion.

See Also
GLM_GTX_quaternion
detail::tquat<T, P> glm::pow ( detail::tquat< T, P > const &  x,
T const &  y 
)

Returns x raised to the y power.

See Also
GLM_GTX_quaternion
detail::tvec3<T, P> glm::rotate ( detail::tquat< T, P > const &  q,
detail::tvec3< T, P > const &  v 
)

Returns quarternion square root.

See Also
GLM_GTX_quaternion Rotates a 3 components vector by a quaternion.
GLM_GTX_quaternion
detail::tvec4<T, P> glm::rotate ( detail::tquat< T, P > const &  q,
detail::tvec4< T, P > const &  v 
)

Rotates a 4 components vector by a quaternion.

See Also
GLM_GTX_quaternion
detail::tquat<T, P> glm::rotation ( detail::tvec3< T, P > const &  orig,
detail::tvec3< T, P > const &  dest 
)

Compute the rotation between two vectors.

param orig vector, needs to be normalized param dest vector, needs to be normalized

See Also
GLM_GTX_quaternion
detail::tquat<T, P> glm::shortMix ( detail::tquat< T, P > const &  x,
detail::tquat< T, P > const &  y,
T const &  a 
)

Quaternion interpolation using the rotation short path.

See Also
GLM_GTX_quaternion
detail::tquat<T, P> glm::squad ( detail::tquat< T, P > const &  q1,
detail::tquat< T, P > const &  q2,
detail::tquat< T, P > const &  s1,
detail::tquat< T, P > const &  s2,
T const &  h 
)

Compute a point on a path according squad equation.

q1 and q2 are control points; s1 and s2 are intermediate control points.

See Also
GLM_GTX_quaternion
detail::tmat3x3<T, P> glm::toMat3 ( detail::tquat< T, P > const &  x)

Converts a quaternion to a 3 * 3 matrix.

See Also
GLM_GTX_quaternion

Definition at line 150 of file gtx/quaternion.hpp.

References glm::mat3_cast().

detail::tmat4x4<T, P> glm::toMat4 ( detail::tquat< T, P > const &  x)

Converts a quaternion to a 4 * 4 matrix.

See Also
GLM_GTX_quaternion

Definition at line 157 of file gtx/quaternion.hpp.

References glm::mat4_cast().

detail::tquat<T, P> glm::toQuat ( detail::tmat3x3< T, P > const &  x)

Converts a 3 * 3 matrix to a quaternion.

See Also
GLM_GTX_quaternion

Definition at line 164 of file gtx/quaternion.hpp.

References glm::quat_cast().

detail::tquat<T, P> glm::toQuat ( detail::tmat4x4< T, P > const &  x)

Converts a 4 * 4 matrix to a quaternion.

See Also
GLM_GTX_quaternion

Definition at line 171 of file gtx/quaternion.hpp.

References glm::quat_cast().