2D point template type.
More...
#include <peak_common/types/geometry/peak_common_point.hpp>
|
| 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 | PointXd ()=default |
| | Default constructor for PointXd.
|
| 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 |
| | Inequality operator for comparing coordinates.
|
| constexpr std::array< T, dimension > | GetCoordinates () const |
| | Returns the coordinates of the point as an array.
|
template<typename T>
class peak::common::detail::PointT< T >
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.
- Template Parameters
-
| T | The coordinate data type. |
- Since
- ids_peak_common 1.0
◆ PointT() [1/2]
Default constructor for PointT (2D point).
Initializes the point with default-initialized coordinates (x and y).
- Since
- ids_peak_common 1.0
◆ PointT() [2/2]
Point constructor from x and y coordinates.
- Parameters
-
| x | x coordinate |
| y | y coordinate |
- Since
- ids_peak_common 1.0
◆ ToString()
template<typename T>
| std::string ToString |
( |
| ) |
const |
|
inline |
Returns a string representation of the point.
Formats the point as: { x: ..., y: ... }.
- Returns
- A string containing the formatted coordinates.
- Since
- ids_peak_common 1.0
◆ operator<<
template<typename T>
| std::ostream & operator<< |
( |
std::ostream & | os, |
|
|
PointT< T > | point ) |
|
friend |
Stream output operator for PointT.
Outputs the point's coordinates in a readable format: { x: ..., y: ... }.
- Parameters
-
| os | The output stream. |
| point | The point to print. |
- Returns
- A reference to the output stream.
- Since
- ids_peak_common 1.0
The documentation for this class was generated from the following file: