triangulation.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. /*************************************/
  2. /* Auteur : Rémi Synave */
  3. /* Date de création : 15/05/08 */
  4. /* Date de modification : 15/03/15 */
  5. /* Version : 0.4 */
  6. /*************************************/
  7. /*************************************/
  8. /* Auteur : Romain Leguay */
  9. /* Nguyen Haiduong */
  10. /* Marianne Fichoux */
  11. /* Date de modification : 05/06/09 */
  12. /* Version : 0.2 */
  13. /*************************************/
  14. /***************************************************************************/
  15. /* This file is part of a2ri. */
  16. /* */
  17. /* a2ri is free software: you can redistribute it and/or modify it */
  18. /* under the terms of the GNU Lesser General Public License as published */
  19. /* by the Free Software Foundation, either version 3 of the License, or */
  20. /* (at your option) any later version. */
  21. /* */
  22. /* a2ri is distributed in the hope that it will be useful, */
  23. /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
  24. /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
  25. /* GNU Lesser General Public License for more details. */
  26. /* */
  27. /* You should have received a copy of the GNU Lesser General Public */
  28. /* License along with a2ri. */
  29. /* If not, see <http://www.gnu.org/licenses/>. */
  30. /***************************************************************************/
  31. #ifndef TRIANGULATION__H
  32. #define TRIANGULATION__H
  33. #include <stdio.h>
  34. #include <stdlib.h>
  35. #include "model.h"
  36. #include "point.h"
  37. #include "space_partition.h"
  38. #include "edge.h"
  39. #include "vector.h"
  40. #include "util.h"
  41. #include "overlap.h"
  42. #include "icp.h"
  43. /**
  44. Création d'un vf_model avec une triangulation de delaunay
  45. @param list liste de point
  46. @param nbpoint nombre de points
  47. @return aucun
  48. **/
  49. vf_model * a2ri_vf_delaunay_triangulation (
  50. const point3d * const list,
  51. int nbpoint);
  52. /**
  53. Création d'un vef_model avec une triangulation de delaunay
  54. @param list liste de point
  55. @param nbpoint nombre de points
  56. @return le nouveau modele créé
  57. **/
  58. vef_model * a2ri_vef_delaunay_triangulation (
  59. const point3d * const list,
  60. int nbpoint);
  61. /**
  62. Nettoyage par suppression des faces dans la zone de recouvrement
  63. @param base,m 2 vf_model
  64. @param sensibility sensibilité
  65. @return aucun
  66. **/
  67. void nettoyage_delete_face (
  68. vf_model * base,
  69. vf_model * m,
  70. double sensibility);
  71. /*ALGORITHME BPA 2010*/
  72. /*SD*/
  73. #define ACTIVE 0
  74. #define BOUNDARY 1
  75. #define FROZEN 2
  76. struct bpa_fronts;
  77. typedef struct bpa_edge
  78. {
  79. int sigma_i,sigma_j,sigma_o;
  80. point3d cijo;
  81. char state;
  82. struct bpa_edge *next,*prev;
  83. struct bpa_fronts *front;
  84. } bpa_edge;
  85. typedef struct bpa_fronts
  86. {
  87. bpa_edge *front;
  88. struct bpa_fronts *next;
  89. } bpa_fronts;
  90. /*Fonctions*/
  91. void a2ri_vf_bpa(vf_model *m, vector3d *normal, double radius);
  92. //void a2ri_vf_bpa_multipass(vf_model *m, vector3d *normal, double *listradius, int listsize);
  93. void a2ri_vf_bpa_without_normal(vf_model *m, double radius);
  94. void a2ri_bpa_free_fronts(bpa_fronts **fronts);
  95. void a2ri_bpa_new_front(bpa_fronts **fronts, int sigma_i, int sigma_j, int sigma_k, point3d centre);
  96. bpa_edge* a2ri_bpa_get_active_edge_in_fronts(bpa_fronts *fronts);
  97. char a2ri_bpa_front_contains_point_in_fronts(bpa_fronts *fronts, int sigma_k);
  98. int a2ri_bpa_front_distance(bpa_edge *front, int index);
  99. 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);
  100. void a2ri_bpa_regularization(bpa_fronts **fronts, int sigma_i, int sigma_j, int sigma_k);
  101. 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);
  102. void a2ri_bpa_join(bpa_edge **e, int sigma_k, point3d centre);
  103. void a2ri_bpa_display_fronts(bpa_fronts *fronts);
  104. void a2ri_bpa_average_radius_suggestion(vf_model *m, double *min, double *max, double *average, double *sd);
  105. void a2ri_bpa_initialisation(vf_model *m, bpa_fronts **fronts, int **listused, int *sizelistused);
  106. #endif