| 0.9.6

- Main Page
- Modules
- Files

- File List

rotate_vector.hpp
Go to the documentation of this file.
1
43 #pragma once
44
45 // Dependency:
46 #include "../glm.hpp"
47 #include "../gtx/transform.hpp"
48
49 #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
50 # pragma message("GLM: GLM_GTX_rotate_vector extension included")
51 #endif
52
53 namespace glm
54 {
57
65 template <typename T, precision P>
66 GLM_FUNC_DECL tvec3<T, P> slerp(
67 tvec3<T, P> const & x,
68 tvec3<T, P> const & y,
69 T const & a);
70
73 template <typename T, precision P>
74 GLM_FUNC_DECL tvec2<T, P> rotate(
75 tvec2<T, P> const & v,
76 T const & angle);
77
80 template <typename T, precision P>
81 GLM_FUNC_DECL tvec3<T, P> rotate(
82 tvec3<T, P> const & v,
83 T const & angle,
84 tvec3<T, P> const & normal);
85
88 template <typename T, precision P>
89 GLM_FUNC_DECL tvec4<T, P> rotate(
90 tvec4<T, P> const & v,
91 T const & angle,
92 tvec3<T, P> const & normal);
93
96 template <typename T, precision P>
97 GLM_FUNC_DECL tvec3<T, P> rotateX(
98 tvec3<T, P> const & v,
99 T const & angle);
100
103 template <typename T, precision P>
104 GLM_FUNC_DECL tvec3<T, P> rotateY(
105 tvec3<T, P> const & v,
106 T const & angle);
107
110 template <typename T, precision P>
111 GLM_FUNC_DECL tvec3<T, P> rotateZ(
112 tvec3<T, P> const & v,
113 T const & angle);
114
117 template <typename T, precision P>
118 GLM_FUNC_DECL tvec4<T, P> rotateX(
119 tvec4<T, P> const & v,
120 T const & angle);
121
124 template <typename T, precision P>
125 GLM_FUNC_DECL tvec4<T, P> rotateY(
126 tvec4<T, P> const & v,
127 T const & angle);
128
131 template <typename T, precision P>
132 GLM_FUNC_DECL tvec4<T, P> rotateZ(
133 tvec4<T, P> const & v,
134 T const & angle);
135
138 template <typename T, precision P>
139 GLM_FUNC_DECL tmat4x4<T, P> orientation(
140 tvec3<T, P> const & Normal,
141 tvec3<T, P> const & Up);
142
144 }//namespace glm
145
146 #include "rotate_vector.inl"
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.
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::angle
GLM_FUNC_DECL T angle(tquat< T, P > const &x)
Returns the quaternion rotation angle.
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
Definition: _noise.hpp:39
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.