master
ブランチ master
ShaderPlayground / deps / glm / glm / gtx / closest_point.hpp
1.3 KB、49行 生 Blame 履歴
1/// @ref gtx_closest_point
2/// @file glm/gtx/closest_point.hpp
3///
4/// @see core (dependence)
5///
6/// @defgroup gtx_closest_point GLM_GTX_closest_point
7/// @ingroup gtx
8///
9/// Include <glm/gtx/closest_point.hpp> to use the features of this extension.
10///
11/// Find the point on a straight line which is the closet of a point.
12
13#pragma once
14
15// Dependency:
16#include "../glm.hpp"
17
18#ifndef GLM_ENABLE_EXPERIMENTAL
19# error "GLM: GLM_GTX_closest_point 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_closest_point extension included")
24#endif
25
26namespace glm
27{
28 /// @addtogroup gtx_closest_point
29 /// @{
30
31 /// Find the point on a straight line which is the closet of a point.
32 /// @see gtx_closest_point
33 template<typename T, qualifier Q>
34 GLM_FUNC_DECL vec<3, T, Q> closestPointOnLine(
35 vec<3, T, Q> const& point,
36 vec<3, T, Q> const& a,
37 vec<3, T, Q> const& b);
38
39 /// 2d lines work as well
40 template<typename T, qualifier Q>
41 GLM_FUNC_DECL vec<2, T, Q> closestPointOnLine(
42 vec<2, T, Q> const& point,
43 vec<2, T, Q> const& a,
44 vec<2, T, Q> const& b);
45
46 /// @}
47}// namespace glm
48
49#include "closest_point.inl"