• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /// @ref gtx_polar_coordinates
2 /// @file glm/gtx/polar_coordinates.hpp
3 ///
4 /// @see core (dependence)
5 ///
6 /// @defgroup gtx_polar_coordinates GLM_GTX_polar_coordinates
7 /// @ingroup gtx
8 ///
9 /// @brief Conversion from Euclidean space to polar space and revert.
10 ///
11 /// <glm/gtx/polar_coordinates.hpp> need to be included to use these functionalities.
12 
13 #pragma once
14 
15 // Dependency:
16 #include "../glm.hpp"
17 
18 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
19 #	pragma message("GLM: GLM_GTX_polar_coordinates extension included")
20 #endif
21 
22 namespace glm
23 {
24 	/// @addtogroup gtx_polar_coordinates
25 	/// @{
26 
27 	/// Convert Euclidean to Polar coordinates, x is the xz distance, y, the latitude and z the longitude.
28 	///
29 	/// @see gtx_polar_coordinates
30 	template <typename T, precision P>
31 	GLM_FUNC_DECL tvec3<T, P> polar(
32 		tvec3<T, P> const & euclidean);
33 
34 	/// Convert Polar to Euclidean coordinates.
35 	///
36 	/// @see gtx_polar_coordinates
37 	template <typename T, precision P>
38 	GLM_FUNC_DECL tvec3<T, P> euclidean(
39 		tvec2<T, P> const & polar);
40 
41 	/// @}
42 }//namespace glm
43 
44 #include "polar_coordinates.inl"
45