#include <upoint.hpp>
Inheritance diagram for ufo::UPoint:
Public Member Functions | |
UPoint (int x, int y) | |
int | getX () const |
void | setX (int x) |
int | getY () const |
void | setY (int y) |
void | setLocation (const UPoint &p) |
UPoint | getLocation () const |
void | translate (const UPoint &p) |
bool | isInvalid () const |
bool | isNull () const |
UPoint & | operator+= (const UPoint &p) |
UPoint & | operator-= (const UPoint &p) |
UPoint & | operator *= (int c) |
UPoint & | operator *= (double c) |
UPoint & | operator/= (int c) |
UPoint & | operator/= (double c) |
Public Attributes | |
int | x |
int | y |
Static Public Attributes | |
UPoint | invalid |
Friends | |
std::ostream & | operator<< (std::ostream &os, const UPoint &o) |
This class is not part of the UObject inheritance structure. Use instead UPointObject if you need a point derived from UObject.
|
Returns a copy. For convenience |
|
|
|
|
|
Multiplies c to both x and y coordinate of this point. Truncates the values to integers.
|
|
Multiplies c to both x and y coordinate of this point.
|
|
Adds point p to this point
|
|
Subtracts point p from this point
|
|
Divides both x and y by c. Truncates the values to integers.
|
|
Divides both x and y by c. Truncates the values to integers.
|
|
for convenience |
|
This method is for convenience. It adds p to this point. |