CGM Objects Library
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Geometry.h
1 
3 #ifndef GEOMETRY_H_INCLUDE
4 #define GEOMETRY_H_INCLUDE
5 
6 #include "Utility/DPoint.h"
7 
8 #ifdef WIN32
9 # define CALL_TYPE __stdcall
10 #else
11 # ifndef CALL_TYPE
12 # define CALL_TYPE
13 # endif
14 #endif /* WIN32 */
15 
16 namespace Larson
17 {
18  #ifdef __cplusplus
19  extern "C" {
20  #endif
21 
22 
23  bool PtInPolygon(DPoint *polygon,int N, DPoint p);
24  bool PtInPolygonSet(DPoint *polygon,int np, unsigned char* edges, DPoint p);
25  bool PtOnLine(DPoint pt0, DPoint pt1, DPoint ptMouse, double nWidth);
26  bool IntersectLines(DPoint &p0, DPoint &p1, DPoint &p2, DPoint &p3, DPoint* i);
27  void QuadraticToCubicBezier(DPoint &QP0, DPoint &QP1, DPoint &QP2,
28  DPoint *CP1, DPoint *CP2);
29  double PolygonArea(DPoint* polygon, int nPoints);
30 
31  #ifdef __cplusplus
32  }
33  #endif
34 };
35 #endif /* GEOMETRY_H_INCLUDE */