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