From e62817b8252974b8a98393275874ee303840bf13 Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Fri, 12 May 2017 18:49:50 +0500 Subject: 2017-05-12 --- depedencies/include/glm/gtx/vector_angle.hpp | 60 ++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 depedencies/include/glm/gtx/vector_angle.hpp (limited to 'depedencies/include/glm/gtx/vector_angle.hpp') diff --git a/depedencies/include/glm/gtx/vector_angle.hpp b/depedencies/include/glm/gtx/vector_angle.hpp new file mode 100644 index 0000000..d52d3f8 --- /dev/null +++ b/depedencies/include/glm/gtx/vector_angle.hpp @@ -0,0 +1,60 @@ +/// @ref gtx_vector_angle +/// @file glm/gtx/vector_angle.hpp +/// +/// @see core (dependence) +/// @see gtx_quaternion (dependence) +/// @see gtx_epsilon (dependence) +/// +/// @defgroup gtx_vector_angle GLM_GTX_vector_angle +/// @ingroup gtx +/// +/// @brief Compute angle between vectors +/// +/// need to be included to use these functionalities. + +#pragma once + +// Dependency: +#include "../glm.hpp" +#include "../gtc/epsilon.hpp" +#include "../gtx/quaternion.hpp" +#include "../gtx/rotate_vector.hpp" + +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) +# pragma message("GLM: GLM_GTX_vector_angle extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_vector_angle + /// @{ + + //! Returns the absolute angle between two vectors. + //! Parameters need to be normalized. + /// @see gtx_vector_angle extension. + template + GLM_FUNC_DECL typename vecType::value_type angle( + vecType const & x, + vecType const & y); + + //! Returns the oriented angle between two 2d vectors. + //! Parameters need to be normalized. + /// @see gtx_vector_angle extension. + template + GLM_FUNC_DECL T orientedAngle( + tvec2 const & x, + tvec2 const & y); + + //! Returns the oriented angle between two 3d vectors based from a reference axis. + //! Parameters need to be normalized. + /// @see gtx_vector_angle extension. + template + GLM_FUNC_DECL T orientedAngle( + tvec3 const & x, + tvec3 const & y, + tvec3 const & ref); + + /// @} +}// namespace glm + +#include "vector_angle.inl" -- cgit v1.2.3