ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/mailleur/src/remailleur.h
Revision: 147
Committed: Wed Aug 27 20:35:33 2008 UTC (16 years, 8 months ago) by francois
Content type: text/plain
Original Path: magic/lib/mailleur/mailleur/src/remailleur.h
File size: 4515 byte(s)
Log Message:
Remailleur - reprise du doc dans l environnement MAGiC

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     #include <map>
26    
27    
28     #define CONSERVE 154
29     #define DETRUIT 155
30     #define NONTRAITE 156
31     #define TRAITE 157
32     #define NONATTACHE 158
33     #define ATTACHE 159
34    
35     class CORRESPONDANCENOEUD
36     {
37     public :
38     CORRESPONDANCENOEUD(class MG_NOEUD*n1,class MG_NOEUD*n2):noeudori(n1),noeudmod(n2) {};
39    
40     class MG_NOEUD* noeudori;
41     class MG_NOEUD* noeudmod;
42     };
43    
44    
45    
46     class BLOC_MAILLE_1D
47     {
48     public:
49     BLOC_MAILLE_1D(class MG_ARETE* are,int ty):arete(are),etat(NONATTACHE),type(ty) {};
50     ~BLOC_MAILLE_1D() {};
51    
52     MG_ARETE* arete;
53     vector<MG_SEGMENT*> lst;
54     unsigned long get_id(void) {return arete->get_id();};
55     int etat;
56     int type;
57     };
58    
59     class BLOC_MAILLE_2D
60     {
61     public:
62     BLOC_MAILLE_2D(class MG_FACE* fac,int ty):face(fac),etat(NONATTACHE),type(ty) {};
63     ~BLOC_MAILLE_2D() {};
64    
65     MG_FACE* face;
66     vector<MG_TRIANGLE*> lst;
67     unsigned long get_id(void) {return face->get_id();};
68     int etat;
69     int type;
70     };
71    
72     class BLOC_MAILLE_3D
73     {
74     public:
75     BLOC_MAILLE_3D(class MG_VOLUME* vol):volume(vol),etat(NONATTACHE) {};
76     ~BLOC_MAILLE_3D() {};
77    
78     MG_VOLUME* volume;
79     vector<MG_TETRA*> lst;
80     unsigned long get_id(void) {return volume->get_id();};
81     int etat;
82     };
83    
84     class DLLPORTMAIL REMAILLEUR:public MAILLEUR
85     {
86     public:
87     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);
88     ~REMAILLEUR();
89    
90     void maille(int etape);
91     void maille(void);
92    
93     private:
94     void initialise_octree(void);
95     void detruit_noeud(MG_NOEUD* noeudbase,double distance,int type=0);
96    
97     void cree_quadtree(class MG_MAILLAGE* mai,TPL_QUADTREE<class MG_SEGMENT_FRONTIERE*,class MG_NOEUD*> **quad,TPL_MAP_ENTITE<MG_SEGMENT_FRONTIERE*> *lstsegfront);
98    
99    
100     double calcule_distance_contour_face(double *uv,class MG_FACE* face,int num,TPL_QUADTREE<MG_SEGMENT_FRONTIERE*,MG_NOEUD*> **quad);
101     double distance_pt_segment(double *uv,MG_NOEUD* noeud1,MG_NOEUD* noeud2,MG_FACE* face);
102     double distance_pt_segment(double *uv,double *uv1,double *uv2,MG_FACE* face);
103     int point_appartient_volume(double *xyz,int numvol);
104     int inter_droite_triangle(double *xyz,double *dir,MG_TRIANGLE* tri,double *t);
105    
106     void ajouter_liste_correspondance_noeud(MG_NOEUD* n1,MG_NOEUD* n2);
107     MG_NOEUD* get_liste_correspondance(MG_NOEUD* n1);
108     MG_NOEUD* transfert_noeud(MG_NOEUD* no,MG_ELEMENT_TOPOLOGIQUE* ele);
109     void transfert_coord(double *xyz,double *xyz2);
110     void cree_bloc_maille(multimap<unsigned long,MG_SEGMENT*,less <unsigned long> > &lst,MG_ARETE* arete);
111     void cree_bloc_maille(multimap<unsigned long,MG_TRIANGLE*,less <unsigned long> > &lst,MG_FACE* face);
112     void cree_bloc_maille(multimap<unsigned long,MG_TETRA*,less <unsigned long> > &lst,MG_VOLUME* face);
113     MG_SEGMENT* trouve_segment(multimap<unsigned long,MG_SEGMENT*,less <unsigned long> > &lst,MG_NOEUD* no);
114     MG_TRIANGLE* trouve_triangle(multimap<unsigned long,MG_TRIANGLE*,less <unsigned long> > &lst,MG_NOEUD* no);
115     MG_TETRA* trouve_tetra(multimap<unsigned long,MG_TETRA*,less <unsigned long> > &lst,MG_NOEUD* no);
116     void cree_liste_frontiere(MG_MAILLAGE* mai);
117    
118     class MG_GESTIONNAIRE* gestorigine,*gestmodifie;
119     class MG_GEOMETRIE* geoorigine,*geomodifie;
120     class FCT_TAILLE* carteori;
121     class FCT_TAILLE* cartemod;
122     class MG_MAILLAGE* maiorigine;
123     class MG_MAILLAGE* maimodifie;
124     class TPL_QUADTREE<class MG_SEGMENT_FRONTIERE*,MG_NOEUD*> **quad;
125     TPL_OCTREE_FCT<MG_NOEUD*,FCT_GENERATEUR_3D<4> > *octree;
126     TPL_LISTE_ENTITE<MG_TRIANGLE*> *lsttrifront;
127     TPL_MAP_ENTITE<class MG_SEGMENT_FRONTIERE*> lstsegfront;
128     VCT_COMPARAISON_RESULTAT& rescmp;
129     map<unsigned long,CORRESPONDANCENOEUD> lstcorrnoeud;
130     multimap<unsigned long,BLOC_MAILLE_1D*,less <unsigned long> > lstb1d;
131     multimap<unsigned long,BLOC_MAILLE_2D*,less <unsigned long> > lstb2d;
132     multimap<unsigned long,BLOC_MAILLE_3D*,less <unsigned long> > lstb3d;
133     };
134    
135    
136    
137    
138    
139    
140    
141     #endif