1.0.0 API documentation
polar_coordinates.hpp
Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependency:
16 #include "../glm.hpp"
17 
18 #ifndef GLM_ENABLE_EXPERIMENTAL
19 # error "GLM: GLM_GTX_polar_coordinates is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
20 #elif GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
21 # pragma message("GLM: GLM_GTX_polar_coordinates extension included")
22 #endif
23 
24 namespace glm
25 {
28 
32  template<typename T, qualifier Q>
33  GLM_FUNC_DECL vec<3, T, Q> polar(
34  vec<3, T, Q> const& euclidean);
35 
39  template<typename T, qualifier Q>
40  GLM_FUNC_DECL vec<3, T, Q> euclidean(
41  vec<2, T, Q> const& polar);
42 
44 }//namespace glm
45 
46 #include "polar_coordinates.inl"
glm::euclidean
GLM_FUNC_DECL vec< 3, T, Q > euclidean(vec< 2, T, Q > const &polar)
Convert Polar to Euclidean coordinates.
glm::polar
GLM_FUNC_DECL vec< 3, T, Q > polar(vec< 3, T, Q > const &euclidean)
Convert Euclidean to Polar coordinates, x is the latitude, y the longitude and z the xz distance.