curfil  ..
 All Classes Functions Variables Typedefs Friends Groups Pages
Public Member Functions | List of all members
curfil::XY Class Reference

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
XYoperator= (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

Detailed Description

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.

Member Function Documentation

int curfil::XY::getX ( ) const
inline
Returns
the x coordinate

Definition at line 79 of file random_tree_image.h.

int curfil::XY::getY ( ) const
inline
Returns
the y coordinate

Definition at line 86 of file random_tree_image.h.

bool curfil::XY::operator!= ( const XY other) const
inline
Returns
whether the tuple is not equal to another

Definition at line 72 of file random_tree_image.h.

bool curfil::XY::operator== ( const XY other) const
inline
Returns
whether the tuple is equal to another

Definition at line 65 of file random_tree_image.h.


The documentation for this class was generated from the following file: