00001 #ifndef LINE_H_
00002 #define LINE_H_
00003
00004 #include "Point.h"
00005
00006 class Line {
00007 public:
00008 Line();
00009 Line(Point *p1In, Point *p2In);
00010 Line(Point *p1In, Point *p2In, int i);
00011 ~Line();
00012 bool inAngleRange(double start_angle, double stop_angle);
00013
00015 double getAngle();
00016
00018 double getLength();
00019
00021 void printLine();
00022
00024 Point *getPoint1();
00025
00027 Point *getPoint2();
00028
00030 void recenterLine(int x, int y);
00031
00032 private:
00034 double abs(double d);
00035
00036 const static double PI = 3.141592653589793238462643;
00037 int id;
00038 double len;
00039 Point *p1, *p2;
00040 double angle;
00041 };
00042
00043
00044 #endif