1.3 KB、47行 生 Blame 履歴
1/// @ref ext_quaternion_transform
2/// @file glm/ext/quaternion_transform.hpp
3///
4/// @defgroup ext_quaternion_transform GLM_EXT_quaternion_transform
5/// @ingroup ext
6///
7/// Provides transformation functions for quaternion types
8///
9/// Include <glm/ext/quaternion_transform.hpp> to use the features of this extension.
10///
11/// @see ext_quaternion_float
12/// @see ext_quaternion_double
13/// @see ext_quaternion_exponential
14/// @see ext_quaternion_geometric
15/// @see ext_quaternion_relational
16/// @see ext_quaternion_trigonometric
17
18#pragma once
19
20// Dependency:
21#include "../common.hpp"
22#include "../trigonometric.hpp"
23#include "../geometric.hpp"
24
25#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
26# pragma message("GLM: GLM_EXT_quaternion_transform extension included")
27#endif
28
29namespace glm
30{
31 /// @addtogroup ext_quaternion_transform
32 /// @{
33
34 /// Rotates a quaternion from a vector of 3 components axis and an angle.
35 ///
36 /// @param q Source orientation
37 /// @param angle Angle expressed in radians.
38 /// @param axis Axis of the rotation
39 ///
40 /// @tparam T Floating-point scalar types
41 /// @tparam Q Value from qualifier enum
42 template<typename T, qualifier Q>
43 GLM_FUNC_DECL qua<T, Q> rotate(qua<T, Q> const& q, T const& angle, vec<3, T, Q> const& axis);
44 /// @}
45} //namespace glm
46
47#include "quaternion_transform.inl"