polar_coordinates.hpp
Go to the documentation of this file.
#pragma once
// Dependency:
#include "../glm.hpp"
#ifndef GLM_ENABLE_EXPERIMENTAL
# 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."
#elif GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# pragma message("GLM: GLM_GTX_polar_coordinates extension included")
#endif
namespace glm
{
template<typename T, qualifier Q>
GLM_FUNC_DECL vec<3, T, Q> polar(
vec<3, T, Q> const& euclidean);
template<typename T, qualifier Q>
GLM_FUNC_DECL vec<3, T, Q> euclidean(
vec<2, T, Q> const& polar);
}//namespace glm
#include "polar_coordinates.inl"
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.
glm::euclidean
GLM_FUNC_DECL vec< 3, T, Q > euclidean(vec< 2, T, Q > const &polar)
Convert Polar to Euclidean coordinates.