00001
00002
00003
00004
00005
00006
00007 #ifndef wxLineR_H
00008 #define wxLineR_H
00009
00010 #ifdef __GNUG__
00011 #pragma interface
00012 #endif
00013
00014 enum OUTPRODUCT{R_IS_LEFT,R_IS_ON,R_IS_RIGHT};
00015
00016 #include "point.h"
00017
00018
00019 enum R_PointStatus {R_LEFT_SIDE, R_RIGHT_SIDE, R_ON_AREA, R_IN_AREA};
00020
00021 class G_Polygon;
00022
00023 class wxLine
00024 {
00025 public:
00026
00027 wxLine();
00028 wxLine(const Point& a,const Point& b);
00029 ~wxLine();
00030
00031 Point GetBeginPoint();
00032 Point GetEndPoint();
00033 int CheckIntersect(wxLine&, double Marge);
00034 int Intersect(wxLine&, Point& bp ,Point& ep ,double Marge) ;
00035 bool Intersect(wxLine& lijn,Point& crossing);
00036 R_PointStatus PointOnLine(const Point& a_Point, double& Distance, double Marge );
00037 R_PointStatus PointInLine(const Point& a_Point, double& Distance, double Marge );
00038 OUTPRODUCT OutProduct(const wxLine& two,double accur);
00039 double Calculate_Y(double X);
00040 void Virtual_Point(Point& a_point,double distance) const;
00041 wxLine& operator=(const wxLine&);
00042
00043
00044
00045 void CalculateLineParameters();
00046 void OffsetContour(const wxLine& nextline,double factor,Point& offsetpoint) const;
00047
00048 private:
00049
00050 int ActionOnTable1(R_PointStatus,R_PointStatus);
00051 int ActionOnTable2(R_PointStatus,R_PointStatus);
00052
00053 double _AA;
00054 double _BB;
00055 double _CC;
00056 Point m_a;
00057 Point m_b;
00058 bool _valid_parameters;
00059 };
00060
00061 #endif
liner.h Source File -- Thu Nov 28 21:24:56 2002 -- 28 Nov 2002 -- 1.2.18 -- -- . --