Antkeeper  0.0.1
Public Types | Public Member Functions | Public Attributes | List of all members
geom::primitives::hypercapsule< T, N > Struct Template Reference

n-dimensional capsule. More...

#include <hypercapsule.hpp>

Public Types

using vector_type = math::vector< T, N >
 Vector type. More...
 
using segment_type = geom::line_segment< T, N >
 Line segment type. More...
 

Public Member Functions

constexpr bool contains (const vector_type &point) const noexcept
 Tests whether a point is contained within this hypercapsule. More...
 
distance (const vector_type &point) const noexcept
 Calculates the signed distance from the hypercapsule to a point. More...
 

Public Attributes

segment_type segment
 Medial line segment. More...
 
radius
 Radius of the hemi-hyperspheres. More...
 

Detailed Description

template<class T, std::size_t N>
struct geom::primitives::hypercapsule< T, N >

n-dimensional capsule.

Template Parameters
TReal type.
NNumber of dimensions.

Definition at line 36 of file hypercapsule.hpp.

Member Typedef Documentation

◆ segment_type

template<class T , std::size_t N>
using geom::primitives::hypercapsule< T, N >::segment_type = geom::line_segment<T, N>

Line segment type.

Definition at line 42 of file hypercapsule.hpp.

◆ vector_type

template<class T , std::size_t N>
using geom::primitives::hypercapsule< T, N >::vector_type = math::vector<T, N>

Vector type.

Definition at line 39 of file hypercapsule.hpp.

Member Function Documentation

◆ contains()

template<class T , std::size_t N>
constexpr bool geom::primitives::hypercapsule< T, N >::contains ( const vector_type point) const
inlineconstexprnoexcept

Tests whether a point is contained within this hypercapsule.

Parameters
pointPoint to test for containment.
Returns
true if the point is contained within this hypercapsule, false otherwise.

Definition at line 57 of file hypercapsule.hpp.

◆ distance()

template<class T , std::size_t N>
T geom::primitives::hypercapsule< T, N >::distance ( const vector_type point) const
inlinenoexcept

Calculates the signed distance from the hypercapsule to a point.

Parameters
pointInput point.
Returns
Signed distance from the hypercapsule to point.

Definition at line 69 of file hypercapsule.hpp.

Member Data Documentation

◆ radius

template<class T , std::size_t N>
T geom::primitives::hypercapsule< T, N >::radius

Radius of the hemi-hyperspheres.

Definition at line 48 of file hypercapsule.hpp.

◆ segment

template<class T , std::size_t N>
segment_type geom::primitives::hypercapsule< T, N >::segment

Medial line segment.

Definition at line 45 of file hypercapsule.hpp.


The documentation for this struct was generated from the following file: