-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheudist_cpp.hxx
43 lines (34 loc) · 915 Bytes
/
eudist_cpp.hxx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
class Plane {
public:
Plane(const double *p0, const double *p1, const double *p2, int n);
~Plane();
double dist(const double *dot);
double signed_dist(const double *dot);
const double *project(const double *dot);
double *norm;
void info();
private:
// double * p0, * p1, * p2;
const int dim;
double d;
double normsq;
double normlen;
};
double dot_dot(const double *, const double *, int);
int winding_number(const double *, const double *, int);
double polygon_dot(const double *, const double *, int, int, bool);
class PolyMesh {
public:
PolyMesh(const double *datax, const double *datay, int nx, int ny);
~PolyMesh();
int find_cell(const double *dot, int guess);
private:
const int nx;
const int ny;
const double *datax;
const double *datay;
const int num_cells;
double *bounds{nullptr};
double *outer{nullptr};
void add_to_outer(int &pos, int i, int j);
};