| 0.9.9 API documenation

- Main Page
- Modules
- Files

- File List

rotate_vector.hpp
Go to the documentation of this file.
1
14 #pragma once
15
16 // Dependency:
17 #include "../glm.hpp"
18 #include "../gtx/transform.hpp"
19
20 #ifndef GLM_ENABLE_EXPERIMENTAL
21 # error "GLM: GLM_GTX_rotate_vector is an experimetal extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
22 #endif
23
24 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
25 # pragma message("GLM: GLM_GTX_rotate_vector extension included")
26 #endif
27
28 namespace glm
29 {
32
40 template <typename T, precision P>
41 GLM_FUNC_DECL tvec3<T, P> slerp(
42 tvec3<T, P> const & x,
43 tvec3<T, P> const & y,
44 T const & a);
45
48 template <typename T, precision P>
49 GLM_FUNC_DECL tvec2<T, P> rotate(
50 tvec2<T, P> const & v,
51 T const & angle);
52
55 template <typename T, precision P>
56 GLM_FUNC_DECL tvec3<T, P> rotate(
57 tvec3<T, P> const & v,
58 T const & angle,
59 tvec3<T, P> const & normal);
60
63 template <typename T, precision P>
64 GLM_FUNC_DECL tvec4<T, P> rotate(
65 tvec4<T, P> const & v,
66 T const & angle,
67 tvec3<T, P> const & normal);
68
71 template <typename T, precision P>
72 GLM_FUNC_DECL tvec3<T, P> rotateX(
73 tvec3<T, P> const & v,
74 T const & angle);
75
78 template <typename T, precision P>
79 GLM_FUNC_DECL tvec3<T, P> rotateY(
80 tvec3<T, P> const & v,
81 T const & angle);
82
85 template <typename T, precision P>
86 GLM_FUNC_DECL tvec3<T, P> rotateZ(
87 tvec3<T, P> const & v,
88 T const & angle);
89
92 template <typename T, precision P>
93 GLM_FUNC_DECL tvec4<T, P> rotateX(
94 tvec4<T, P> const & v,
95 T const & angle);
96
99 template <typename T, precision P>
100 GLM_FUNC_DECL tvec4<T, P> rotateY(
101 tvec4<T, P> const & v,
102 T const & angle);
103
106 template <typename T, precision P>
107 GLM_FUNC_DECL tvec4<T, P> rotateZ(
108 tvec4<T, P> const & v,
109 T const & angle);
110
113 template <typename T, precision P>
114 GLM_FUNC_DECL tmat4x4<T, P> orientation(
115 tvec3<T, P> const & Normal,
116 tvec3<T, P> const & Up);
117
119 }//namespace glm
120
121 #include "rotate_vector.inl"
glm::orientation
GLM_FUNC_DECL tmat4x4< T, P > orientation(tvec3< T, P > const &Normal, tvec3< T, P > const &Up)
Build a rotation matrix from a normal and a up vector.
glm::rotate
GLM_FUNC_DECL tvec4< T, P > rotate(tvec4< T, P > const &v, T const &angle, tvec3< T, P > const &normal)
Rotate a four dimensional vector around an axis.
glm::rotateZ
GLM_FUNC_DECL tvec4< T, P > rotateZ(tvec4< T, P > const &v, T const &angle)
Rotate a four dimensional vector around the X axis.
glm::rotateY
GLM_FUNC_DECL tvec4< T, P > rotateY(tvec4< T, P > const &v, T const &angle)
Rotate a four dimensional vector around the X axis.
glm::slerp
GLM_FUNC_DECL tvec3< T, P > slerp(tvec3< T, P > const &x, tvec3< T, P > const &y, T const &a)
Returns Spherical interpolation between two vectors.
glm
Definition: _noise.hpp:11
glm::angle
GLM_FUNC_DECL T angle(tquat< T, P > const &x)
Returns the quaternion rotation angle.
glm::rotateX
GLM_FUNC_DECL tvec4< T, P > rotateX(tvec4< T, P > const &v, T const &angle)
Rotate a four dimentionnals vector around the X axis.