![]() |
CARTA Backend
The backend component of CARTA
|
Represents a 2D point with floating-point coordinates. More...
#include <Image.h>
Public Member Functions | |
PointXy () | |
Default constructor initialising point to (-1.0, -1.0). | |
PointXy (float x_, float y_) | |
Constructor initialising point with given coordinates. | |
void | operator= (const PointXy &other) |
Assignment operator. | |
bool | operator== (const PointXy &rhs) const |
Equality comparison operator. | |
void | ToIndex (int &x_index, int &y_index) |
Converts floating-point coordinates to integer indices. | |
bool | InImage (int xrange, int yrange) |
Checks if the point is within the given image axis ranges. | |
Public Attributes | |
float | x |
X-coordinate of the point. | |
float | y |
Y-coordinate of the point. | |
Represents a 2D point with floating-point coordinates.
This struct provides basic operations for handling 2D points, such as assignment, comparison, and checking if a point is within image bounds.
|
inline |
Default constructor initialising point to (-1.0, -1.0).
|
inline |
Constructor initialising point with given coordinates.
x_ | The x-coordinate. |
y_ | The y-coordinate. |
|
inline |
Checks if the point is within the given image axis ranges.
xrange | The width of the image. |
yrange | The height of the image. |
|
inline |
Assignment operator.
other | The point to assign from. |
|
inline |
Equality comparison operator.
rhs | The point to compare with. |
|
inline |
Converts floating-point coordinates to integer indices.
x_index | Reference to store the X-coordinate index. |
y_index | Reference to store the Y-coordinate index. |
float PointXy::x |
X-coordinate of the point.
float PointXy::y |
Y-coordinate of the point.