liba2ri  0.2
 All Data Structures
triangulation.h
1 /*************************************/
2 /* Auteur : Rémi Synave */
3 /* Date de création : 15/05/08 */
4 /* Date de modification : 07/11/10 */
5 /* Version : 0.2 */
6 /*************************************/
7 
8 /*************************************/
9 /* Auteur : Romain Leguay */
10 /* Nguyen Haiduong */
11 /* Marianne Fichoux */
12 /* Date de modification : 05/06/09 */
13 /* Version : 0.2 */
14 /*************************************/
15 
16 /***************************************************************************/
17 /* This file is part of a2ri. */
18 /* */
19 /* a2ri is free software: you can redistribute it and/or modify it */
20 /* under the terms of the GNU Lesser General Public License as published */
21 /* by the Free Software Foundation, either version 3 of the License, or */
22 /* (at your option) any later version. */
23 /* */
24 /* a2ri is distributed in the hope that it will be useful, */
25 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
26 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
27 /* GNU Lesser General Public License for more details. */
28 /* */
29 /* You should have received a copy of the GNU Lesser General Public */
30 /* License along with a2ri. */
31 /* If not, see <http://www.gnu.org/licenses/>. */
32 /***************************************************************************/
33 
34 #ifndef TRIANGULATION__H
35 #define TRIANGULATION__H
36 
37 #include <stdio.h>
38 #include <stdlib.h>
39 #include "model.h"
40 #include "point.h"
41 #include "space_partition.h"
42 #include "edge.h"
43 #include "vector.h"
44 #include "util.h"
45 #include "overlap.h"
46 #include "icp.h"
47 
54 vf_model *a2ri_vf_delaunay_triangulation (
55  point3d * list,
56  int nbpoint);
57 
58 
65 vef_model *a2ri_vef_delaunay_triangulation (
66  point3d * list,
67  int nbpoint);
68 
75 vef_model *a2ri_vef_delaunay_tetrahedrization (
76  point3d * list,
77  int nbpoint);
78 
85 void nettoyage_delete_face (
86  vf_model * base,
87  vf_model * m,
88  double sensibility);
89 
90 /*ALGORITHME BPA 2010*/
91 
92 /*SD*/
93 
94 #define ACTIVE 0
95 #define BOUNDARY 1
96 #define FROZEN 2
97 
98 struct bpa_fronts;
99 
100 typedef struct bpa_edge
101 {
102  int sigma_i,sigma_j,sigma_o;
103  point3d cijo;
104  char state;
105  struct bpa_edge *next,*prev;
106  struct bpa_fronts *front;
107 } bpa_edge;
108 
109 typedef struct bpa_fronts
110 {
111  bpa_edge *front;
112  struct bpa_fronts *next;
113 } bpa_fronts;
114 
115 /*Fonctions*/
116 
117 void a2ri_vf_bpa(vf_model *m, vector3d *normal, double radius);
118 
119 //void a2ri_vf_bpa_multipass(vf_model *m, vector3d *normal, double *listradius, int listsize);
120 
121 void a2ri_vf_bpa_without_normal(vf_model *m, double radius);
122 
123 void a2ri_bpa_free_fronts(bpa_fronts **fronts);
124 
125 void a2ri_bpa_new_front(bpa_fronts **fronts, int sigma_i, int sigma_j, int sigma_k, point3d centre);
126 
127 bpa_edge* a2ri_bpa_get_active_edge_in_fronts(bpa_fronts *fronts);
128 
129 char a2ri_bpa_front_contains_point_in_fronts(bpa_fronts *fronts, int sigma_k);
130 
131 int a2ri_bpa_front_distance(bpa_edge *front, int index);
132 
133 char a2ri_bpa_find_seed_triangle(vf_model *m, space_partition *sp, vector3d *normal, double radius, int *listused, int sizeused, int *sigma_i, int *sigma_j, int *sigma_k, point3d *centre, int imin);
134 
135 void a2ri_bpa_regularization(bpa_fronts **fronts, int sigma_i, int sigma_j, int sigma_k);
136 
137 void a2ri_bpa_ball_pivot(vf_model *m, space_partition *sp, vector3d *normal, double radius, bpa_edge *e, int *listused, int sizeused, bpa_fronts *fronts, int *sigma_k, point3d *centre);
138 
139 void a2ri_bpa_join(bpa_edge **e, int sigma_k, point3d centre);
140 
141 void a2ri_bpa_display_fronts(bpa_fronts *fronts);
142 
143 void a2ri_bpa_average_radius_suggestion(vf_model *m, double *min, double *max, double *average, double *sd);
144 
145 void a2ri_bpa_initialisation(vf_model *m, bpa_fronts **fronts, int **listused, int *sizelistused);
146 
147 #endif