sockscape/include/client/glm/ext/quaternion_geometric.hpp

61 lines
1.6 KiB
C++
Raw Permalink Normal View History

2018-08-13 19:16:46 +00:00
/// @ref ext_quaternion_geometric
/// @file glm/ext/quaternion_geometric.hpp
///
/// @see core (dependence)
///
/// @defgroup ext_quaternion_geometric GLM_EXT_quaternion_geometric
/// @ingroup gtx
///
/// Include <glm/ext/quaternion_geometric.hpp> to use the features of this extension.
///
/// Defines a templated quaternion type and several quaternion operations.
#pragma once
// Dependency:
#include "../detail/qualifier.hpp"
#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# pragma message("GLM: GLM_GTC_quaternion extension included")
#endif
namespace glm
{
/// @addtogroup ext_quaternion_geometric
/// @{
/// Returns the norm of a quaternions
///
/// @tparam T Floating-point scalar types.
///
/// @see ext_quaternion_geometric
template<typename T, qualifier Q>
GLM_FUNC_DECL T length(qua<T, Q> const& q);
/// Returns the normalized quaternion.
///
/// @tparam T Floating-point scalar types.
///
/// @see ext_quaternion_geometric
template<typename T, qualifier Q>
GLM_FUNC_DECL qua<T, Q> normalize(qua<T, Q> const& q);
/// Returns dot product of q1 and q2, i.e., q1[0] * q2[0] + q1[1] * q2[1] + ...
///
/// @tparam T Floating-point scalar types.
///
/// @see ext_quaternion_geometric
template<typename T, qualifier Q>
GLM_FUNC_DECL T dot(qua<T, Q> const& x, qua<T, Q> const& y);
/// Compute a cross product between a quaternion and a vector.
///
/// @see ext_quaternion_geometric
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER qua<T, Q> cross(qua<T, Q> const& q1, qua<T, Q> const& q2);
/// @}
} //namespace glm
#include "quaternion_geometric.inl"