Spatial representation of a point based on dimensioned_array.
More...
|
| template<typename TYPE, Dimension DIMENSION> |
| using | point |
| | The point type defines an interface for storing and manipulating coordinate data.
|
|
| template<template< typename... > class CONTAINER, typename TYPE, Dimension DIMENSION> |
| constexpr auto | centroid (CONTAINER< point< TYPE, DIMENSION > > const &points) |
| | Return the centroid of the given set of points points.
|
| template<typename TYPE, Dimension DIMENSION> |
| constexpr auto | centroid (std::initializer_list< point< TYPE, DIMENSION > > points) |
| | Return the centroid of the given set of points points.
|
| template<typename TYPE, Dimension DIMENSION> |
| constexpr TYPE | distance (point< TYPE, DIMENSION > const &a, point< TYPE, DIMENSION > const &b) |
| | Return the distance between the given points a and b.
|
| template<typename TYPE, Dimension DIMENSION> |
| constexpr point< TYPE, DIMENSION > | midpoint (point< TYPE, DIMENSION > const &a, point< TYPE, DIMENSION > const &b) |
| | Return the midpoint between two points a and b.
|
Spatial representation of a point based on dimensioned_array.
◆ point
The point type defines an interface for storing and manipulating coordinate data.
The point type is implemented using dimensioned_array. Supports +, -, and *.
- Template Parameters
-
| TYPE | The type to use to represent coordinate values. |
| DIMENSION | The dimension of the point. |
◆ distance()
| TYPE distance |
( |
point< TYPE, DIMENSION > const & | a, |
|
|
point< TYPE, DIMENSION > const & | b ) |
|
constexpr |
Return the distance between the given points a and b.
- Template Parameters
-
| TYPE | The type to use to represent coordinate values. |
| DIMENSION | The dimension of the point. |
◆ midpoint()
| point< TYPE, DIMENSION > midpoint |
( |
point< TYPE, DIMENSION > const & | a, |
|
|
point< TYPE, DIMENSION > const & | b ) |
|
constexpr |
Return the midpoint between two points a and b.
- Template Parameters
-
| TYPE | The type to use to represent coordinate values. |
| DIMENSION | The dimension of the point. |
◆ centroid() [1/2]
template<template< typename... > class CONTAINER, typename TYPE,
Dimension DIMENSION>
| auto centroid |
( |
CONTAINER< point< TYPE, DIMENSION > > const & | points | ) |
|
|
constexpr |
Return the centroid of the given set of points points.
- Template Parameters
-
| TYPE | The type to use to represent coordinate values. |
| DIMENSION | The dimension of the point. |
◆ centroid() [2/2]
| auto centroid |
( |
std::initializer_list< point< TYPE, DIMENSION > > | points | ) |
|
|
constexpr |
Return the centroid of the given set of points points.
- Template Parameters
-
| TYPE | The type to use to represent coordinate values. |
| DIMENSION | The dimension of the point. |