master
ブランチ master
VulkanExample / dep / include / glm / gtx / closest_point.hpp
1.3 KB、47行 生 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#elif GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
21# pragma message("GLM: GLM_GTX_closest_point extension included")
22#endif
23
24namespace glm
25{
26 /// @addtogroup gtx_closest_point
27 /// @{
28
29 /// Find the point on a straight line which is the closet of a point.
30 /// @see gtx_closest_point
31 template<typename T, qualifier Q>
32 GLM_FUNC_DECL vec<3, T, Q> closestPointOnLine(
33 vec<3, T, Q> const& point,
34 vec<3, T, Q> const& a,
35 vec<3, T, Q> const& b);
36
37 /// 2d lines work as well
38 template<typename T, qualifier Q>
39 GLM_FUNC_DECL vec<2, T, Q> closestPointOnLine(
40 vec<2, T, Q> const& point,
41 vec<2, T, Q> const& a,
42 vec<2, T, Q> const& b);
43
44 /// @}
45}// namespace glm
46
47#include "closest_point.inl"