17 #include "../gtx/transform.hpp"
18 #include "../gtc/epsilon.hpp"
19 #include "../ext/vector_relational.hpp"
22 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
23 # ifndef GLM_ENABLE_EXPERIMENTAL
24 # pragma message("GLM: GLM_GTX_rotate_vector 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.")
26 # pragma message("GLM: GLM_GTX_rotate_vector extension included")
42 template<
typename T, qualifier Q>
43 GLM_FUNC_DECL vec<3, T, Q>
slerp(
44 vec<3, T, Q>
const& x,
45 vec<3, T, Q>
const& y,
50 template<
typename T, qualifier Q>
51 GLM_FUNC_DECL vec<2, T, Q>
rotate(
52 vec<2, T, Q>
const& v,
57 template<
typename T, qualifier Q>
58 GLM_FUNC_DECL vec<3, T, Q>
rotate(
59 vec<3, T, Q>
const& v,
61 vec<3, T, Q>
const& normal);
65 template<
typename T, qualifier Q>
66 GLM_FUNC_DECL vec<4, T, Q>
rotate(
67 vec<4, T, Q>
const& v,
69 vec<3, T, Q>
const& normal);
73 template<
typename T, qualifier Q>
74 GLM_FUNC_DECL vec<3, T, Q>
rotateX(
75 vec<3, T, Q>
const& v,
80 template<
typename T, qualifier Q>
81 GLM_FUNC_DECL vec<3, T, Q>
rotateY(
82 vec<3, T, Q>
const& v,
87 template<
typename T, qualifier Q>
88 GLM_FUNC_DECL vec<3, T, Q>
rotateZ(
89 vec<3, T, Q>
const& v,
94 template<
typename T, qualifier Q>
95 GLM_FUNC_DECL vec<4, T, Q>
rotateX(
96 vec<4, T, Q>
const& v,
101 template<
typename T, qualifier Q>
102 GLM_FUNC_DECL vec<4, T, Q>
rotateY(
103 vec<4, T, Q>
const& v,
108 template<
typename T, qualifier Q>
109 GLM_FUNC_DECL vec<4, T, Q>
rotateZ(
110 vec<4, T, Q>
const& v,
115 template<
typename T, qualifier Q>
117 vec<3, T, Q>
const& Normal,
118 vec<3, T, Q>
const& Up);
123 #include "rotate_vector.inl"
GLM_FUNC_DECL T angle(qua< T, Q > const &x)
Returns the quaternion rotation angle.
GLM_FUNC_DECL vec< 4, T, Q > rotateZ(vec< 4, T, Q > const &v, T const &angle)
Rotate a four dimensional vector around the Z axis.
GLM_FUNC_DECL vec< 4, T, Q > rotateY(vec< 4, T, Q > const &v, T const &angle)
Rotate a four dimensional vector around the Y axis.
GLM_FUNC_DECL vec< 4, T, Q > rotateX(vec< 4, T, Q > const &v, T const &angle)
Rotate a four dimensional vector around the X axis.
GLM_FUNC_DECL vec< 3, T, Q > slerp(vec< 3, T, Q > const &x, vec< 3, T, Q > const &y, T const &a)
Returns Spherical interpolation between two vectors.
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.
GLM_FUNC_DECL vec< 4, T, Q > rotate(vec< 4, T, Q > const &v, T const &angle, vec< 3, T, Q > const &normal)
Rotate a four dimensional vector around an axis.