DrawKit
Vector and illustration framework for Mac OS X
|
Cartesian point. More...
Public Member Functions | |
Point () | |
Point (Coord x, Coord y) | |
Point (Point const &p) | |
Point | ccw () const |
Return a point like this point but rotated -90 degrees. More... | |
Point | cw () const |
Return a point like this point but rotated +90 degrees. More... | |
void | normalize () |
Point & | operator*= (double const s) |
Point & | operator*= (Matrix const &m) |
Point & | operator+= (Point const &o) |
Point & | operator-= (Point const &o) |
Point & | operator/= (double const s) |
Point & | operator= (Point const &p) |
int | operator== (const Point &in_pnt) |
Coord | operator[] (unsigned i) const |
Coord & | operator[] (unsigned i) |
Coord | operator[] (Dim2 d) const throw () |
Coord & | operator[] (Dim2 d) throw () |
void | round (int places=0) |
A function to lower the precision of the point. More... | |
Static Public Member Functions | |
static Point | polar (Coord angle, Coord radius) |
Friends | |
std::ostream & | operator<< (std::ostream &out_file, const Geom::Point &in_pnt) |
A function to print out the Point. More... | |
Cartesian point.
Geom::Point::Point | ( | ) |
Geom::Point::Point | ( | Point const & | p | ) |
Point Geom::Point::ccw | ( | ) | const |
Return a point like this point but rotated -90 degrees.
(If the y axis grows downwards and the x axis grows to the right, then this is 90 degrees counter-clockwise.)
Point Geom::Point::cw | ( | ) | const |
Return a point like this point but rotated +90 degrees.
(If the y axis grows downwards and the x axis grows to the right, then this is 90 degrees clockwise.)
void Geom::Point::normalize | ( | ) |
Point& Geom::Point::operator*= | ( | double const | s | ) |
Point& Geom::Point::operator/= | ( | double const | s | ) |
int Geom::Point::operator== | ( | const Point & | in_pnt | ) |
Coord Geom::Point::operator[] | ( | unsigned | i | ) | const |
Coord& Geom::Point::operator[] | ( | unsigned | i | ) |
void Geom::Point::round | ( | int | places = 0 | ) |
A function to lower the precision of the point.
places | The number of decimal places that should be in the final number. |
|
friend |
A function to print out the Point.
It just prints out the coords on the given output stream