GLM 0.9.5

- Main Page
- Related Pages
- Modules
- Namespaces
- Files

- File List

rotate_vector.hpp
Go to the documentation of this file.
1
39 #ifndef GLM_GTX_rotate_vector
40 #define GLM_GTX_rotate_vector
41
42 // Dependency:
43 #include "../glm.hpp"
44 #include "../gtx/transform.hpp"
45
46 #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
47 # pragma message("GLM: GLM_GTX_rotate_vector extension included")
48 #endif
49
50 namespace glm
51 {
54
57 template <typename T, precision P>
58 detail::tvec2<T, P> rotate(
59 detail::tvec2<T, P> const & v,
60 T const & angle);
61
64 template <typename T, precision P>
65 detail::tvec3<T, P> rotate(
66 detail::tvec3<T, P> const & v,
67 T const & angle,
68 detail::tvec3<T, P> const & normal);
69
72 template <typename T, precision P>
73 detail::tvec4<T, P> rotate(
74 detail::tvec4<T, P> const & v,
75 T const & angle,
76 detail::tvec3<T, P> const & normal);
77
80 template <typename T, precision P>
81 detail::tvec3<T, P> rotateX(
82 detail::tvec3<T, P> const & v,
83 T const & angle);
84
87 template <typename T, precision P>
88 detail::tvec3<T, P> rotateY(
89 detail::tvec3<T, P> const & v,
90 T const & angle);
91
94 template <typename T, precision P>
95 detail::tvec3<T, P> rotateZ(
96 detail::tvec3<T, P> const & v,
97 T const & angle);
98
101 template <typename T, precision P>
102 detail::tvec4<T, P> rotateX(
103 detail::tvec4<T, P> const & v,
104 T const & angle);
105
108 template <typename T, precision P>
109 detail::tvec4<T, P> rotateY(
110 detail::tvec4<T, P> const & v,
111 T const & angle);
112
115 template <typename T, precision P>
116 detail::tvec4<T, P> rotateZ(
117 detail::tvec4<T, P> const & v,
118 T const & angle);
119
122 template <typename T, precision P>
123 detail::tmat4x4<T, P> orientation(
124 detail::tvec3<T, P> const & Normal,
125 detail::tvec3<T, P> const & Up);
126
128 }//namespace glm
129
130 #include "rotate_vector.inl"
131
132 #endif//GLM_GTX_rotate_vector
glm::rotateX
detail::tvec3< T, P > rotateX(detail::tvec3< T, P > const &v, T const &angle)
Rotate a three dimensional vector around the X axis.
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)
Builds a rotation 4 * 4 matrix created from an axis vector and an angle.
glm::angle
GLM_FUNC_DECL T angle(detail::tquat< T, P > const &x)
Returns the quaternion rotation angle.
glm::orientation
detail::tmat4x4< T, P > orientation(detail::tvec3< T, P > const &Normal, detail::tvec3< T, P > const &Up)
Build a rotation matrix from a normal and a up vector.
glm::rotateY
detail::tvec3< T, P > rotateY(detail::tvec3< T, P > const &v, T const &angle)
Rotate a three dimensional vector around the Y axis.
glm::rotateZ
detail::tvec3< T, P > rotateZ(detail::tvec3< T, P > const &v, T const &angle)
Rotate a three dimensional vector around the Z axis.