Xmipp  v3.23.11-Nereus
delaunay.h
Go to the documentation of this file.
1 #ifndef DELAUNAY_H
2 #define DELAUNAY_H
3 
4 #include "defines.h"
5 #include "dcel.h"
6 #include "graph.h"
7 #include "point.h"
8 #include "voronoi.h"
9 
10 /*****************************************************************************
11 * Data types definition
12 *****************************************************************************/
13 struct Delaunay_T
14 {
15  bool voronoiComputed; // Voronoi diagram computed.
16  struct Graph_T graph; // Incremental graph data.
17  struct DCEL_T *dcel; // DCEL data.
18  struct Voronoi_T voronoi; // Voronoi data.
19 
20  int faceIndex; // DCEL face iterator.
21 };
22 
23 /**************************************************************************
24 * Public functions declaration
25 **************************************************************************/
26 int init_Delaunay( struct Delaunay_T *delaunay, int nPoints);
27 void delete_Delaunay( struct Delaunay_T *delaunay);
28 int insert_Point( struct Delaunay_T *delaunay, double x, double y);
29 int create_Delaunay_Triangulation( struct Delaunay_T *delaunay,
30  int createVoronoi);
31 int get_Face_Points( struct Delaunay_T *delaunay, int face_ID,
32  struct Point_T *p,
33  struct Point_T *q,
34  struct Point_T *r);
35 bool next_Face_Iterator(struct Delaunay_T *delaunay, struct Point_T *p1,
36  struct Point_T *p2,
37  struct Point_T *p3);
38 
39 int initialize_Delaunay(struct Delaunay_T *delaunay, struct DCEL_T *dcel);
40 void finalize_Delaunay(struct Delaunay_T *delaunay);
41 
42 void incremental_Delaunay(struct Delaunay_T *delaunay);
44 void purge_Delaunay( struct Delaunay_T *delaunay);
45 
46 int select_Closest( struct Delaunay_T *delaunay, int index);
47 void select_Two_Closest( struct Delaunay_T *delaunay, int *first, int *second);
48 bool select_Closest_Point( struct Delaunay_T *delaunay, struct Point_T *p,
49  struct Point_T *q,
50  double *lowest_Distance);
51 bool select_Closest_Point_DCEL( struct DCEL_T *dcel, int nAnchors,
52  struct Point_T *p,
53  struct Point_T *q,
54  double *lowest_Distance);
55 
56 #endif
57 
struct Voronoi_T voronoi
Definition: delaunay.h:18
bool select_Closest_Point(struct Delaunay_T *delaunay, struct Point_T *p, struct Point_T *q, double *lowest_Distance)
Definition: delaunay.cpp:873
void finalize_Delaunay(struct Delaunay_T *delaunay)
Definition: delaunay.cpp:267
int select_Closest(struct Delaunay_T *delaunay, int index)
Definition: delaunay.cpp:545
Definition: point.h:12
int initialize_Delaunay(struct Delaunay_T *delaunay, struct DCEL_T *dcel)
Definition: delaunay.cpp:236
static double * y
Definition: dcel.h:50
int get_Face_Points(struct Delaunay_T *delaunay, int face_ID, struct Point_T *p, struct Point_T *q, struct Point_T *r)
Definition: delaunay.cpp:638
struct Graph_T graph
Definition: delaunay.h:16
int insert_Point(struct Delaunay_T *delaunay, double x, double y)
Definition: delaunay.cpp:142
void purge_Delaunay(struct Delaunay_T *delaunay)
Definition: delaunay.cpp:504
doublereal * x
glob_log first
struct DCEL_T * dcel
Definition: delaunay.h:17
void select_Two_Closest(struct Delaunay_T *delaunay, int *first, int *second)
Definition: delaunay.cpp:818
void incremental_Delaunay(struct Delaunay_T *delaunay)
Definition: delaunay.cpp:293
viol index
void build_Delaunay_From_Triangulation(struct DCEL_T *dcel)
Definition: delaunay.cpp:345
bool next_Face_Iterator(struct Delaunay_T *delaunay, struct Point_T *p1, struct Point_T *p2, struct Point_T *p3)
Definition: delaunay.cpp:726
Definition: graph.h:22
bool voronoiComputed
Definition: delaunay.h:15
bool select_Closest_Point_DCEL(struct DCEL_T *dcel, int nAnchors, struct Point_T *p, struct Point_T *q, double *lowest_Distance)
Definition: delaunay.cpp:1195
int faceIndex
Definition: delaunay.h:20
int create_Delaunay_Triangulation(struct Delaunay_T *delaunay, int createVoronoi)
Definition: delaunay.cpp:188
int init_Delaunay(struct Delaunay_T *delaunay, int nPoints)
Definition: delaunay.cpp:67
void delete_Delaunay(struct Delaunay_T *delaunay)
Definition: delaunay.cpp:123