|
|
|
@ -30,8 +30,8 @@ |
|
|
|
|
/// @see gtc_constants (dependence)
|
|
|
|
|
/// @see gtc_quaternion (dependence)
|
|
|
|
|
///
|
|
|
|
|
/// @defgroup gtc_dual_quaternion GLM_GTX_dual_quaternion
|
|
|
|
|
/// @ingroup gtc
|
|
|
|
|
/// @defgroup gtx_dual_quaternion GLM_GTX_dual_quaternion
|
|
|
|
|
/// @ingroup gtx
|
|
|
|
|
///
|
|
|
|
|
/// @brief Defines a templated dual-quaternion type and several dual-quaternion operations.
|
|
|
|
|
///
|
|
|
|
@ -51,7 +51,7 @@ |
|
|
|
|
|
|
|
|
|
namespace glm |
|
|
|
|
{ |
|
|
|
|
/// @addtogroup gtc_dual_quaternion
|
|
|
|
|
/// @addtogroup gtx_dual_quaternion
|
|
|
|
|
/// @{
|
|
|
|
|
|
|
|
|
|
template <typename T, precision P> |
|
|
|
@ -160,7 +160,7 @@ namespace glm |
|
|
|
|
|
|
|
|
|
/// Returns the normalized quaternion.
|
|
|
|
|
///
|
|
|
|
|
/// @see gtc_dual_quaternion
|
|
|
|
|
/// @see gtx_dual_quaternion
|
|
|
|
|
template <typename T, precision P> |
|
|
|
|
GLM_FUNC_DECL tdualquat<T, P> normalize( |
|
|
|
|
tdualquat<T, P> const & q); |
|
|
|
@ -176,45 +176,35 @@ namespace glm |
|
|
|
|
|
|
|
|
|
/// Returns the q inverse.
|
|
|
|
|
///
|
|
|
|
|
/// @see gtc_dual_quaternion
|
|
|
|
|
/// @see gtx_dual_quaternion
|
|
|
|
|
template <typename T, precision P> |
|
|
|
|
GLM_FUNC_DECL tdualquat<T, P> inverse( |
|
|
|
|
tdualquat<T, P> const & q); |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
/// Extracts a rotation part from dual-quaternion to a 3 * 3 matrix.
|
|
|
|
|
/// TODO
|
|
|
|
|
///
|
|
|
|
|
/// @see gtc_dual_quaternion
|
|
|
|
|
template <typename T, precision P> |
|
|
|
|
tmat3x3<T, P> mat3_cast( |
|
|
|
|
tdualquat<T, P> const & x); |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
/// Converts a quaternion to a 2 * 4 matrix.
|
|
|
|
|
///
|
|
|
|
|
/// @see gtc_dual_quaternion
|
|
|
|
|
/// @see gtx_dual_quaternion
|
|
|
|
|
template <typename T, precision P> |
|
|
|
|
GLM_FUNC_DECL tmat2x4<T, P> mat2x4_cast( |
|
|
|
|
tdualquat<T, P> const & x); |
|
|
|
|
|
|
|
|
|
/// Converts a quaternion to a 3 * 4 matrix.
|
|
|
|
|
///
|
|
|
|
|
/// @see gtc_dual_quaternion
|
|
|
|
|
/// @see gtx_dual_quaternion
|
|
|
|
|
template <typename T, precision P> |
|
|
|
|
GLM_FUNC_DECL tmat3x4<T, P> mat3x4_cast( |
|
|
|
|
tdualquat<T, P> const & x); |
|
|
|
|
|
|
|
|
|
/// Converts a 2 * 4 matrix (matrix which holds real and dual parts) to a quaternion.
|
|
|
|
|
///
|
|
|
|
|
/// @see gtc_dual_quaternion
|
|
|
|
|
/// @see gtx_dual_quaternion
|
|
|
|
|
template <typename T, precision P> |
|
|
|
|
GLM_FUNC_DECL tdualquat<T, P> dualquat_cast( |
|
|
|
|
tmat2x4<T, P> const & x); |
|
|
|
|
|
|
|
|
|
/// Converts a 3 * 4 matrix (augmented matrix rotation + translation) to a quaternion.
|
|
|
|
|
///
|
|
|
|
|
/// @see gtc_dual_quaternion
|
|
|
|
|
/// @see gtx_dual_quaternion
|
|
|
|
|
template <typename T, precision P> |
|
|
|
|
GLM_FUNC_DECL tdualquat<T, P> dualquat_cast( |
|
|
|
|
tmat3x4<T, P> const & x); |
|
|
|
@ -222,61 +212,61 @@ namespace glm |
|
|
|
|
|
|
|
|
|
/// Dual-quaternion of low single-precision floating-point numbers.
|
|
|
|
|
///
|
|
|
|
|
/// @see gtc_dual_quaternion
|
|
|
|
|
/// @see gtx_dual_quaternion
|
|
|
|
|
typedef tdualquat<float, lowp> lowp_dualquat; |
|
|
|
|
|
|
|
|
|
/// Dual-quaternion of medium single-precision floating-point numbers.
|
|
|
|
|
///
|
|
|
|
|
/// @see gtc_dual_quaternion
|
|
|
|
|
/// @see gtx_dual_quaternion
|
|
|
|
|
typedef tdualquat<float, mediump> mediump_dualquat; |
|
|
|
|
|
|
|
|
|
/// Dual-quaternion of high single-precision floating-point numbers.
|
|
|
|
|
///
|
|
|
|
|
/// @see gtc_dual_quaternion
|
|
|
|
|
/// @see gtx_dual_quaternion
|
|
|
|
|
typedef tdualquat<float, highp> highp_dualquat; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Dual-quaternion of low single-precision floating-point numbers.
|
|
|
|
|
///
|
|
|
|
|
/// @see gtc_dual_quaternion
|
|
|
|
|
/// @see gtx_dual_quaternion
|
|
|
|
|
typedef tdualquat<float, lowp> lowp_fdualquat; |
|
|
|
|
|
|
|
|
|
/// Dual-quaternion of medium single-precision floating-point numbers.
|
|
|
|
|
///
|
|
|
|
|
/// @see gtc_dual_quaternion
|
|
|
|
|
/// @see gtx_dual_quaternion
|
|
|
|
|
typedef tdualquat<float, mediump> mediump_fdualquat; |
|
|
|
|
|
|
|
|
|
/// Dual-quaternion of high single-precision floating-point numbers.
|
|
|
|
|
///
|
|
|
|
|
/// @see gtc_dual_quaternion
|
|
|
|
|
/// @see gtx_dual_quaternion
|
|
|
|
|
typedef tdualquat<float, highp> highp_fdualquat; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Dual-quaternion of low double-precision floating-point numbers.
|
|
|
|
|
///
|
|
|
|
|
/// @see gtc_dual_quaternion
|
|
|
|
|
/// @see gtx_dual_quaternion
|
|
|
|
|
typedef tdualquat<double, lowp> lowp_ddualquat; |
|
|
|
|
|
|
|
|
|
/// Dual-quaternion of medium double-precision floating-point numbers.
|
|
|
|
|
///
|
|
|
|
|
/// @see gtc_dual_quaternion
|
|
|
|
|
/// @see gtx_dual_quaternion
|
|
|
|
|
typedef tdualquat<double, mediump> mediump_ddualquat; |
|
|
|
|
|
|
|
|
|
/// Dual-quaternion of high double-precision floating-point numbers.
|
|
|
|
|
///
|
|
|
|
|
/// @see gtc_dual_quaternion
|
|
|
|
|
/// @see gtx_dual_quaternion
|
|
|
|
|
typedef tdualquat<double, highp> highp_ddualquat; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if(!defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT)) |
|
|
|
|
/// Dual-quaternion of floating-point numbers.
|
|
|
|
|
///
|
|
|
|
|
/// @see gtc_dual_quaternion
|
|
|
|
|
/// @see gtx_dual_quaternion
|
|
|
|
|
typedef highp_fdualquat dualquat; |
|
|
|
|
|
|
|
|
|
/// Dual-quaternion of single-precision floating-point numbers.
|
|
|
|
|
///
|
|
|
|
|
/// @see gtc_dual_quaternion
|
|
|
|
|
/// @see gtx_dual_quaternion
|
|
|
|
|
typedef highp_fdualquat fdualquat; |
|
|
|
|
#elif(defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT)) |
|
|
|
|
typedef highp_fdualquat dualquat; |
|
|
|
@ -295,7 +285,7 @@ namespace glm |
|
|
|
|
#if(!defined(GLM_PRECISION_HIGHP_DOUBLE) && !defined(GLM_PRECISION_MEDIUMP_DOUBLE) && !defined(GLM_PRECISION_LOWP_DOUBLE)) |
|
|
|
|
/// Dual-quaternion of default double-precision floating-point numbers.
|
|
|
|
|
///
|
|
|
|
|
/// @see gtc_dual_quaternion
|
|
|
|
|
/// @see gtx_dual_quaternion
|
|
|
|
|
typedef highp_ddualquat ddualquat; |
|
|
|
|
#elif(defined(GLM_PRECISION_HIGHP_DOUBLE) && !defined(GLM_PRECISION_MEDIUMP_DOUBLE) && !defined(GLM_PRECISION_LOWP_DOUBLE)) |
|
|
|
|
typedef highp_ddualquat ddualquat; |
|
|
|
|