master
ブランチ master
VulkanExample / dep / include / glm / gtx / polar_coordinates.hpp
1.3 KB、46行 生 Blame 履歴
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/// Include <glm/gtx/polar_coordinates.hpp> to use the features of this extension.
10///
11/// Conversion from Euclidean space to polar space and revert.
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{
26 /// @addtogroup gtx_polar_coordinates
27 /// @{
28
29 /// Convert Euclidean to Polar coordinates, x is the latitude, y the longitude and z the xz distance.
30 ///
31 /// @see gtx_polar_coordinates
32 template<typename T, qualifier Q>
33 GLM_FUNC_DECL vec<3, T, Q> polar(
34 vec<3, T, Q> const& euclidean);
35
36 /// Convert Polar to Euclidean coordinates.
37 ///
38 /// @see gtx_polar_coordinates
39 template<typename T, qualifier Q>
40 GLM_FUNC_DECL vec<3, T, Q> euclidean(
41 vec<2, T, Q> const& polar);
42
43 /// @}
44}//namespace glm
45
46#include "polar_coordinates.inl"