#include <CNCL/Coord.h>
CN_COORD
CNObject
None
CNICoord
CNCoord
is a data type for managing 2-dimensional coordinates. It
is typically used together with CNICoord
for world coordinates and
pixel coordinates respectively.
A CNCoord
has double
x and y members which are public
accessible.
CNCoord
s can be automatically converted to CNICoord
s and vice
versa. This is done by applying the conversion factor
CNCoord::scale
.
Constructors:
CNCoord();
CNCoord(CNParam *param);
CNCoord(double vx, double vy);
CNCoord(const CNICoord &v);
CNCoord(const CNCoord &v);
Public accessible members:
double x;
double y;
CNCoord
.
In addition to the member functions required by CNCL, CNCoord
provides:
CNCoord &operator = (const CNCoord &v);
CNCoord &operator += (const CNCoord &v);
CNCoord &operator -= (const CNCoord &v);
=
, +=
and -=
for coordinates by applying
the standard C/C++ operators to the x and y components.
The following static member functions are provided to manipulate the conversion scale setting:
static double CNCoord::get_scale();
static double CNCoord::set_scale(double new_scale);
Global operators:
CNCoord operator + (const CNCoord &a, const CNCoord &b);
CNCoord operator - (const CNCoord &a, const CNCoord &b);
Go to the first, previous, next, last section, table of contents.