Delaunator
2D Delaunay Triangulation in C++ with Python wrapper.
 All Classes Namespaces Functions
geometry.h
1 #ifndef GEOMETRY_H_INCLUDED
2 #define GEOMETRY_H_INCLUDED
3 
4 
5 
6 /*
7  * LIBRARIES
8  */
9 // LOCAL MODULES
10 #include "commons.h"
11 #include "vertex.h"
12 
13 
14 
15 /*
16  * DEFINES
17  */
18 
19 
20 
21 
22 
26 namespace geometry {
27  void unit_tests(); // call that once for verify integrity of geometry fonctions
28 
29 
31  float squareDistanceBetweenPoints(float x1, float y1, float x2, float y2);
32 
34 
36 
38 
39  float squareDistanceBetweenSegmentAndPoint(float x1, float x2, float y1, float y2, float px, float py);
40 
42 
44 
46 
48 
50 
52 
53  bool pointInsideCircle(Coordinates A, Coordinates C, float radius);
54 
55  bool pointOnCircle(Coordinates A, Coordinates C, float radius);
56 
58 
60 
62  float square_radius, Coordinates* S1, Coordinates* S2);
63 
65  float square_radius, Coordinates* S1, Coordinates* S2);
66 
67  bool coeffAndOrdnOfLine(Coordinates A, Coordinates B, float* coef, float* ordn);
68 }
69 
70 
71 #endif