Delaunator
2D Delaunay Triangulation in C++ with Python wrapper.
Main Page
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
delaunator
libdelaunator_src
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
30
float
squareDistanceBetweenPoints
(
Coordinates
A,
Coordinates
B);
31
float
squareDistanceBetweenPoints
(
float
x1,
float
y1,
float
x2,
float
y2);
32
33
bool
pointInCircumcircleOf
(
Coordinates
p1,
Coordinates
p2,
Coordinates
p3,
Coordinates
p0);
34
35
Coordinates
circumcenterOf
(
Coordinates
A,
Coordinates
B,
Coordinates
C);
36
37
bool
pointInTriangle
(
Coordinates
p1,
Coordinates
p2,
Coordinates
p3,
Coordinates
p0);
38
39
float
squareDistanceBetweenSegmentAndPoint
(
float
x1,
float
x2,
float
y1,
float
y2,
float
px,
float
py);
40
41
bool
parallelLines
(
Coordinates
A,
Coordinates
B,
Coordinates
C,
Coordinates
D);
42
43
Coordinates
intersectionOfLines
(
Coordinates
A,
Coordinates
B,
Coordinates
C,
Coordinates
D);
44
45
Coordinates
behindIntersectionOfLines
(
Coordinates
A,
Coordinates
B,
Coordinates
C,
Coordinates
D);
46
47
bool
collisionBetweenSegmentAndLine
(
Coordinates
O,
Coordinates
P,
Coordinates
A,
Coordinates
B);
48
49
bool
collisionBetweenSegmentAndSegment
(
Coordinates
A,
Coordinates
B,
Coordinates
C,
Coordinates
D);
50
51
bool
collisionBetweenLineAndCircle
(
Coordinates
A,
Coordinates
B,
Coordinates
C,
float
radius);
52
53
bool
pointInsideCircle
(
Coordinates
A,
Coordinates
C,
float
radius);
54
55
bool
pointOnCircle
(
Coordinates
A,
Coordinates
C,
float
radius);
56
57
bool
collisionBetweenSegmentAndCircle
(
Coordinates
A,
Coordinates
B,
Coordinates
C,
float
radius);
58
59
Coordinates
projectionOfPointOnLine
(
Coordinates
A,
Coordinates
B,
Coordinates
C);
60
61
unsigned
int
intersectionsBetweenLineAndCircle
(
Coordinates
A,
Coordinates
B,
Coordinates
C,
62
float
square_radius,
Coordinates
* S1,
Coordinates
* S2);
63
64
unsigned
int
intersectionsBetweenSegmentAndCircle
(
Coordinates
A,
Coordinates
B,
Coordinates
C,
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
Generated on Sat Nov 1 2014 15:41:46 for Delaunator by
1.8.1.2