7 #include "../detail/type_mat3x3.hpp" 8 #include "../detail/type_mat4x4.hpp" 9 #include "../detail/type_vec3.hpp" 10 #include "../detail/type_vec4.hpp" 11 #include "../ext/vector_relational.hpp" 12 #include "../ext/quaternion_relational.hpp" 13 #include "../gtc/constants.hpp" 14 #include "../gtc/matrix_transform.hpp" 18 template<
typename T, qualifier Q>
23 typedef qua<T, Q> type;
28 # if GLM_SILENT_WARNINGS == GLM_ENABLE 29 # if GLM_COMPILER & GLM_COMPILER_GCC 30 # pragma GCC diagnostic push 31 # pragma GCC diagnostic ignored "-Wpedantic" 32 # elif GLM_COMPILER & GLM_COMPILER_CLANG 33 # pragma clang diagnostic push 34 # pragma clang diagnostic ignored "-Wgnu-anonymous-struct" 35 # pragma clang diagnostic ignored "-Wnested-anon-types" 36 # elif GLM_COMPILER & GLM_COMPILER_VC 37 # pragma warning(push) 38 # pragma warning(disable: 4201) // nonstandard extension used : nameless struct/union 42 # if GLM_LANG & GLM_LANG_CXXMS_FLAG 45 # ifdef GLM_FORCE_QUAT_DATA_WXYZ 46 struct { T w, x, y, z; };
48 struct { T x, y, z, w; };
51 typename detail::storage<4, T, detail::is_aligned<Q>::value>::type data;
54 # ifdef GLM_FORCE_QUAT_DATA_WXYZ 61 # if GLM_SILENT_WARNINGS == GLM_ENABLE 62 # if GLM_COMPILER & GLM_COMPILER_CLANG 63 # pragma clang diagnostic pop 64 # elif GLM_COMPILER & GLM_COMPILER_GCC 65 # pragma GCC diagnostic pop 66 # elif GLM_COMPILER & GLM_COMPILER_VC 73 typedef length_t length_type;
76 GLM_FUNC_DECL
static GLM_CONSTEXPR length_type
length(){
return 4;}
78 GLM_FUNC_DECL GLM_CONSTEXPR T & operator[](length_type i);
79 GLM_FUNC_DECL GLM_CONSTEXPR T
const& operator[](length_type i)
const;
83 GLM_FUNC_DECL GLM_CONSTEXPR
qua() GLM_DEFAULT;
84 GLM_FUNC_DECL GLM_CONSTEXPR
qua(
qua<T, Q> const& q) GLM_DEFAULT;
90 GLM_FUNC_DECL GLM_CONSTEXPR qua(T s,
vec<3, T, Q> const& v);
91 GLM_FUNC_DECL GLM_CONSTEXPR qua(T w, T x, T y, T z);
95 template<
typename U, qualifier P>
96 GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT qua(
qua<U, P> const& q);
99 # if GLM_HAS_EXPLICIT_CONVERSION_OPERATORS 130 GLM_FUNC_DECL GLM_CONSTEXPR
qua<T, Q>& operator*=(U s);
132 GLM_FUNC_DECL GLM_CONSTEXPR
qua<T, Q>& operator/=(U s);
137 template<
typename T, qualifier Q>
140 template<
typename T, qualifier Q>
145 template<
typename T, qualifier Q>
148 template<
typename T, qualifier Q>
151 template<
typename T, qualifier Q>
154 template<
typename T, qualifier Q>
157 template<
typename T, qualifier Q>
160 template<
typename T, qualifier Q>
163 template<
typename T, qualifier Q>
166 template<
typename T, qualifier Q>
169 template<
typename T, qualifier Q>
172 template<
typename T, qualifier Q>
177 template<
typename T, qualifier Q>
178 GLM_FUNC_DECL GLM_CONSTEXPR
bool operator==(
qua<T, Q> const& q1,
qua<T, Q> const& q2);
180 template<
typename T, qualifier Q>
181 GLM_FUNC_DECL GLM_CONSTEXPR
bool operator!=(
qua<T, Q> const& q1,
qua<T, Q> const& q2);
184 #ifndef GLM_EXTERNAL_TEMPLATE 185 #include "type_quat.inl" 186 #endif//GLM_EXTERNAL_TEMPLATE Definition: type_vec3.hpp:17
Definition: qualifier.hpp:37
static GLM_FUNC_DECL GLM_CONSTEXPR length_type length()
Return the count of components of a quaternion.
Definition: type_quat.hpp:76
Core features
Definition: common.hpp:20
Definition: type_mat3x3.hpp:13
Definition: type_vec4.hpp:17
Definition: type_mat4x4.hpp:13
GLM_FUNC_DECL vec< 3, T, Q > eulerAngles(qua< T, Q > const &x)
Returns euler angles, pitch as x, yaw as y, roll as z.
Definition: quaternion.inl:10