Conversion from/to Position are made implicit, to avoid mistake. More...
#include <Point.hh>
Public Member Functions | |
| TPoint (T x, T y) | |
| template<typename U> | |
| TPoint (const TPoint< U > &pos) | |
| TPoint (const Position &pos) | |
| TPoint (const Rect &pos) | |
| T | getRow () const |
| T | getCol () const |
| void | setRow (T row) |
| void | setCol (T col) |
| T | getX () const |
| T | getY () const |
| void | setX (T x) |
| void | setY (T y) |
| double | distance (const TPoint &to) const |
| Return the distance between the two points. | |
Public Attributes | |
| T | x |
| X coordinate (horizontal). | |
| T | y |
| Y coordinate (vertical). | |
Friends | |
| bool | operator== (const TPoint< T > &lhs, const TPoint< T > &rhs) |
| bool | operator!= (const TPoint< T > &lhs, const TPoint< T > &rhs) |
| TPoint< T > | operator+ (const TPoint< T > &lhs, const TPoint< T > &rhs) |
| TPoint< T > | operator- (const TPoint< T > &lhs, const TPoint< T > &rhs) |
| TPoint< T > | operator * (const TPoint< T > &lhs, double factor) |
| TPoint< T > | operator/ (const TPoint< T > &lhs, T factor) |
| std::ostream & | operator<< (std::ostream &os, const TPoint< T > &p) |
Conversion from/to Position are made implicit, to avoid mistake.
1.4.7