gtx/quaternion.hpp
Go to the documentation of this file.
1 
39 #pragma once
40 
41 // Dependency:
42 #include "../glm.hpp"
43 #include "../gtc/constants.hpp"
44 #include "../gtc/quaternion.hpp"
45 #include "../gtx/norm.hpp"
46 
47 #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
48 # pragma message("GLM: GLM_GTX_quaternion extension included")
49 #endif
50 
51 namespace glm
52 {
55 
59  template<typename T, precision P>
60  GLM_FUNC_DECL detail::tvec3<T, P> cross(
61  detail::tquat<T, P> const & q,
62  detail::tvec3<T, P> const & v);
63 
67  template<typename T, precision P>
68  GLM_FUNC_DECL detail::tvec3<T, P> cross(
69  detail::tvec3<T, P> const & v,
70  detail::tquat<T, P> const & q);
71 
76  template<typename T, precision P>
77  GLM_FUNC_DECL detail::tquat<T, P> squad(
78  detail::tquat<T, P> const & q1,
79  detail::tquat<T, P> const & q2,
80  detail::tquat<T, P> const & s1,
81  detail::tquat<T, P> const & s2,
82  T const & h);
83 
87  template<typename T, precision P>
88  GLM_FUNC_DECL detail::tquat<T, P> intermediate(
89  detail::tquat<T, P> const & prev,
90  detail::tquat<T, P> const & curr,
91  detail::tquat<T, P> const & next);
92 
96  template<typename T, precision P>
97  GLM_FUNC_DECL detail::tquat<T, P> exp(
98  detail::tquat<T, P> const & q);
99 
103  template<typename T, precision P>
104  GLM_FUNC_DECL detail::tquat<T, P> log(
105  detail::tquat<T, P> const & q);
106 
110  template<typename T, precision P>
111  GLM_FUNC_DECL detail::tquat<T, P> pow(
112  detail::tquat<T, P> const & x,
113  T const & y);
114 
118  //template<typename T, precision P>
119  //detail::tquat<T, P> sqrt(
120  // detail::tquat<T, P> const & q);
121 
125  template<typename T, precision P>
126  GLM_FUNC_DECL detail::tvec3<T, P> rotate(
127  detail::tquat<T, P> const & q,
128  detail::tvec3<T, P> const & v);
129 
133  template<typename T, precision P>
134  GLM_FUNC_DECL detail::tvec4<T, P> rotate(
135  detail::tquat<T, P> const & q,
136  detail::tvec4<T, P> const & v);
137 
141  template<typename T, precision P>
143  detail::tquat<T, P> const & q);
144 
148  template<typename T, precision P>
150  detail::tquat<T, P> const & x){return mat3_cast(x);}
151 
155  template<typename T, precision P>
157  detail::tquat<T, P> const & x){return mat4_cast(x);}
158 
162  template<typename T, precision P>
164  detail::tmat3x3<T, P> const & x){return quat_cast(x);}
165 
169  template<typename T, precision P>
171  detail::tmat4x4<T, P> const & x){return quat_cast(x);}
172 
176  template<typename T, precision P>
177  GLM_FUNC_DECL detail::tquat<T, P> shortMix(
178  detail::tquat<T, P> const & x,
179  detail::tquat<T, P> const & y,
180  T const & a);
181 
185  template<typename T, precision P>
186  GLM_FUNC_DECL detail::tquat<T, P> fastMix(
187  detail::tquat<T, P> const & x,
188  detail::tquat<T, P> const & y,
189  T const & a);
190 
196  template<typename T, precision P>
197  GLM_FUNC_DECL detail::tquat<T, P> rotation(
198  detail::tvec3<T, P> const & orig,
199  detail::tvec3<T, P> const & dest);
200 
204  template<typename T, precision P>
205  GLM_FUNC_DECL T length2(detail::tquat<T, P> const & q);
206 
208 }//namespace glm
209 
210 #include "quaternion.inl"
glm::toQuat
GLM_FUNC_DECL detail::tquat< T, P > toQuat(detail::tmat3x3< T, P > const &x)
Definition: gtx/quaternion.hpp:163
glm::toMat4
GLM_FUNC_DECL detail::tmat4x4< T, P > toMat4(detail::tquat< T, P > const &x)
Definition: gtx/quaternion.hpp:156
glm::squad
GLM_FUNC_DECL 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)
glm::detail::tmat3x3
Definition: type_mat.hpp:43
glm::rotate
GLM_FUNC_DECL detail::tmat4x4< T, P > rotate(detail::tmat4x4< T, P > const &m, T const &angle, detail::tvec3< T, P > const &axis)
glm::extractRealComponent
GLM_FUNC_DECL T extractRealComponent(detail::tquat< T, P > const &q)
glm::length2
GLM_FUNC_DECL T length2(T const &x)
glm::quat_cast
GLM_FUNC_DECL detail::tquat< T, P > quat_cast(detail::tmat3x3< T, P > const &x)
glm::detail::tquat
Definition: fwd.hpp:41
glm::detail::tmat4x4
Definition: type_mat.hpp:47
glm::fastMix
GLM_FUNC_DECL detail::tquat< T, P > fastMix(detail::tquat< T, P > const &x, detail::tquat< T, P > const &y, T const &a)
glm::pow
GLM_FUNC_DECL genType pow(genType const &base, genType const &exponent)
glm::mat4_cast
GLM_FUNC_DECL detail::tmat4x4< T, P > mat4_cast(detail::tquat< T, P > const &x)
glm
Definition: _literals.hpp:31
glm::shortMix
GLM_FUNC_DECL detail::tquat< T, P > shortMix(detail::tquat< T, P > const &x, detail::tquat< T, P > const &y, T const &a)
x
x
Eigen::Triplet
glm::cross
GLM_FUNC_DECL detail::tvec3< T, P > cross(detail::tvec3< T, P > const &x, detail::tvec3< T, P > const &y)
glm::toMat3
GLM_FUNC_DECL detail::tmat3x3< T, P > toMat3(detail::tquat< T, P > const &x)
Definition: gtx/quaternion.hpp:149
glm::intermediate
GLM_FUNC_DECL detail::tquat< T, P > intermediate(detail::tquat< T, P > const &prev, detail::tquat< T, P > const &curr, detail::tquat< T, P > const &next)
glm::log
GLM_FUNC_DECL genType log(genType const &x)
glm::rotation
GLM_FUNC_DECL detail::tquat< T, P > rotation(detail::tvec3< T, P > const &orig, detail::tvec3< T, P > const &dest)
glm::mat3_cast
GLM_FUNC_DECL detail::tmat3x3< T, P > mat3_cast(detail::tquat< T, P > const &x)
dest
const char char * dest
Definition: lz4hc.h:181
GLM_FUNC_DECL
#define GLM_FUNC_DECL
Definition: setup.hpp:728
glm::exp
GLM_FUNC_DECL genType exp(genType const &x)


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