ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/app/VMM/VMM/win32/visuwin.h
Revision: 5
Committed: Tue Jun 12 20:26:34 2007 UTC (18 years, 2 months ago)
Content type: text/plain
File size: 17172 byte(s)
Log Message:

File Contents

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