Stores a single point. More...
point( ) | |
point( point p ) | |
point(int x,int y) | |
double | distanceTo(point p2) |
double | distanceToLine(point p1, point p2) |
double | distanceToLineAbs(point p1, point p2) |
double | length() |
void | set(int x, int y) |
void | setX(int x) |
void | setY(int y) |
int | x() |
int | y() |
This class stored a single point. As all coordinates it is store as an integer with a resolution of 32 bit. The physical coordinates can be calculated by a multiplication with the databaseunits ([[MacroClassDrawingField|class drawingField]])
Example:
point p;
p.set(10000,10000);
int x=p.x();
creates a point.
creates a point containing a copy of p
constructs a point with coordinates x and y.
Returns: the distance to the p2
Returns: the shortest distance to the line p1 to p2. The value is negative it the point is left of the line from p1 to p2.
Returns: the shortest distance to the line p1 to p2. The value is always positive or 0.
Returns: the distance to the origin
Set the x and y coordinates.
Set the x coordinate.
Set the y coordinate.
Returns: x-coordinate of the point
Returns: y-coordinate of the point