[10] | 1 | // %flair:license{
|
---|
[15] | 2 | // This file is part of the Flair framework distributed under the
|
---|
| 3 | // CECILL-C License, Version 1.0.
|
---|
[10] | 4 | // %flair:license}
|
---|
[8] | 5 | // created: 2013/03/27
|
---|
| 6 | // filename: Gui_impl.h
|
---|
| 7 | //
|
---|
| 8 | // author: Guillaume Sanahuja
|
---|
| 9 | // Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
| 10 | //
|
---|
| 11 | // version: $Id: $
|
---|
| 12 | //
|
---|
| 13 | // purpose: classe definissant une Gui
|
---|
| 14 | //
|
---|
| 15 | /*********************************************************************/
|
---|
| 16 |
|
---|
| 17 | #ifndef GUI_IMPL_H
|
---|
| 18 | #define GUI_IMPL_H
|
---|
| 19 |
|
---|
| 20 | #include <string>
|
---|
| 21 | #include <vector>
|
---|
| 22 | #include <io_hdfile.h>
|
---|
| 23 | #include <EDriverTypes.h>
|
---|
| 24 | #include <vector3d.h>
|
---|
| 25 |
|
---|
[15] | 26 | namespace irr {
|
---|
| 27 | class IrrlichtDevice;
|
---|
| 28 | namespace scene {
|
---|
| 29 | class ISceneManager;
|
---|
| 30 | class IMeshSceneNode;
|
---|
| 31 | class ITriangleSelector;
|
---|
[8] | 32 | }
|
---|
[15] | 33 | namespace video {
|
---|
| 34 | class IVideoDriver;
|
---|
| 35 | }
|
---|
| 36 | namespace gui {
|
---|
| 37 | class IGUIFont;
|
---|
| 38 | class IGUIEnvironment;
|
---|
| 39 | }
|
---|
| 40 | }
|
---|
[8] | 41 |
|
---|
[15] | 42 | namespace flair {
|
---|
| 43 | namespace core {
|
---|
| 44 | class Object;
|
---|
[8] | 45 | }
|
---|
[15] | 46 | namespace simulator {
|
---|
| 47 | class Model;
|
---|
| 48 | class GenericObject;
|
---|
| 49 | class Gui;
|
---|
| 50 | }
|
---|
| 51 | }
|
---|
[8] | 52 |
|
---|
| 53 | class MyEventReceiver;
|
---|
| 54 |
|
---|
[15] | 55 | class Gui_impl {
|
---|
| 56 | public:
|
---|
| 57 | Gui_impl(flair::simulator::Gui *self, int app_width, int app_height,
|
---|
| 58 | int scene_width, int scene_height, std::string media_path,
|
---|
| 59 | irr::video::E_DRIVER_TYPE driver_type = irr::video::EDT_OPENGL);
|
---|
| 60 | ~Gui_impl();
|
---|
| 61 | void RunGui(std::vector<flair::simulator::Model *> modeles,
|
---|
| 62 | std::vector<flair::simulator::GenericObject *> objects);
|
---|
| 63 | void setMesh(std::string file,
|
---|
| 64 | irr::core::vector3df position = irr::core::vector3df(0, 0, 0),
|
---|
| 65 | irr::core::vector3df rotation = irr::core::vector3df(0, 0, 0),
|
---|
| 66 | irr::core::vector3df scale = irr::core::vector3df(1, 1, 1));
|
---|
[8] | 67 |
|
---|
[15] | 68 | irr::scene::IMeshSceneNode *node;
|
---|
| 69 | irr::IrrlichtDevice *device;
|
---|
| 70 | std::string media_path;
|
---|
| 71 | irr::video::IVideoDriver *driver;
|
---|
| 72 | irr::scene::ISceneManager *smgr;
|
---|
| 73 | int scene_width, scene_height;
|
---|
[8] | 74 |
|
---|
[15] | 75 | private:
|
---|
| 76 | MyEventReceiver *receiver;
|
---|
| 77 | irr::scene::ITriangleSelector *selector;
|
---|
| 78 | irr::gui::IGUIFont *font;
|
---|
| 79 | irr::gui::IGUIEnvironment *env;
|
---|
| 80 | void setWindowCaption(flair::core::Object *object, int fps);
|
---|
| 81 | void takeScreenshot(void);
|
---|
| 82 | hdfile_t *dbtFile_r, *dbtFile_w;
|
---|
| 83 | size_t dbtSize(std::vector<flair::simulator::Model *> modeles);
|
---|
| 84 | char *dbtbuf;
|
---|
| 85 | flair::simulator::Gui *self;
|
---|
[8] | 86 | };
|
---|
| 87 |
|
---|
| 88 | #endif // GUI_IMPL_H
|
---|