ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/mailleur/src/remailleur.h
Revision: 168
Committed: Wed Dec 10 19:53:59 2008 UTC (16 years, 5 months ago) by francois
Content type: text/plain
Original Path: magic/lib/mailleur/mailleur/src/remailleur.h
File size: 4737 byte(s)
Log Message:
Nouvelle zone de destruction pour le remailleur. Optimisation meilleure.

File Contents

# User Rev Content
1 francois 147 //---------------------------------------------------------------------------
2    
3     #ifndef remailleurH
4     #define remailleurH
5     //---------------------------------------------------------------------------
6    
7    
8    
9     #ifdef WINDOWS_VERSION
10     #ifdef BUILT_DLL_MAILLEUR
11     #define DLLPORTMAIL __declspec(dllexport)
12     #else
13     #define DLLPORTMAIL __declspec(dllimport)
14     #endif
15     #else
16     #define DLLPORTMAIL
17     #endif
18    
19     #include "mailleur.h"
20     #include "tpl_octree.h"
21     #include "tpl_quadtree.h"
22     #include "fct_generateur_3D.h"
23     #include "vct_comparaison_resultat.h"
24     #include "mg_volume.h"
25 francois 149 #include "mg_segment_frontiere.h"
26 francois 147 #include <map>
27    
28    
29     #define CONSERVE 154
30     #define DETRUIT 155
31     #define NONTRAITE 156
32     #define TRAITE 157
33     #define NONATTACHE 158
34     #define ATTACHE 159
35    
36     class CORRESPONDANCENOEUD
37     {
38     public :
39     CORRESPONDANCENOEUD(class MG_NOEUD*n1,class MG_NOEUD*n2):noeudori(n1),noeudmod(n2) {};
40    
41     class MG_NOEUD* noeudori;
42     class MG_NOEUD* noeudmod;
43     };
44    
45    
46    
47     class BLOC_MAILLE_1D
48     {
49     public:
50     BLOC_MAILLE_1D(class MG_ARETE* are,int ty):arete(are),etat(NONATTACHE),type(ty) {};
51     ~BLOC_MAILLE_1D() {};
52    
53     MG_ARETE* arete;
54     vector<MG_SEGMENT*> lst;
55     unsigned long get_id(void) {return arete->get_id();};
56     int etat;
57     int type;
58     };
59    
60     class BLOC_MAILLE_2D
61     {
62     public:
63     BLOC_MAILLE_2D(class MG_FACE* fac,int ty):face(fac),etat(NONATTACHE),type(ty) {};
64     ~BLOC_MAILLE_2D() {};
65    
66     MG_FACE* face;
67     vector<MG_TRIANGLE*> lst;
68     unsigned long get_id(void) {return face->get_id();};
69     int etat;
70     int type;
71     };
72    
73     class BLOC_MAILLE_3D
74     {
75     public:
76     BLOC_MAILLE_3D(class MG_VOLUME* vol):volume(vol),etat(NONATTACHE) {};
77     ~BLOC_MAILLE_3D() {};
78    
79     MG_VOLUME* volume;
80     vector<MG_TETRA*> lst;
81     unsigned long get_id(void) {return volume->get_id();};
82     int etat;
83     };
84    
85     class DLLPORTMAIL REMAILLEUR:public MAILLEUR
86     {
87     public:
88     REMAILLEUR(class MG_GESTIONNAIRE* gentier,MG_GESTIONNAIRE* gbloc,class MG_GEOMETRIE* geo1,MG_GEOMETRIE* geo2,class FCT_TAILLE* fct_taille1,class FCT_TAILLE* fct_taille2,MG_MAILLAGE* mori,MG_MAILLAGE* mmodi,VCT_COMPARAISON_RESULTAT& cmp);
89     ~REMAILLEUR();
90    
91     void maille(int etape);
92     void maille(void);
93    
94     private:
95     void initialise_octree(void);
96 francois 168 void detruit_noeud(MG_ELEMENT_MAILLAGE* elebase,double distance,int type=0);
97 francois 147
98     void cree_quadtree(class MG_MAILLAGE* mai,TPL_QUADTREE<class MG_SEGMENT_FRONTIERE*,class MG_NOEUD*> **quad,TPL_MAP_ENTITE<MG_SEGMENT_FRONTIERE*> *lstsegfront);
99    
100    
101     double calcule_distance_contour_face(double *uv,class MG_FACE* face,int num,TPL_QUADTREE<MG_SEGMENT_FRONTIERE*,MG_NOEUD*> **quad);
102 francois 165 double distance_pt_segment(double *uv,MG_NOEUD* noeud1,MG_NOEUD* noeud2,MG_FACE* face,int *type,double *longueur_ref);
103     double distance_pt_segment(double *uv,double *uv1,double *uv2,MG_FACE* face,int *type,double *longueur_ref);
104 francois 147 int point_appartient_volume(double *xyz,int numvol);
105     int inter_droite_triangle(double *xyz,double *dir,MG_TRIANGLE* tri,double *t);
106 francois 165 int angle_contour(double *uv,MG_SEGMENT_FRONTIERE* seg1,MG_SEGMENT_FRONTIERE* seg2,MG_FACE* face);
107 francois 147 void ajouter_liste_correspondance_noeud(MG_NOEUD* n1,MG_NOEUD* n2);
108     MG_NOEUD* get_liste_correspondance(MG_NOEUD* n1);
109     MG_NOEUD* transfert_noeud(MG_NOEUD* no,MG_ELEMENT_TOPOLOGIQUE* ele);
110     void transfert_coord(double *xyz,double *xyz2);
111     void cree_bloc_maille(multimap<unsigned long,MG_SEGMENT*,less <unsigned long> > &lst,MG_ARETE* arete);
112     void cree_bloc_maille(multimap<unsigned long,MG_TRIANGLE*,less <unsigned long> > &lst,MG_FACE* face);
113     void cree_bloc_maille(multimap<unsigned long,MG_TETRA*,less <unsigned long> > &lst,MG_VOLUME* face);
114     MG_SEGMENT* trouve_segment(multimap<unsigned long,MG_SEGMENT*,less <unsigned long> > &lst,MG_NOEUD* no);
115     MG_TRIANGLE* trouve_triangle(multimap<unsigned long,MG_TRIANGLE*,less <unsigned long> > &lst,MG_NOEUD* no);
116     MG_TETRA* trouve_tetra(multimap<unsigned long,MG_TETRA*,less <unsigned long> > &lst,MG_NOEUD* no);
117     void cree_liste_frontiere(MG_MAILLAGE* mai);
118    
119     class MG_GESTIONNAIRE* gestorigine,*gestmodifie;
120     class MG_GEOMETRIE* geoorigine,*geomodifie;
121     class FCT_TAILLE* carteori;
122     class FCT_TAILLE* cartemod;
123     class MG_MAILLAGE* maiorigine;
124     class MG_MAILLAGE* maimodifie;
125     class TPL_QUADTREE<class MG_SEGMENT_FRONTIERE*,MG_NOEUD*> **quad;
126     TPL_OCTREE_FCT<MG_NOEUD*,FCT_GENERATEUR_3D<4> > *octree;
127     TPL_LISTE_ENTITE<MG_TRIANGLE*> *lsttrifront;
128     TPL_MAP_ENTITE<class MG_SEGMENT_FRONTIERE*> lstsegfront;
129     VCT_COMPARAISON_RESULTAT& rescmp;
130     map<unsigned long,CORRESPONDANCENOEUD> lstcorrnoeud;
131     multimap<unsigned long,BLOC_MAILLE_1D*,less <unsigned long> > lstb1d;
132     multimap<unsigned long,BLOC_MAILLE_2D*,less <unsigned long> > lstb2d;
133 francois 165 multimap<unsigned long,BLOC_MAILLE_3D*,less <unsigned long> > lstb3d;
134    
135 francois 164 int nbfacemod;
136 francois 147 };
137    
138    
139    
140    
141    
142    
143    
144     #endif