ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/app/VMM/VMM/win32/visuwin.h
Revision: 62
Committed: Fri Nov 16 16:46:00 2007 UTC (17 years, 9 months ago) by francois
Content type: text/plain
File size: 18165 byte(s)
Log Message:
Nouvelle version de VMM avec couleur configurable et affichage de l 'origine des mailles
Nouveau prog de transfert
Nouvelle version de mailleur avec toutes les options disponibles

File Contents

# Content
1 //------------------------------------------------------------
2 //------------------------------------------------------------
3 // MAGiC
4 // Jean Christophe Cuillière et Vincent FRANCOIS
5 // Département de Génie Mécanique - UQTR
6 //------------------------------------------------------------
7 // Le projet MAGIC est un projet de recherche du département
8 // de génie mécanique de l'Université du Québec à
9 // Trois Rivières
10 // Les librairies ne peuvent être utilisées sans l'accord
11 // des auteurs (contact : francois@uqtr.ca)
12 //------------------------------------------------------------
13 //------------------------------------------------------------
14 //
15 // visuwin.h
16 //
17 //------------------------------------------------------------
18 //------------------------------------------------------------
19 // COPYRIGHT 2000
20 // Version du 02/03/2006 à 11H25
21 //------------------------------------------------------------
22 //------------------------------------------------------------
23
24 #ifndef visuwinH
25 #define visuwinH
26 //---------------------------------------------------------------------------
27 #include <Classes.hpp>
28 #include <Controls.hpp>
29 #include <StdCtrls.hpp>
30 #include <Forms.hpp>
31 #include <Menus.hpp>
32 #include <ActnList.hpp>
33 #include <ComCtrls.hpp>
34 #include <Dialogs.hpp>
35 #include <CheckLst.hpp>
36 #include <gl\gl.h>
37 #include <gl\glu.h>
38 #include "mg_file.h"
39 //---------------------------------------------------------------------------
40 class TVisuWinform : public TForm
41 {
42 __published: // IDE-managed Components
43 TActionList *ActionList1;
44 TAction *lancermagic;
45 TPopupMenu *PopupMenu1;
46 TMenuItem *Dselectionner1;
47 TMenuItem *InverserSelection1;
48 TMenuItem *N1;
49 TMenuItem *Etendre1;
50 TMenuItem *Rduire1;
51 TAction *miseajourmodele;
52 TAction *lancerverimesh;
53 TAction *Changemode;
54 TMainMenu *MainMenu1;
55 TMenuItem *File1;
56 TMenuItem *MenuItem1;
57 TMenuItem *FileExitItem;
58 TMenuItem *Fermer1;
59 TAction *shrinkon;
60 TAction *shrinkoff;
61 TAction *renderfil;
62 TAction *rendershade;
63 TAction *axeon;
64 TAction *axeoff;
65 TAction *qualiteon;
66 TAction *qualiteoff;
67 TAction *renderlight;
68 TAction *noeudon;
69 TAction *noeudoff;
70 TAction *config;
71 TAction *f3;
72 TAction *f4;
73 TAction *xm;
74 TAction *xp;
75 TAction *ym;
76 TAction *yp;
77 TAction *zm;
78 TAction *zp;
79 TMenuItem *Ouvrir1;
80 TMenuItem *Visualisation1;
81 TMenuItem *Editeur1;
82 TMenuItem *Cartedetaille1;
83 TAction *afnoeudon;
84 TAction *afnoeudoff;
85 TAction *afmailleon;
86 TAction *afmailleoff;
87 TPageControl *PageControl1;
88 TTabSheet *TabSheet1;
89 TTabSheet *TabSheet2;
90 TTreeView *TreeView1;
91 TComboBox *ComboBox1;
92 TListBox *ListBox1;
93 TCheckBox *CheckBox1;
94 TLabel *Label1;
95 TLabel *Label2;
96 TLabel *Label3;
97 TTabSheet *TabSheet3;
98 TLabel *Label4;
99 TLabel *Label5;
100 TLabel *Label6;
101 TLabel *Label7;
102 TLabel *Label8;
103 TLabel *Label9;
104 TLabel *Label10;
105 TLabel *Label11;
106 TLabel *Label12;
107 TLabel *Label13;
108 TLabel *Label14;
109 TLabel *Label15;
110 TLabel *Label16;
111 TLabel *Label17;
112 TLabel *Label18;
113 TLabel *Label19;
114 TLabel *Label21;
115 TLabel *Label22;
116 TLabel *Label23;
117 TLabel *Label24;
118 TLabel *Label25;
119 TLabel *Label26;
120 TLabel *Label27;
121 TLabel *Label28;
122 TCheckBox *CheckBox2;
123 TCheckBox *CheckBox3;
124 TMenuItem *N4;
125 TMenuItem *Montrerlaslection1;
126 TMenuItem *Slectionner1;
127 TMenuItem *N5;
128 TMenuItem *ExplorateurMAGIC1;
129 TMenuItem *N6;
130 TMenuItem *Exporter1;
131 TMenuItem *Mesh9820001;
132 TMenuItem *Giref1;
133 TSaveDialog *SaveDialog1;
134 TLabel *Label29;
135 TMenuItem *Mecanique1;
136 TMenuItem *Blocage1;
137 TMenuItem *Force1;
138 TMenuItem *X1;
139 TMenuItem *Y1;
140 TMenuItem *Z1;
141 TMenuItem *Tous1;
142 TMenuItem *X2;
143 TMenuItem *Y2;
144 TMenuItem *Z2;
145 TMenuItem *Matriaux1;
146 TMenuItem *Importer1;
147 TOpenDialog *OpenDialog1;
148 TAction *mailleon;
149 TAction *mailleoff;
150 TPopupMenu *PopupMenu2;
151 TMenuItem *Affichagedumaillage1;
152 TMenuItem *N7;
153 TMenuItem *Noeud1;
154 TMenuItem *Maille1;
155 TMenuItem *N1D1;
156 TMenuItem *N2D1;
157 TMenuItem *N3D1;
158 TMenuItem *N8;
159 TMenuItem *Tous2;
160 TMenuItem *Tous3;
161 TMenuItem *N9;
162 TMenuItem *N1D2;
163 TMenuItem *N2D2;
164 TMenuItem *N3D2;
165 TMenuItem *Aucun1;
166 TMenuItem *Aucun2;
167 TMenuItem *Visualisateurdefront1;
168 TMenuItem *Pression1;
169 TMenuItem *X3;
170 TMenuItem *Y3;
171 TMenuItem *Z3;
172 TMenuItem *Normal1;
173 TMenuItem *ResultatCosmosM1;
174 TLabel *Label20;
175 TAction *lancerg3d;
176 TTabSheet *TabSheet4;
177 TTrackBar *TrackBar2;
178 TTrackBar *TrackBar1;
179 TLabel *Label30;
180 TTrackBar *TrackBar3;
181 TLabel *Label31;
182 TTrackBar *TrackBar4;
183 TLabel *Label32;
184 TTrackBar *TrackBar5;
185 TTrackBar *TrackBar6;
186 TLabel *Label33;
187 TButton *Button1;
188 TButton *Button2;
189 TButton *Button3;
190 TPageControl *PageControl2;
191 TTabSheet *TabSheet5;
192 TButton *Button4;
193 TButton *Button5;
194 TComboBox *ComboBox2;
195 TLabel *Label34;
196 TLabel *Label35;
197 TListBox *ListBox2;
198 TComboBox *ComboBox3;
199 TLabel *Label36;
200 TEdit *Edit1;
201 TTabSheet *TabSheet6;
202 TListBox *ListBox3;
203 TLabel *Label37;
204 TButton *Button6;
205 TButton *Button7;
206 TMenuItem *N11;
207 TMenuItem *Vu1;
208 TMenuItem *Dplacementsimposs1;
209 TMenuItem *X4;
210 TMenuItem *Y4;
211 TMenuItem *Z4;
212 TMenuItem *Solveur1;
213 TMenuItem *Resolution1;
214 TMenuItem *N10;
215 TMenuItem *option1;
216 TMenuItem *Id1;
217 TMenuItem *Numero1;
218 TMenuItem *NumeroOptimise1;
219 TMenuItem *Cartedetaille3;
220 TAction *voirarbre;
221 TMenuItem *Reconstruction1;
222 TMenuItem *N0D1;
223 TMenuItem *GMSH1;
224 TMenuItem *maillagegeometrique1;
225 TMenuItem *MaillageEF1;
226 TTabSheet *TabSheet7;
227 TMenuItem *N12;
228 TMenuItem *N13;
229 TListBox *ListBox4;
230 TButton *Button8;
231 TButton *Button9;
232 TButton *Button10;
233 TAction *qualiteorigine;
234 TCheckListBox *CheckListBox1;
235 TLabel *Label38;
236 void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
237 void __fastcall FormActivate(TObject *Sender);
238 void __fastcall FormDeactivate(TObject *Sender);
239 void __fastcall lancermagicExecute(TObject *Sender);
240 void __fastcall Slectionner1Click(TObject *Sender);
241 void __fastcall Dselectionner1Click(TObject *Sender);
242 void __fastcall InverserSelection1Click(TObject *Sender);
243 void __fastcall Etendre1Click(TObject *Sender);
244 void __fastcall Rduire1Click(TObject *Sender);
245 void __fastcall miseajourmodeleExecute(TObject *Sender);
246 void __fastcall lancerverimeshExecute(TObject *Sender);
247 void __fastcall FormCreate(TObject *Sender);
248 void __fastcall SetPixelFormatDescriptor(void);
249 void __fastcall FormPaint(TObject *Sender);
250 void __fastcall FormResize(TObject *Sender);
251 void __fastcall ChangemodeExecute(TObject *Sender);
252 void __fastcall FormKeyDown(TObject *Sender, WORD &Key,
253 TShiftState Shift);
254 void __fastcall FormMouseWheelDown(TObject *Sender,
255 TShiftState Shift, TPoint &MousePos, bool &Handled);
256 void __fastcall FormMouseWheelUp(TObject *Sender,
257 TShiftState Shift, TPoint &MousePos, bool &Handled);
258 void __fastcall Fermer1Click(TObject *Sender);
259 void __fastcall FormMouseDown(TObject *Sender, TMouseButton Button,
260 TShiftState Shift, int X, int Y);
261 void __fastcall FormMouseUp(TObject *Sender, TMouseButton Button,
262 TShiftState Shift, int X, int Y);
263 void __fastcall FormMouseMove(TObject *Sender, TShiftState Shift,
264 int X, int Y);
265 void __fastcall TreeView1KeyDown(TObject *Sender, WORD &Key,
266 TShiftState Shift);
267 void __fastcall shrinkonExecute(TObject *Sender);
268 void __fastcall shrinkoffExecute(TObject *Sender);
269 void __fastcall renderfilExecute(TObject *Sender);
270 void __fastcall rendershadeExecute(TObject *Sender);
271 void __fastcall axeonExecute(TObject *Sender);
272 void __fastcall axeoffExecute(TObject *Sender);
273 void __fastcall qualiteonExecute(TObject *Sender);
274 void __fastcall qualiteoffExecute(TObject *Sender);
275 void __fastcall renderlightExecute(TObject *Sender);
276 void __fastcall noeudonExecute(TObject *Sender);
277 void __fastcall noeudoffExecute(TObject *Sender);
278 void __fastcall configExecute(TObject *Sender);
279 void __fastcall FileExitItemClick(TObject *Sender);
280 void __fastcall f3Execute(TObject *Sender);
281 void __fastcall f4Execute(TObject *Sender);
282 void __fastcall xmExecute(TObject *Sender);
283 void __fastcall xpExecute(TObject *Sender);
284 void __fastcall ymExecute(TObject *Sender);
285 void __fastcall ypExecute(TObject *Sender);
286 void __fastcall zmExecute(TObject *Sender);
287 void __fastcall zpExecute(TObject *Sender);
288 void __fastcall afnoeudonExecute(TObject *Sender);
289 void __fastcall afnoeudoffExecute(TObject *Sender);
290 void __fastcall afmailleonExecute(TObject *Sender);
291 void __fastcall afmailleoffExecute(TObject *Sender);
292 void __fastcall InitShading(void);
293 void __fastcall ComboBox1Change(TObject *Sender);
294 void __fastcall CheckBox1Click(TObject *Sender);
295 void __fastcall ListBox1Click(TObject *Sender);
296 void __fastcall CheckBox2Click(TObject *Sender);
297 void __fastcall CheckBox2KeyDown(TObject *Sender, WORD &Key,
298 TShiftState Shift);
299 void __fastcall ComboBox1KeyDown(TObject *Sender, WORD &Key,
300 TShiftState Shift);
301 void __fastcall CheckBox1KeyDown(TObject *Sender, WORD &Key,
302 TShiftState Shift);
303 void __fastcall ListBox1KeyDown(TObject *Sender, WORD &Key,
304 TShiftState Shift);
305 void __fastcall CheckBox3Click(TObject *Sender);
306 void __fastcall Temprature2Click(TObject *Sender);
307 void __fastcall Montrerlaslection1Click(TObject *Sender);
308 void __fastcall TreeView1Change(TObject *Sender, TTreeNode *Node);
309 void __fastcall TreeView1Click(TObject *Sender);
310 void __fastcall Mesh9820001Click(TObject *Sender);
311 void __fastcall Giref1Click(TObject *Sender);
312 void __fastcall X1Click(TObject *Sender);
313 void __fastcall Y1Click(TObject *Sender);
314 void __fastcall Z1Click(TObject *Sender);
315 void __fastcall Tous1Click(TObject *Sender);
316 void __fastcall X2Click(TObject *Sender);
317 void __fastcall Y2Click(TObject *Sender);
318 void __fastcall Z2Click(TObject *Sender);
319 void __fastcall Matriaux1Click(TObject *Sender);
320 void __fastcall mailleonExecute(TObject *Sender);
321 void __fastcall mailleoffExecute(TObject *Sender);
322 void __fastcall N1D1Click(TObject *Sender);
323 void __fastcall N2D1Click(TObject *Sender);
324 void __fastcall N3D1Click(TObject *Sender);
325 void __fastcall Tous2Click(TObject *Sender);
326 void __fastcall N1D2Click(TObject *Sender);
327 void __fastcall N2D2Click(TObject *Sender);
328 void __fastcall N3D2Click(TObject *Sender);
329 void __fastcall Tous3Click(TObject *Sender);
330 void __fastcall Aucun1Click(TObject *Sender);
331 void __fastcall Aucun2Click(TObject *Sender);
332 void __fastcall X3Click(TObject *Sender);
333 void __fastcall Y3Click(TObject *Sender);
334 void __fastcall Z3Click(TObject *Sender);
335 void __fastcall Normal1Click(TObject *Sender);
336 void __fastcall ResultatCosmosM1Click(TObject *Sender);
337 void __fastcall lancerg3dExecute(TObject *Sender);
338 void __fastcall TrackBar2Change(TObject *Sender);
339 void __fastcall TrackBar1Change(TObject *Sender);
340 void __fastcall TrackBar3Change(TObject *Sender);
341 void __fastcall TrackBar4Change(TObject *Sender);
342 void __fastcall TrackBar5Change(TObject *Sender);
343 void __fastcall TrackBar6Change(TObject *Sender);
344 void __fastcall Button1Click(TObject *Sender);
345 void __fastcall Button2Click(TObject *Sender);
346 void __fastcall Button3Click(TObject *Sender);
347 void __fastcall Button4Click(TObject *Sender);
348 void __fastcall Button5Click(TObject *Sender);
349 void __fastcall ComboBox2Change(TObject *Sender);
350 void __fastcall Button6Click(TObject *Sender);
351 void __fastcall Button7Click(TObject *Sender);
352 void __fastcall Vu1Click(TObject *Sender);
353 void __fastcall X4Click(TObject *Sender);
354 void __fastcall Y4Click(TObject *Sender);
355 void __fastcall Z4Click(TObject *Sender);
356 void __fastcall Resolution1Click(TObject *Sender);
357 void __fastcall Id1Click(TObject *Sender);
358 void __fastcall Numero1Click(TObject *Sender);
359 void __fastcall NumeroOptimise1Click(TObject *Sender);
360 void __fastcall Cartedetaille3Click(TObject *Sender);
361 void __fastcall voirarbreExecute(TObject *Sender);
362 void __fastcall Reconstruction1Click(TObject *Sender);
363 void __fastcall N0D1Click(TObject *Sender);
364 void __fastcall maillagegeometrique1Click(TObject *Sender);
365 void __fastcall MaillageEF1Click(TObject *Sender);
366 void __fastcall N12Click(TObject *Sender);
367 void __fastcall Button10Click(TObject *Sender);
368 void __fastcall Button9Click(TObject *Sender);
369 void __fastcall Button8Click(TObject *Sender);
370 void __fastcall qualiteorigineExecute(TObject *Sender);
371 void __fastcall CheckListBox1Click(TObject *Sender);
372
373 private: // User declarations
374 HDC hdc;
375 HGLRC hrc;
376 TPL_LISTE_ENTITE<MG_FACE*> lst_face;
377 TPL_LISTE_ENTITE<MG_ARETE*> lst_arete;
378 TPL_LISTE_ENTITE<MG_SOMMET*> lst_sommet;
379 TPL_LISTE_ENTITE<MG_VOLUME*> lst_volume;
380 TPL_LISTE_ENTITE<MG_MAILLAGE*> lst_m1d;
381 TPL_LISTE_ENTITE<MG_MAILLAGE*> lst_m2d;
382 TPL_LISTE_ENTITE<MG_MAILLAGE*> lst_m3d;
383 vector<MG_NOEUD*> lst_noeud;
384 vector<MG_SEGMENT*> lst_segment;
385 vector<MG_TRIANGLE*> lst_triangle;
386 vector<MG_TETRA*> lst_tetra;
387 TPL_LISTE_ENTITE<FEM_MAILLAGE*> lst_m1d_fem;
388 TPL_LISTE_ENTITE<FEM_MAILLAGE*> lst_m2d_fem;
389 TPL_LISTE_ENTITE<FEM_MAILLAGE*> lst_m3d_fem;
390 vector<FEM_NOEUD*> lst_noeud_fem;
391 vector<FEM_SEGMENT*> lst_segment_fem;
392 vector<FEM_TRIANGLE*> lst_triangle_fem;
393 vector<FEM_TETRA*> lst_tetra_fem;
394 void __fastcall transformation(TObject *Sender, WORD &Key,TShiftState Shift);
395
396 void __fastcall initliste(void);
397 int zoom;
398 double dx;
399 double dy;
400 bool debut_trans;
401 int xdepart;
402 int ydepart;
403 int iconeactive;
404 int RGB_r[14];
405 int RGB_g[14];
406 int RGB_b[14];
407 MG_ELEMENT_TOPOLOGIQUE *toposel;
408
409 public: // User declarations
410 __fastcall TVisuWinform(TComponent* Owner);
411 MG_FILE* gest;
412 void __fastcall miseajourarbre(void);
413 void __fastcall changeimage(TTreeNode* node,int num);
414 void __fastcall inverseimage(TTreeNode* node,int num1,int num2);
415 void __fastcall dessinegeo(void);
416 void __fastcall dessinemai(void);
417 void __fastcall dessinemaifem(void);
418 void __fastcall dessinetrifem(FEM_TRIANGLE* femtri,FEM_NOEUD* no1,FEM_NOEUD* no2,FEM_NOEUD* no3);
419 void __fastcall dessinetritetfem(FEM_TETRA* femtet,FEM_NOEUD* no1,FEM_NOEUD* no2,FEM_NOEUD* no3);
420 void __fastcall dessinesegtetfem(FEM_TETRA* femtet,FEM_NOEUD* no1,FEM_NOEUD* no2);
421
422 void __fastcall dessineaxe(void);
423 void __fastcall redess(void);
424 void __fastcall recadre(double dx=0.,double dy=0.,int etat=0);
425 void __fastcall initvue(void);
426 void __fastcall dessine_legende(void);
427 void __fastcall ajouterccf(char* cap,char *type,int val,int sommet,int arete,int face,int volume);
428 int __fastcall estdansfiltre(unsigned long id);
429 vector<MG_VISU_COURBE*> lst_visu;
430 BOITE_3D boite;
431 int shrink;
432 int render;
433 int qualite;
434 int axe;
435 int noeud;
436 int maille;
437 double facteur_shrink;
438 int affnoeud;
439 int affmaille;
440 double lmin;
441 double lmax;
442 int xrot;
443 int yrot;
444 int debut_rot;
445 vector<unsigned long> filtreid;
446
447
448 };
449 //---------------------------------------------------------------------------
450 extern PACKAGE TVisuWinform *VisuWinform;
451 //---------------------------------------------------------------------------
452 #endif