| 1.0.0 API documentation

closest_point.hpp
Go to the documentation of this file.
1
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
24 namespace glm
25 {
28
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
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
45 }// namespace glm
46
47 #include "closest_point.inl"
glm::closestPointOnLine
GLM_FUNC_DECL vec< 2, T, Q > closestPointOnLine(vec< 2, T, Q > const &point, vec< 2, T, Q > const &a, vec< 2, T, Q > const &b)
2d lines work as well