Changeset 113 in Sophya for trunk/SophyaPI/PI/pi3ddrw.h
- Timestamp:
- Jul 2, 1998, 7:20:09 PM (27 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PI/pi3ddrw.h
r111 r113 1 #ifndef PI3DDRW_H_SEEN 2 #define PI3DDRW_H_SEEN 1 // Module PI : Peida Interactive PIDrawer3D PIDraw3DWdg 2 // Drawer et DrawWidget 3D R. Ansari 06/98 3 // LAL (Orsay) / IN2P3-CNRS DAPNIA/SPP (Saclay) / CEA 4 5 #ifndef PIDRW3D_H_SEEN 6 #define PIDRW3D_H_SEEN 7 8 #include "pisysdep.h" 3 9 #include "pidrawer.h" 4 class PI3DDrawer : PIDrawer 10 #include "pigraph3d.h" 11 12 #include PIBWDG_H 13 14 #include <list> 15 16 // Traceur (Drawer) 3D 17 class PIDrawer3D : public PIDrawer 5 18 { 6 PI3DDrawer(); 7 virtual ~PI3DDrawer(); 19 public : 20 PIDrawer3D(); 21 virtual ~PIDrawer3D(); 22 23 virtual void Set3DView_Obs(float xo, float yo, float zo, float teta, float phi, float psi, 24 float dax, float day, float co, float dco=0.2); 25 virtual void Set3DView(float xc, float yc, float zc, float xo, float yo, float zo, 26 float dax, float day, float dco=0.2, float psi=0.); 27 bool Get3DView(float& xc, float& yc, float& zc, float& xo, float& yo, float& zo, 28 float& teta, float& phi, float& psi, float& dax, float& day, float& co, float& dco); 29 30 virtual PIGraphicUC* SetDrwWdg(PIBaseWdgGen* drw, int x0, int y0, int dx, int dy, PIGraphicGen* g); 31 32 protected : 33 float xO, yO, zO; // Position observateur = camera 34 float xC, yC, zC; // Position centre du champ 35 float tO,fO,pO; // Orientation observateur (Teta, Phi, Psi, Angles d Euler) 36 float daxO, dayO; // Demi-ouverture de la camera suivant les deux axes de projection (xp/zp, yp/zp) 37 float lCO, dlCO; // Distance Camera-Centre du champ et profondeur de champ 38 bool v3D_obs; // Si defini par Set3DView_Obs 8 39 }; 40 41 42 43 class PIDraw3DWdg : public PIBaseWdg { 44 public: 45 enum {ClassId = 5500}; 46 47 PIDraw3DWdg(PIContainerGen *par, char *nom, 48 int sx=100, int sy=100, int px=0, int py=0); 49 virtual ~PIDraw3DWdg(); 50 virtual long kind() {return ClassId; } 51 52 virtual void Set3DView_Obs(float xo, float yo, float zo, float teta, float phi, float psi, 53 float dax, float day, float co, float dco=0.2); 54 virtual void Set3DView(float xc, float yc, float zc, float xo, float yo, float zo, 55 float dax, float day, float dco=0.2, float psi=0.); 56 bool Get3DView(float& xc, float& yc, float& zc, float& xo, float& yo, float& zo, 57 float& teta, float& phi, float& psi, float& dax, float& day, float& co, float& dco); 58 59 int AddDrawer3D(PIDrawer3D*, bool ad=false); // Ajoute un Drawer 60 61 // Pour tenir trace des Drawers-3D qui sont detruits 62 virtual void RemoveDrawer(int id); 63 virtual void DeleteDrawers(); 64 65 virtual void But1Press(int x, int y); 66 virtual void But1Release(int x, int y); 67 virtual void Ptr1Move(int x, int y); 68 69 virtual void But2Press(int x, int y); 70 virtual void But2Release(int x, int y); 71 virtual void Ptr2Move(int x, int y); 72 73 virtual void But3Press(int x, int y); 74 75 protected : 76 virtual void Update3DView(); 77 virtual void DrawXYZAxes(); 78 79 bool vfixed; // SetView fait ou pas 80 list<int> m3DrIl; // Liste des Id drawers 3D 81 PIGraphic3D* mGr3d; // PIGraphic3D courante 82 int lPx, lPy; // dernier position pointeur 83 PIColors lCol; // Couleur 84 float cTeta, cPhi, cUlen; // Pour garder valeurs avant rotation, Unite de longeur 85 float clCO, cDax, cDay; // Pour garder les valeurs avant Zoom In/Out 86 }; 87 9 88 #endif
Note:
See TracChangeset
for help on using the changeset viewer.