Class to represent a position in two dimensional space.
More...
#include <point.h>
Class to represent a position in two dimensional space.
◆ Point() [1/3]
Construct an uninitialised point.
The x and y values are undefined until set
◆ Point() [2/3]
tbx::Point::Point |
( |
int |
ix, |
|
|
int |
iy |
|
) |
| |
|
inline |
Construct a point from the give coordinates.
- Parameters
-
ix | x coordinate |
iy | y coordinate |
◆ Point() [3/3]
tbx::Point::Point |
( |
const Point & |
other | ) |
|
|
inline |
Construct a point as a copy of another point.
- Parameters
-
◆ operator!=()
bool tbx::Point::operator!= |
( |
const Point & |
other | ) |
const |
|
inline |
Check if this point is different from another.
- Parameters
-
other | point to compare with |
- Returns
- true if this point is different
◆ operator-()
Size tbx::Point::operator- |
( |
const Point & |
other | ) |
const |
|
inline |
Subtract another point from this one.
- Parameters
-
- Returns
- Size with x difference as width, y difference has height
◆ operator<()
bool tbx::Point::operator< |
( |
const Point & |
other | ) |
const |
|
inline |
Check if this points is less than another.
Check is x < other.x and y < other.y
- Parameters
-
other | point to compare with |
- Returns
- true if x & y coordinates are both less
◆ operator<=()
bool tbx::Point::operator<= |
( |
const Point & |
other | ) |
const |
|
inline |
Check if this points is less than or equal another.
Check is x <= other.x and y <= other.y
- Parameters
-
other | point to compare with |
- Returns
- true if x & y coordinates are both less than or equal
◆ operator=()
Point& tbx::Point::operator= |
( |
const Point & |
other | ) |
|
|
inline |
Assign this point to the same value as another.
- Parameters
-
- Returns
- *this
◆ operator==()
bool tbx::Point::operator== |
( |
const Point & |
other | ) |
const |
|
inline |
Check if this point is the same as another.
- Parameters
-
other | point to compare with |
- Returns
- true if this point is the same
◆ operator>()
bool tbx::Point::operator> |
( |
const Point & |
other | ) |
const |
|
inline |
Check if this points is greater than another.
Check is x > other.x and y > other.y
- Parameters
-
other | point to compare with |
- Returns
- true if x & y coordinates are both greater
◆ operator>=()
bool tbx::Point::operator>= |
( |
const Point & |
other | ) |
const |
|
inline |
Check if this points is greater than or equal to another.
Check is x >= other.x and y >= other.y
- Parameters
-
other | point to compare with |
- Returns
- true if x & y coordinates are both greater than or equal
x coordinate of the point
y coordinate of the point
The documentation for this class was generated from the following file: