#include <peak_common/types/geometry/peak_common_point.hpp>
Public Member Functions | |
| constexpr | PointXd ()=default |
| Default constructor for PointXd. | |
| constexpr | PointXd (std::array< T, dimension > coordinates) |
| Constructs a PointXd from an array of coordinates. | |
| constexpr T | GetX () const |
| Returns the x-coordinate (first component). | |
| constexpr T | GetY () const |
| Returns the y-coordinate (second component). | |
| template<typename H , size_t d> | |
| constexpr bool | operator== (const PointXd< H, d > &rhs) const |
| Equality operator for comparing integral coordinates. | |
| template<typename H , size_t d> | |
| constexpr bool | operator!= (const PointXd< H, d > &rhs) const |
| Inequality operator for comparing coordinates. | |
| template<typename H , size_t d> | |
| constexpr bool | operator== (const PointXd< H, d > &rhs) const |
| Equality operator for comparing floating-point coordinates. | |
| constexpr std::array< T, dimension > | GetCoordinates () const |
| Returns the coordinates of the point as an array. | |
A point in space with configurable dimensionality and coordinate type.
Represents a mathematical point consisting of at least two coordinates (e.g., x and y). The number of dimensions and the data type of the coordinates are defined by the template parameters.
| T | The coordinate data type. Must be an arithmetic type. |
| dimension | The number of dimensions. Must be 2 or greater. |
Definition at line 41 of file peak_common_point.hpp.
|
constexprdefault |
Default constructor for PointXd.
Initializes the point with default-initialized coordinates.
|
inlineexplicitconstexpr |
Constructs a PointXd from an array of coordinates.
| coordinates | An array containing the coordinates of the point. |
Definition at line 63 of file peak_common_point.hpp.
|
inlineconstexpr |
Returns the coordinates of the point as an array.
Definition at line 170 of file peak_common_point.hpp.
|
inlineconstexpr |
Returns the x-coordinate (first component).
Definition at line 74 of file peak_common_point.hpp.
|
inlineconstexpr |
Returns the y-coordinate (second component).
Definition at line 86 of file peak_common_point.hpp.
|
inlineconstexpr |
Inequality operator for comparing coordinates.
Returns true if any coordinates of this point are not equal to the corresponding coordinates of the other point.
| H | The type of the other point's coordinates. |
| d | The dimensionality of the point. |
Definition at line 126 of file peak_common_point.hpp.
|
inlineconstexpr |
Equality operator for comparing integral coordinates.
Returns true if all coordinates of this point are exactly equal to the corresponding coordinates of the other point. This overload is used for integral coordinate types.
| H | The type of the other point's coordinates. |
| d | The dimensionality of the point. |
Definition at line 109 of file peak_common_point.hpp.
|
inlineconstexpr |
Equality operator for comparing floating-point coordinates.
Returns true if all coordinates of this point are approximately equal to the corresponding coordinates of the other point. Comparison is performed using a tolerance based on units in the last place (ULP), allowing for small floating-point inaccuracies.
| H | The type of the other point's coordinates. |
| d | The dimensionality of the point. |
Definition at line 150 of file peak_common_point.hpp.