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 /// @brief Find the point on a straight line which is the closet of a point.
10 ///
11 /// <glm/gtx/closest_point.hpp> need to be included to use these functionalities.
12 
13 #pragma once
14 
15 // Dependency:
16 #include "../glm.hpp"
17 
18 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
19 #	pragma message("GLM: GLM_GTX_closest_point extension included")
20 #endif
21 
22 namespace glm
23 {
24 	/// @addtogroup gtx_closest_point
25 	/// @{
26 
27 	/// Find the point on a straight line which is the closet of a point.
28 	/// @see gtx_closest_point
29 	template <typename T, precision P>
30 	GLM_FUNC_DECL tvec3<T, P> closestPointOnLine(
31 		tvec3<T, P> const & point,
32 		tvec3<T, P> const & a,
33 		tvec3<T, P> const & b);
34 
35 	/// 2d lines work as well
36 	template <typename T, precision P>
37 	GLM_FUNC_DECL tvec2<T, P> closestPointOnLine(
38 		tvec2<T, P> const & point,
39 		tvec2<T, P> const & a,
40 		tvec2<T, P> const & b);
41 
42 	/// @}
43 }// namespace glm
44 
45 #include "closest_point.inl"
46