Represents a point (intersection) in a 2D coordinate system. More...
#include <Intersection.h>
Public Member Functions | |
Intersection () | |
Default constructor. | |
Intersection (int x, int y) | |
Parameterized constructor. | |
void | setPosition (int x, int y) |
Sets a new position for the intersection. | |
std::pair< int, int > | getPosition () const |
Retrieves the current position of the intersection. | |
int | getX () const |
Retrieves the x-coordinate. | |
int | getY () const |
Retrieves the y-coordinate. | |
Represents a point (intersection) in a 2D coordinate system.
Intersection::Intersection | ( | int | x, |
int | y | ||
) |
Parameterized constructor.
x | The x-coordinate. |
y | The y-coordinate. |
std::pair< int, int > Intersection::getPosition | ( | ) | const |
Retrieves the current position of the intersection.
int Intersection::getX | ( | ) | const |
Retrieves the x-coordinate.
int Intersection::getY | ( | ) | const |
Retrieves the y-coordinate.
void Intersection::setPosition | ( | int | x, |
int | y | ||
) |
Sets a new position for the intersection.
x | The new x-coordinate. |
y | The new y-coordinate. |