1.0.0 API documentation
Loading...
Searching...
No Matches
polar_coordinates.hpp
Go to the documentation of this file.
1
12
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
24namespace 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_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.
GLM_FUNC_DECL vec< 3, T, Q > euclidean(vec< 2, T, Q > const &polar)
Convert Polar to Euclidean coordinates.