00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef __grafico3d_
00014 #define __grafico3d_
00015
00016
00017
00018 #include "opzioni3d/Opz3dDlg.h"
00019
00020 #include "../Parser/TParserScomponi.h"
00021 #include "../Parser/TParserValore.h"
00022 #include <wx/glcanvas.h>
00023 #include <GL/gl.h>
00024 #include <GL/glu.h>
00025 #include "ListaFx3D/TLista3D.h"
00026 #include "../BasePanel/TBasePanel.h"
00027
00028 class WxGrafico : public wxGLCanvas
00029 {
00030
00031 public:
00032
00033 long cur_x,cur_y;
00034
00035
00036 char opzAperta;
00037
00038
00039 TLista3D opzioni;
00040 WxGrafico(wxWindow *parent,
00041 const wxSize& size = wxDefaultSize,
00042 int* gl_attrib = NULL,
00043 const wxWindowID id = -1,
00044 const wxPoint& pos = wxDefaultPosition,
00045 long style = 0,
00046 const wxString& name = _T("Grafico 3d")
00047 );
00048
00049 ~WxGrafico(void);
00050
00051
00052
00053
00054
00055 double assex;
00056 double assey;
00057 double assez;
00058
00059 double zoom;
00060
00061
00062 void drawGL(void);
00063 void initGL(void);
00064 void disegna_assi();
00065 void disegna_grafico(pr *funzione_corrente);
00066 void disegna_griglia(float **punti);
00067
00068
00069
00070
00071
00072 void OnPaint(wxPaintEvent& event);
00073 void OnSize(wxSizeEvent& event);
00074 void OnChar(wxKeyEvent& event);
00075 void OnMouseEvent(wxMouseEvent& event);
00076 void GraficoLeftDown(wxMouseEvent& event);
00077 void GraficoRightDown(wxMouseEvent& event);
00078 void OnEraseBackGround(wxEraseEvent& event);
00079
00080 void click_menu_popup_opz(wxCommandEvent& Event);
00081
00083
00086 wxMenu* GetPopUp();
00087
00088
00089 DECLARE_EVENT_TABLE()
00090 private:
00091
00092 wxMenu *Lista3d;
00093
00094 char delta(long x1,long x2);
00095 void ruota_destra(double *assex,double *assey,double *assez);
00096 void ruota_sinistra(double *assex,double *assey,double *assez);
00097 void ruota_su(double *assex,double *assey,double *assez);
00098 void ruota_giu(double *assex,double *assey,double *assez);
00099
00100 };
00101
00102 #endif
00103
00104
00105