dual_quaternion.hpp
Go to the documentation of this file.
1 
41 #pragma once
42 
43 // Dependency:
44 #include "../glm.hpp"
45 #include "../gtc/constants.hpp"
46 #include "../gtc/quaternion.hpp"
47 
48 #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
49 # pragma message("GLM: GLM_GTX_dual_quaternion extension included")
50 #endif
51 
52 namespace glm{
53 namespace detail
54 {
55  template <typename T, precision P>
56  struct tdualquat
57  {
58  enum ctor{null};
59  typedef T value_type;
61 
62  public:
64 
66 
67  // Constructors
69  GLM_FUNC_DECL explicit tdualquat(tquat<T, P> const & real);
71  GLM_FUNC_DECL tdualquat(tquat<T, P> const & orientation,tvec3<T, P> const& translation);
72 
74  // tdualquat conversions
75  GLM_FUNC_DECL explicit tdualquat(tmat2x4<T, P> const & holder_mat);
76  GLM_FUNC_DECL explicit tdualquat(tmat3x4<T, P> const & aug_mat);
77 
78  // Accesses
80  GLM_FUNC_DECL part_type const & operator[](int i) const;
81 
82  // Operators
85  };
86 
87  template <typename T, precision P>
89  detail::tquat<T, P> const & q);
90 
91  template <typename T, precision P>
93  detail::tdualquat<T, P> const & q,
94  detail::tdualquat<T, P> const & p);
95 
96  template <typename T, precision P>
98  detail::tdualquat<T, P> const & q,
99  detail::tdualquat<T, P> const & p);
100 
101  template <typename T, precision P>
103  detail::tquat<T, P> const & q,
104  detail::tvec3<T, P> const & v);
105 
106  template <typename T, precision P>
108  detail::tvec3<T, P> const & v,
109  detail::tquat<T, P> const & q);
110 
111  template <typename T, precision P>
113  detail::tquat<T, P> const & q,
114  detail::tvec4<T, P> const & v);
115 
116  template <typename T, precision P>
118  detail::tvec4<T, P> const & v,
119  detail::tquat<T, P> const & q);
120 
121  template <typename T, precision P>
123  detail::tdualquat<T, P> const & q,
124  T const & s);
125 
126  template <typename T, precision P>
128  T const & s,
129  detail::tdualquat<T, P> const & q);
130 
131  template <typename T, precision P>
133  detail::tdualquat<T, P> const & q,
134  T const & s);
135 } //namespace detail
136 
139 
143  template <typename T, precision P>
145  detail::tdualquat<T, P> const & q);
146 
150  template <typename T, precision P>
152  detail::tdualquat<T, P> const & x,
153  detail::tdualquat<T, P> const & y,
154  T const & a);
155 
159  template <typename T, precision P>
161  detail::tdualquat<T, P> const & q);
162 
163  /*
168  template <typename T, precision P>
169  detail::tmat3x3<T, P> mat3_cast(
170  detail::tdualquat<T, P> const & x);
171  */
172 
176  template <typename T, precision P>
178  detail::tdualquat<T, P> const & x);
179 
183  template <typename T, precision P>
185  detail::tdualquat<T, P> const & x);
186 
190  template <typename T, precision P>
192  detail::tmat2x4<T, P> const & x);
193 
197  template <typename T, precision P>
199  detail::tmat3x4<T, P> const & x);
200 
201 
206 
211 
216 
217 
222 
227 
232 
233 
238 
243 
248 
249 
250 #if(!defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))
251  typedef highp_fdualquat dualquat;
255 
260 #elif(defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))
261  typedef highp_fdualquat dualquat;
262  typedef highp_fdualquat fdualquat;
263 #elif(!defined(GLM_PRECISION_HIGHP_FLOAT) && defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))
264  typedef mediump_fdualquat dualquat;
266 #elif(!defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && defined(GLM_PRECISION_LOWP_FLOAT))
267  typedef lowp_fdualquat dualquat;
268  typedef lowp_fdualquat fdualquat;
269 #else
270 # error "GLM error: multiple default precision requested for single-precision floating-point types"
271 #endif
272 
273 
274 #if(!defined(GLM_PRECISION_HIGHP_DOUBLE) && !defined(GLM_PRECISION_MEDIUMP_DOUBLE) && !defined(GLM_PRECISION_LOWP_DOUBLE))
275  typedef highp_ddualquat ddualquat;
279 #elif(defined(GLM_PRECISION_HIGHP_DOUBLE) && !defined(GLM_PRECISION_MEDIUMP_DOUBLE) && !defined(GLM_PRECISION_LOWP_DOUBLE))
280  typedef highp_ddualquat ddualquat;
281 #elif(!defined(GLM_PRECISION_HIGHP_DOUBLE) && defined(GLM_PRECISION_MEDIUMP_DOUBLE) && !defined(GLM_PRECISION_LOWP_DOUBLE))
283 #elif(!defined(GLM_PRECISION_HIGHP_DOUBLE) && !defined(GLM_PRECISION_MEDIUMP_DOUBLE) && defined(GLM_PRECISION_LOWP_DOUBLE))
284  typedef lowp_ddualquat ddualquat;
285 #else
286 # error "GLM error: Multiple default precision requested for double-precision floating-point types"
287 #endif
288 
290 } //namespace glm
291 
292 #include "dual_quaternion.inl"
glm::ddualquat
highp_ddualquat ddualquat
Definition: dual_quaternion.hpp:278
glm::dualquat_cast
GLM_FUNC_DECL detail::tdualquat< T, P > dualquat_cast(detail::tmat2x4< T, P > const &x)
glm::detail::tdualquat::part_type
glm::detail::tquat< T, P > part_type
Definition: dual_quaternion.hpp:60
glm::detail::tdualquat
Definition: dual_quaternion.hpp:56
glm::highp_dualquat
detail::tdualquat< float, highp > highp_dualquat
Definition: dual_quaternion.hpp:215
glm::mediump_dualquat
detail::tdualquat< float, mediump > mediump_dualquat
Definition: dual_quaternion.hpp:210
glm::detail::tdualquat::real
glm::detail::tquat< T, P > real
Definition: dual_quaternion.hpp:63
detail
glm::normalize
GLM_FUNC_DECL genType normalize(genType const &x)
glm::detail::tdualquat::value_type
T value_type
Definition: dual_quaternion.hpp:59
glm::detail::tquat
Definition: fwd.hpp:41
glm::detail::tvec3
Definition: type_mat.hpp:37
glm::detail::tmat3x4
Definition: type_mat.hpp:44
glm::detail::tmat2x4
Definition: type_mat.hpp:41
glm::detail::tdualquat::operator*=
GLM_FUNC_DECL tdualquat< T, P > & operator*=(T const &s)
glm::mat2x4_cast
GLM_FUNC_DECL detail::tmat2x4< T, P > mat2x4_cast(detail::tdualquat< T, P > const &x)
glm::highp_ddualquat
detail::tdualquat< double, highp > highp_ddualquat
Definition: dual_quaternion.hpp:247
glm::lowp_fdualquat
detail::tdualquat< float, lowp > lowp_fdualquat
Definition: dual_quaternion.hpp:221
glm::detail::tdualquat::operator[]
GLM_FUNC_DECL part_type & operator[](int i)
glm::mat3x4_cast
GLM_FUNC_DECL detail::tmat3x4< T, P > mat3x4_cast(detail::tdualquat< T, P > const &x)
glm::detail::operator+
GLM_FUNC_DECL tmat2x2< T, P > operator+(tmat2x2< T, P > const &m, T const &s)
glm::detail::operator/
GLM_FUNC_DECL tmat2x2< T, P > operator/(tmat2x2< T, P > const &m, T const &s)
glm::mediump_fdualquat
detail::tdualquat< float, mediump > mediump_fdualquat
Definition: dual_quaternion.hpp:226
glm::fdualquat
highp_fdualquat fdualquat
Definition: dual_quaternion.hpp:259
glm::detail::operator*
GLM_FUNC_DECL tmat2x2< T, P > operator*(tmat2x2< T, P > const &m, T const &s)
glm::lerp
GLM_FUNC_DECL detail::tquat< T, P > lerp(detail::tquat< T, P > const &x, detail::tquat< T, P > const &y, T const &a)
glm::mediump_ddualquat
detail::tdualquat< double, mediump > mediump_ddualquat
Definition: dual_quaternion.hpp:242
glm::detail::tvec4
Definition: type_mat.hpp:38
glm
Definition: _literals.hpp:31
glm::orientation
GLM_FUNC_DECL detail::tmat4x4< T, P > orientation(detail::tvec3< T, P > const &Normal, detail::tvec3< T, P > const &Up)
Eigen::Triplet
glm::detail::operator-
GLM_FUNC_DECL tmat2x2< T, P > operator-(tmat2x2< T, P > const &m, T const &s)
glm::lowp_dualquat
detail::tdualquat< float, lowp > lowp_dualquat
Definition: dual_quaternion.hpp:205
glm::length_t
int length_t
Definition: setup.hpp:755
glm::detail::tdualquat::length
GLM_FUNC_DECL GLM_CONSTEXPR length_t length() const
glm::detail::tdualquat::ctor
ctor
Definition: dual_quaternion.hpp:58
glm::detail::tdualquat::operator/=
GLM_FUNC_DECL tdualquat< T, P > & operator/=(T const &s)
glm::detail::tdualquat::dual
glm::detail::tquat< T, P > dual
Definition: dual_quaternion.hpp:63
GLM_FUNC_DECL
#define GLM_FUNC_DECL
Definition: setup.hpp:728
glm::lowp_ddualquat
detail::tdualquat< double, lowp > lowp_ddualquat
Definition: dual_quaternion.hpp:237
glm::inverse
GLM_FUNC_DECL matType< T, P > inverse(matType< T, P > const &m)
real
glm::dualquat
highp_fdualquat dualquat
Definition: dual_quaternion.hpp:254
glm::detail::tdualquat::tdualquat
GLM_FUNC_DECL tdualquat()
glm::highp_fdualquat
detail::tdualquat< float, highp > highp_fdualquat
Definition: dual_quaternion.hpp:231
GLM_CONSTEXPR
#define GLM_CONSTEXPR
Definition: setup.hpp:801


rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jul 25 2024 02:50:09