the fair gds editor MacroClassPoint

Point Class Reference

Stores a single point. More...

See also: pointArray, List of Classes


Detailed Description

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 (class drawingField)

Example:

   1  point p;
   2  p.set(10000,10000);
   3  int x=p.x();

Member Function Documentation

point::point( )

creates a point.

(introduced with version 20170316)

point::point( point p )

creates a point containing a copy of p

(introduced with version 20170520)

point::point(int x,int y)

constructs a point with coordinates x and y.

(introduced with version 20170316)

double point::distanceTo(point p2)

Returns: the distance to the p2

(introduced with version 20170317)

double point::distanceToLine(point p1, point p2)

Returns: the shortest distance to the line p1-> to p2. The value is negative it the point is left of the line.

(introduced with version 20170317)

double point::distanceToLineAbs(point p1, point p2)

Returns: the shortest distance to the line p1-> to p2. The value is always positive or 0.

(introduced with version 20170317)

double point::length()

Returns: the distance to the origin

(introduced with version 20170317)

void point::set(int x, int y)

Set the x and y coordinates.

void point::setX(int x)

Set the x coordinate.

void point::setY(int y)

Set the y coordinate.

int point::x()

Returns: x-coordinate of the point

int point::y()

Returns: y-coordinate of the point

See also


CategoryMacroClass CategoryMacroClassBasic


MacroClassPoint (last edited 2017-05-21 09:17:25 by JurgenThies)