![]() |
IDS peak ICV v1.2.0
|
#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. |
Definition at line 61 of file peak_icv_type_traits.hpp.
|
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 |
Definition at line 216 of file peak_common_point.hpp.
|
inlineconstexprinherited |
Returns the coordinates of the point as an array.
Definition at line 170 of file peak_common_point.hpp.
|
inlineconstexprinherited |
Returns the x-coordinate (first component).
Definition at line 74 of file peak_common_point.hpp.
|
inlineconstexprinherited |
Returns the y-coordinate (second component).
Definition at line 86 of file peak_common_point.hpp.
|
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. |
Definition at line 126 of file peak_common_point.hpp.
|
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. |
Definition at line 109 of file peak_common_point.hpp.
|
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. |
Definition at line 150 of file peak_common_point.hpp.
|
inline |
Returns a string representation of the point.
Formats the point as: { x: ..., y: ... }.
Definition at line 245 of file peak_common_point.hpp.
|
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. |
Definition at line 231 of file peak_common_point.hpp.