Antkeeper  0.0.1
Namespaces | Functions
closest-point.hpp File Reference
#include <engine/geom/primitives/hypercapsule.hpp>
#include <engine/geom/primitives/hyperplane.hpp>
#include <engine/geom/primitives/hyperrectangle.hpp>
#include <engine/geom/primitives/hypersphere.hpp>
#include <engine/geom/primitives/line-segment.hpp>
#include <engine/geom/primitives/point.hpp>
#include <engine/geom/primitives/ray.hpp>
#include <engine/geom/primitives/triangle.hpp>
#include <engine/geom/coordinates.hpp>
#include <algorithm>
#include <cmath>
#include <tuple>

Go to the source code of this file.

Namespaces

 geom
 Geometric algorithms.
 

Functions

template<class T , std::size_t N>
constexpr point< T, N > geom::closest_point (const ray< T, N > &a, const point< T, N > &b) noexcept
 Calculates the closest point on a ray to a point. More...
 
template<class T , std::size_t N>
constexpr point< T, N > geom::closest_point (const line_segment< T, N > &ab, const point< T, N > &c) noexcept
 Calculates the closest point on a line segment to a point. More...
 
template<class T , std::size_t N>
constexpr std::tuple< point< T, N >, point< T, N > > geom::closest_point (const line_segment< T, N > &ab, const line_segment< T, N > &cd) noexcept
 Calculates the closest points on two line segments. More...
 
template<class T , std::size_t N>
constexpr point< T, N > geom::closest_point (const hyperplane< T, N > &a, const point< T, N > &b) noexcept
 Calculates the closest point on a hyperplane to a point. More...
 
template<class T , std::size_t N>
point< T, N > geom::closest_point (const hypersphere< T, N > &a, const point< T, N > &b)
 Calculates the closest point on or in a hypersphere to a point. More...
 
template<class T , std::size_t N>
point< T, N > geom::closest_point (const hypercapsule< T, N > &a, const point< T, N > &b)
 Calculates the closest point on or in a hypercapsule to a point. More...
 
template<class T , std::size_t N>
constexpr point< T, N > geom::closest_point (const hyperrectangle< T, N > &a, const point< T, N > &b) noexcept
 Calculates the closest point on or in a hyperrectangle to a point. More...
 
template<class T >
constexpr std::tuple< point< T, 3 >, triangle_region > geom::closest_point (const point< T, 3 > &a, const point< T, 3 > &b, const point< T, 3 > &c, const point< T, 3 > &p) noexcept
 Calculates the closest point on a triangle to a point. More...
 
template<class T >
constexpr std::tuple< point< T, 3 >, triangle_region > geom::closest_point (const triangle< T, 3 > &tri, const point< T, 3 > &p) noexcept
 Calculates the closest point on a triangle to a point. More...