20 #ifndef ANTKEEPER_GEOM_PRIMITIVES_HYPERCAPSULE_HPP
21 #define ANTKEEPER_GEOM_PRIMITIVES_HYPERCAPSULE_HPP
27 namespace primitives {
35 template <
class T, std::
size_t N>
78 using namespace primitives;
vector< T, N > sqrt(const vector< T, N > &x)
Takes the square root of each element.
segment_type segment
Medial line segment.
constexpr bool contains(const vector_type &point) const noexcept
Tests whether a point is contained within this hypercapsule.
T radius
Radius of the hemi-hyperspheres.
T distance(const vector_type &point) const noexcept
Calculates the signed distance from the hypercapsule to a point.
n-dimensional line segment.
T sqr_distance(const vector_type &point) const noexcept
Calculates the square distance from the line segment to a point.