A simple 2D tuple. More...
#include <random_tree_image.h>
Public Member Functions | |
XY (int x, int y) | |
create a 2D tuple using the given x, y | |
XY (const XY &other) | |
create a 2D tuple using another tuple attributes | |
XY & | operator= (const XY &other) |
set the attributes using another tuple | |
XY | normalize (const Depth &depth) const |
Normalize the x and y coordindate such that x ← x/depth and y ← y/depth. | |
bool | operator== (const XY &other) const |
bool | operator!= (const XY &other) const |
int | getX () const |
int | getY () const |
A simple 2D tuple.
Instances of this classes can be used as point (in two-dimensional) space or offset.
Can be normalized (scaled) according to a given depth.
Definition at line 25 of file random_tree_image.h.
|
inline |
Definition at line 79 of file random_tree_image.h.
|
inline |
Definition at line 86 of file random_tree_image.h.
|
inline |
Definition at line 72 of file random_tree_image.h.
|
inline |
Definition at line 65 of file random_tree_image.h.