18 #include "../gtx/transform.hpp"
20 #ifndef GLM_ENABLE_EXPERIMENTAL
21 # error "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."
24 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
25 # pragma message("GLM: GLM_GTX_rotate_vector extension included")
40 template<
typename T, qualifier P>
41 GLM_FUNC_DECL vec<3, T, P>
slerp(
42 vec<3, T, P>
const & x,
43 vec<3, T, P>
const & y,
48 template<
typename T, qualifier P>
49 GLM_FUNC_DECL vec<2, T, P>
rotate(
50 vec<2, T, P>
const & v,
55 template<
typename T, qualifier P>
56 GLM_FUNC_DECL vec<3, T, P>
rotate(
57 vec<3, T, P>
const & v,
59 vec<3, T, P>
const & normal);
63 template<
typename T, qualifier P>
64 GLM_FUNC_DECL vec<4, T, P>
rotate(
65 vec<4, T, P>
const & v,
67 vec<3, T, P>
const & normal);
71 template<
typename T, qualifier P>
72 GLM_FUNC_DECL vec<3, T, P>
rotateX(
73 vec<3, T, P>
const & v,
78 template<
typename T, qualifier P>
79 GLM_FUNC_DECL vec<3, T, P>
rotateY(
80 vec<3, T, P>
const & v,
85 template<
typename T, qualifier P>
86 GLM_FUNC_DECL vec<3, T, P>
rotateZ(
87 vec<3, T, P>
const & v,
92 template<
typename T, qualifier P>
93 GLM_FUNC_DECL vec<4, T, P>
rotateX(
94 vec<4, T, P>
const & v,
99 template<
typename T, qualifier P>
100 GLM_FUNC_DECL vec<4, T, P>
rotateY(
101 vec<4, T, P>
const & v,
106 template<
typename T, qualifier P>
107 GLM_FUNC_DECL vec<4, T, P>
rotateZ(
108 vec<4, T, P>
const & v,
113 template<
typename T, qualifier P>
115 vec<3, T, P>
const & Normal,
116 vec<3, T, P>
const & Up);
121 #include "rotate_vector.inl"
GLM_FUNC_DECL mat< 4, 4, T, P > orientation(vec< 3, T, P > const &Normal, vec< 3, T, P > const &Up)
Build a rotation matrix from a normal and a up vector.
GLM_FUNC_DECL vec< 4, T, P > rotateY(vec< 4, T, P > const &v, T const &angle)
Rotate a four dimensional vector around the Y axis.
GLM_FUNC_DECL T angle(tquat< T, P > const &x)
Returns the quaternion rotation angle.
GLM_FUNC_DECL vec< 4, T, P > rotateX(vec< 4, T, P > const &v, T const &angle)
Rotate a four dimensional vector around the X axis.
GLM_FUNC_DECL vec< 4, T, P > rotate(vec< 4, T, P > const &v, T const &angle, vec< 3, T, P > const &normal)
Rotate a four dimensional vector around an axis.
GLM_FUNC_DECL vec< 3, T, P > slerp(vec< 3, T, P > const &x, vec< 3, T, P > const &y, T const &a)
Returns Spherical interpolation between two vectors.
GLM_FUNC_DECL vec< 4, T, P > rotateZ(vec< 4, T, P > const &v, T const &angle)
Rotate a four dimensional vector around the Z axis.