Skip to content

Commit 1280014

Browse files
committed
Remove robust_predicates dependency
1 parent 96b8bbf commit 1280014

File tree

14 files changed

+1054
-6778
lines changed

14 files changed

+1054
-6778
lines changed

src/concaveman.h

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@
2121
#include <queue>
2222
#include <assert.h>
2323

24-
#include "robust_predicate/geompred.hpp"
25-
2624
//#define DEBUG // uncomment to dump debug info to screen
2725
//#define DEBUG_2 // uncomment to dump second-level debug info to screen
2826

27+
// From predicates.cpp
28+
void exactinit();
29+
double orient2d(double* pa, double* pb, double* pc);
30+
2931
template<class T> class compare_first {
3032
public:
3133
bool operator()(const T &a, const T &b) {
@@ -38,13 +40,18 @@ double orient_2d(const std::array<T, 2> &a,
3840
const std::array<T, 2> &b,
3941
const std::array<T, 2> &c) {
4042
static double coords[6] = {0,0,0,0,0,0};
43+
static bool initialised = false;
44+
if (!initialised) {
45+
initialised = true;
46+
exactinit();
47+
}
4148
coords[0] = a[0];
4249
coords[1] = a[1];
4350
coords[2] = b[0];
4451
coords[3] = b[1];
4552
coords[4] = c[0];
4653
coords[5] = c[1];
47-
return geompred::orient2d(coords, coords+2, coords+4);
54+
return orient2d(coords, coords+2, coords+4);
4855
}
4956

5057

src/predicates.cpp

Lines changed: 1044 additions & 0 deletions
Large diffs are not rendered by default.

src/robust_predicate/basebase.hpp

Lines changed: 0 additions & 153 deletions
This file was deleted.

0 commit comments

Comments
 (0)