[╯°□°]╯︵┻━┻
Goldberg Simulator 20000
 All Classes Functions Variables
OpenGLView.h
00001 #ifndef PRJ_OPENGLVIEW_H
00002 #define PRJ_OPENGLVIEW_H
00003 
00004 #include <stdlib.h>
00005 
00006 #include "Universe.h"
00007 #include "Camera.h"
00008 //#include <wx/mediactrl.h>
00009 //#include <wx/sound.h>
00010 //#include "Sound.h"
00011 #include <wx/mediactrl.h>
00012 #include <wx/string.h>
00013 #include <cstring>
00014 #include <wx/utils.h>
00015 #include <wx/defs.h>
00016 //#include <wx/mousestate.h>
00017 #include <wx/event.h>
00018 //#include <AL>
00019 #include "XmlParser.h"
00020 
00021 class Fenetre;
00022 
00023 
00024 class OpenGLView : public wxGLCanvas{
00025 public:
00026         OpenGLView(Fenetre* parent, wxSize const& taille = wxDefaultSize, wxPoint const& position = wxDefaultPosition);
00027         virtual ~OpenGLView() {SetCursor( wxNullCursor );}
00028 
00029         void InitOpenGL();
00030 
00031 protected:
00032         
00033         Fenetre* parent;
00034         void draw(wxPaintEvent& evenement);
00035         void OnSize(wxSizeEvent& evenement);
00036         void OnMouseButton(wxMouseEvent& event);
00037         void OnMouseMotion(wxMouseEvent& event);
00038         void OnKeyDown(wxKeyEvent& evenement);
00039         void OnKeyUp(wxKeyEvent& evenement);
00040         void OnEnterWindow(wxMouseEvent& evenement) { SetFocus(); }
00041         void OnTimer(wxTimerEvent& event);
00042         Camera cam;
00043         void cameraTerminal();
00044 
00045 private:
00046         //Universe universe;
00047         bool infoPLUS;
00048         bool light;
00049         bool EPILEPTIK;
00050         bool dispInformation;
00051         bool dispFace;
00052         bool simulationOn;
00053         set<Obj*> superTabObj;//sera vide car rien en dehors de l'univers
00054         set<ObjC*> superTabCharg;//idem
00055         System mainSys;
00056 
00057         void choosePreset(int const& choice);
00058         
00059         vector<int> selectTool;
00060         
00061         bool mouseMod;
00062         bool stereoscopy;
00063         double compteurTimer;
00064         int xmouse;
00065         int ymouse;
00066 
00067         wxTimer* timer;// le "Timer"
00068         static int TIMER_ID;
00069 
00070 DECLARE_EVENT_TABLE()
00071 };
00072 
00073 
00074 
00075 // ======================================================================
00076 class Fenetre: public wxFrame{
00077 public:
00078   Fenetre(wxString const& titre, wxSize const& taille = wxDefaultSize, wxPoint const& position = wxDefaultPosition, long style = wxDEFAULT_FRAME_STYLE);
00079   virtual ~Fenetre() {}
00080 protected:
00081   void OnExit(wxCommandEvent& event) { Close(true); }
00082   OpenGLView* fogl;
00083 DECLARE_EVENT_TABLE()
00084 };
00085 
00086 
00087 
00088 
00089 
00090 
00091 
00092 #endif