master
ブランチ master
ShaderPlayground / deps / glm / glm / gtx / polar_coordinates.hpp
1.3 KB、48行 生 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#endif
21
22#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
23# pragma message("GLM: GLM_GTX_polar_coordinates extension included")
24#endif
25
26namespace glm
27{
28 /// @addtogroup gtx_polar_coordinates
29 /// @{
30
31 /// Convert Euclidean to Polar coordinates, x is the xz distance, y, the latitude and z the longitude.
32 ///
33 /// @see gtx_polar_coordinates
34 template<typename T, qualifier Q>
35 GLM_FUNC_DECL vec<3, T, Q> polar(
36 vec<3, T, Q> const& euclidean);
37
38 /// Convert Polar to Euclidean coordinates.
39 ///
40 /// @see gtx_polar_coordinates
41 template<typename T, qualifier Q>
42 GLM_FUNC_DECL vec<3, T, Q> euclidean(
43 vec<2, T, Q> const& polar);
44
45 /// @}
46}//namespace glm
47
48#include "polar_coordinates.inl"