39 #ifndef GLM_GTC_quaternion 40 #define GLM_GTC_quaternion GLM_VERSION 44 #include "../gtc/half_float.hpp" 46 #if(defined(GLM_MESSAGES) && !defined(glm_ext)) 47 # pragma message("GLM: GLM_GTC_quaternion extension included") 62 typedef std::size_t size_type;
65 value_type x, y, z, w;
67 GLM_FUNC_DECL size_type length()
const;
78 value_type
const & z);
91 value_type & operator[](
int i);
92 value_type
const & operator[](
int i)
const;
95 tquat<T> & operator*=(value_type
const & s);
96 tquat<T> & operator/=(value_type
const & s);
103 template <
typename T>
108 template <
typename T>
113 template <
typename T>
118 template <
typename T>
123 template <
typename T>
128 template <
typename T>
133 template <
typename T>
136 typename detail::tquat<T>::value_type
const & s);
138 template <
typename T>
140 typename detail::tquat<T>::value_type
const & s,
143 template <
typename T>
146 typename detail::tquat<T>::value_type
const & s);
156 template <
typename T>
163 template <
typename T>
170 template <
typename T>
178 template <
typename T>
187 template <
typename T>
194 template <
typename T>
201 template <
typename T>
204 typename detail::tquat<T>::value_type
const & angle,
210 template <
typename T>
217 template <
typename T>
224 template <
typename T>
231 template <
typename T>
238 template <
typename T>
282 #endif//GLM_GTC_quaternion OpenGL Mathematics (glm.g-truc.net)
detail::tquat< mediump_float > mediump_quat
Quaternion of medium precision floating-point numbers.
Definition: quaternion.hpp:270
detail::tquat< T > conjugate(detail::tquat< T > const &q)
Returns the q conjugate.
Definition: quaternion.inl:460
detail::tquat< highp_float > highp_quat
Quaternion of high precision floating-point numbers.
Definition: quaternion.hpp:275
detail::tmat4x4< T > mat4_cast(detail::tquat< T > const &x)
Converts a quaternion to a 4 * 4 matrix.
Definition: quaternion.inl:535
Definition: type_mat2x2.hpp:45
Definition: _detail.hpp:38
detail::tvec3< T > eulerAngles(detail::tquat< T > const &x)
Returns euler angles, yitch as x, yaw as y, roll as z.
Definition: quaternion.inl:505
detail::tquat< float > quat
Quaternion of floating-point numbers.
Definition: quaternion.hpp:245
detail::tquat< double > dquat
Quaternion of double-precision floating-point numbers.
Definition: quaternion.hpp:260
detail::tquat< float > fquat
Quaternion of single-precision floating-point numbers.
Definition: quaternion.hpp:255
detail::tquat< T > rotate(detail::tquat< T > const &q, typename detail::tquat< T >::value_type const &angle, detail::tvec3< T > const &v)
Rotates a quaternion from an vector of 3 components axis and an angle expressed in degrees...
Definition: quaternion.inl:478
Template for quaternion.
Definition: quaternion.hpp:57
Definition: type_mat2x2.hpp:39
detail::tquat< detail::half > hquat
Quaternion of half-precision floating-point numbers.
Definition: quaternion.hpp:250
Definition: type_mat2x2.hpp:40
detail::tquat< T > quat_cast(detail::tmat4x4< T > const &x)
Converts a 4 * 4 matrix to a quaternion.
Definition: quaternion.inl:607
detail::tquat< T > mix(detail::tquat< T > const &x, detail::tquat< T > const &y, T const &a)
Returns a SLERP interpolated quaternion of x and y according a.
Definition: quaternion.inl:448
Definition: type_mat2x2.hpp:49
detail::tquat< T > inverse(detail::tquat< T > const &q)
Returns the q inverse.
Definition: quaternion.inl:469
detail::tquat< T > normalize(detail::tquat< T > const &q)
Returns the normalized quaternion.
Definition: quaternion.inl:331
detail::tmat3x3< T > mat3_cast(detail::tquat< T > const &x)
Converts a quaternion to a 3 * 3 matrix.
Definition: quaternion.inl:514
detail::tquat< lowp_float > lowp_quat
Quaternion of low precision floating-point numbers.
Definition: quaternion.hpp:265
T dot(detail::tquat< T > const &q1, detail::tquat< T > const &q2)
Returns dot product of q1 and q2, i.e., q1[0] * q2[0] + q1[1] * q2[1] + ...
Definition: quaternion.inl:344