#include <peak_common/types/geometry/peak_common_point.hpp>

Public Member Functions | |
| constexpr | PointT ()=default |
| Default constructor for PointT (2D point). | |
| constexpr | PointT (T x, T y) |
| Point constructor from x and y coordinates. | |
| std::string | ToString () const |
| Returns a string representation of the point. | |
| constexpr T | GetX () const |
| Returns the x-coordinate (first component). | |
| constexpr T | GetY () const |
| Returns the y-coordinate (second component). | |
| constexpr bool | operator== (const PointXd< H, d > &rhs) const |
| Equality operator for comparing integral coordinates. | |
| constexpr bool | operator== (const PointXd< H, d > &rhs) const |
| Equality operator for comparing floating-point coordinates. | |
| constexpr bool | operator!= (const PointXd< H, d > &rhs) const |
| Inequality operator for comparing coordinates. | |
| constexpr std::array< T, dimension > | GetCoordinates () const |
| Returns the coordinates of the point as an array. | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, PointT point) |
| Stream output operator for PointT. | |
2D point template type.
Represents a two-dimensional point consisting of x and y coordinates. This is a convenience alias for a PointXd with two dimensions.
| T | The coordinate data type. |
|
constexprdefault |
Default constructor for PointT (2D point).
Initializes the point with default-initialized coordinates (x and y).
|
inlineconstexpr |
Point constructor from x and y coordinates.
| x | x coordinate |
| y | y coordinate |
|
inlineconstexprinherited |
Returns the coordinates of the point as an array.
|
inlineconstexprinherited |
Returns the x-coordinate (first component).
|
inlineconstexprinherited |
Returns the y-coordinate (second component).
|
inlineconstexprinherited |
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. |
|
inlineconstexprinherited |
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. |
|
inlineconstexprinherited |
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. |
|
inline |
Returns a string representation of the point.
Formats the point as: { x: ..., y: ... }.
|
friend |
Stream output operator for PointT.
Outputs the point's coordinates in a readable format: { x: ..., y: ... }.
| os | The output stream. |
| point | The point to print. |