20 #include "../gtc/constants.hpp" 21 #include "../gtc/quaternion.hpp" 23 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 24 # ifndef GLM_ENABLE_EXPERIMENTAL 25 # pragma message("GLM: GLM_GTX_dual_quaternion is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.") 27 # pragma message("GLM: GLM_GTX_dual_quaternion extension included") 36 template<
typename T, qualifier Q = defaultp>
50 typedef length_t length_type;
52 GLM_FUNC_DECL
static GLM_CONSTEXPR length_type
length(){
return 2;}
54 GLM_FUNC_DECL part_type & operator[](length_type i);
55 GLM_FUNC_DECL part_type
const& operator[](length_type i)
const;
59 GLM_FUNC_DECL GLM_CONSTEXPR
tdualquat() GLM_DEFAULT;
66 GLM_FUNC_DECL GLM_CONSTEXPR tdualquat(
qua<T, Q> const& real);
72 template<
typename U, qualifier P>
73 GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT tdualquat(
tdualquat<U, P> const& q);
75 GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR tdualquat(
mat<2, 4, T, Q> const& holder_mat);
76 GLM_FUNC_DECL GLM_EXPLICIT GLM_CONSTEXPR tdualquat(
mat<3, 4, T, Q> const& aug_mat);
92 template<
typename T, qualifier Q>
95 template<
typename T, qualifier Q>
100 template<
typename T, qualifier Q>
103 template<
typename T, qualifier Q>
106 template<
typename T, qualifier Q>
109 template<
typename T, qualifier Q>
112 template<
typename T, qualifier Q>
115 template<
typename T, qualifier Q>
118 template<
typename T, qualifier Q>
121 template<
typename T, qualifier Q>
124 template<
typename T, qualifier Q>
129 template<
typename T, qualifier Q>
132 template<
typename T, qualifier Q>
138 template <
typename T, qualifier Q>
144 template<
typename T, qualifier Q>
150 template<
typename T, qualifier Q>
156 template<
typename T, qualifier Q>
162 template<
typename T, qualifier Q>
168 template<
typename T, qualifier Q>
174 template<
typename T, qualifier Q>
180 template<
typename T, qualifier Q>
232 #if(!defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT)) 242 #elif(defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT)) 245 #elif(!defined(GLM_PRECISION_HIGHP_FLOAT) && defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT)) 248 #elif(!defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && defined(GLM_PRECISION_LOWP_FLOAT)) 252 # error "GLM error: multiple default precision requested for single-precision floating-point types" 256 #if(!defined(GLM_PRECISION_HIGHP_DOUBLE) && !defined(GLM_PRECISION_MEDIUMP_DOUBLE) && !defined(GLM_PRECISION_LOWP_DOUBLE)) 261 #elif(defined(GLM_PRECISION_HIGHP_DOUBLE) && !defined(GLM_PRECISION_MEDIUMP_DOUBLE) && !defined(GLM_PRECISION_LOWP_DOUBLE)) 263 #elif(!defined(GLM_PRECISION_HIGHP_DOUBLE) && defined(GLM_PRECISION_MEDIUMP_DOUBLE) && !defined(GLM_PRECISION_LOWP_DOUBLE)) 265 #elif(!defined(GLM_PRECISION_HIGHP_DOUBLE) && !defined(GLM_PRECISION_MEDIUMP_DOUBLE) && defined(GLM_PRECISION_LOWP_DOUBLE)) 268 # error "GLM error: Multiple default precision requested for double-precision floating-point types" 274 #include "dual_quaternion.inl" Definition: type_vec3.hpp:17
Definition: qualifier.hpp:37
highp_fdualquat fdualquat
Dual-quaternion of single-qualifier floating-point numbers.
Definition: dual_quaternion.hpp:241
tdualquat< float, lowp > lowp_dualquat
Dual-quaternion of low single-qualifier floating-point numbers.
Definition: dual_quaternion.hpp:187
highp_ddualquat ddualquat
Dual-quaternion of default double-qualifier floating-point numbers.
Definition: dual_quaternion.hpp:260
GLM_FUNC_DECL tdualquat< T, Q > dualquat_cast(mat< 2, 4, T, Q > const &x)
Converts a 2 * 4 matrix (matrix which holds real and dual parts) to a quaternion. ...
Definition: dual_quaternion.inl:295
GLM_FUNC_DECL mat< 2, 4, T, Q > mat2x4_cast(tdualquat< T, Q > const &x)
Converts a quaternion to a 2 * 4 matrix.
Definition: dual_quaternion.inl:253
Core features
Definition: common.hpp:20
tdualquat< float, highp > highp_dualquat
Dual-quaternion of high single-qualifier floating-point numbers.
Definition: dual_quaternion.hpp:197
tdualquat< float, mediump > mediump_fdualquat
Dual-quaternion of medium single-qualifier floating-point numbers.
Definition: dual_quaternion.hpp:208
tdualquat< float, highp > highp_fdualquat
Dual-quaternion of high single-qualifier floating-point numbers.
Definition: dual_quaternion.hpp:213
highp_fdualquat dualquat
Dual-quaternion of floating-point numbers.
Definition: dual_quaternion.hpp:236
static GLM_FUNC_DECL GLM_CONSTEXPR length_type length()
Return the count of components of a dual quaternion.
Definition: dual_quaternion.hpp:52
GLM_FUNC_DECL mat< 4, 4, T, Q > orientation(vec< 3, T, Q > const &Normal, vec< 3, T, Q > const &Up)
Build a rotation matrix from a normal and a up vector.
Definition: rotate_vector.inl:174
tdualquat< float, mediump > mediump_dualquat
Dual-quaternion of medium single-qualifier floating-point numbers.
Definition: dual_quaternion.hpp:192
Definition: type_vec4.hpp:17
Definition: type_mat2x4.hpp:14
Definition: type_mat3x4.hpp:14
GLM_FUNC_DECL mat< 3, 4, T, Q > mat3x4_cast(tdualquat< T, Q > const &x)
Converts a quaternion to a 3 * 4 matrix.
Definition: dual_quaternion.inl:259
tdualquat< double, highp > highp_ddualquat
Dual-quaternion of high double-qualifier floating-point numbers.
Definition: dual_quaternion.hpp:229
tdualquat< double, lowp > lowp_ddualquat
Dual-quaternion of low double-qualifier floating-point numbers.
Definition: dual_quaternion.hpp:219
GLM_FUNC_DECL qua< T, Q > lerp(qua< T, Q > const &x, qua< T, Q > const &y, T a)
Linear interpolation of two quaternions.
Definition: quaternion_common.inl:29
GLM_FUNC_QUALIFIER mat< C, R, T, Q > inverse(mat< C, R, T, Q > const &m)
Return the inverse of a squared matrix.
Definition: func_matrix.inl:388
Definition: dual_quaternion.hpp:37
GLM_FUNC_QUALIFIER vec< L, T, Q > normalize(vec< L, T, Q > const &x)
Returns a vector in the same direction as x but with length of 1.
Definition: func_geometric.inl:190
tdualquat< double, mediump > mediump_ddualquat
Dual-quaternion of medium double-qualifier floating-point numbers.
Definition: dual_quaternion.hpp:224
tdualquat< float, lowp > lowp_fdualquat
Dual-quaternion of low single-qualifier floating-point numbers.
Definition: dual_quaternion.hpp:203
GLM_FUNC_DECL tdualquat< T, Q > dual_quat_identity()
Creates an identity dual quaternion.
Definition: dual_quaternion.inl:219