[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 {
|
---|
[144] | 27 | class IrrlichtDevice;
|
---|
| 28 | namespace scene {
|
---|
| 29 | class ISceneManager;
|
---|
| 30 | class IMeshSceneNode;
|
---|
| 31 | class ITriangleSelector;
|
---|
| 32 | }
|
---|
| 33 | namespace video {
|
---|
| 34 | class IVideoDriver;
|
---|
| 35 | }
|
---|
| 36 | namespace gui {
|
---|
| 37 | class IGUIFont;
|
---|
| 38 | class IGUIEnvironment;
|
---|
| 39 | }
|
---|
[8] | 40 | }
|
---|
| 41 |
|
---|
[15] | 42 | namespace flair {
|
---|
[144] | 43 | namespace core {
|
---|
| 44 | class Object;
|
---|
| 45 | }
|
---|
| 46 | namespace simulator {
|
---|
| 47 | class Model;
|
---|
| 48 | class GenericObject;
|
---|
| 49 | class Gui;
|
---|
| 50 | class VisualizationCamera;
|
---|
| 51 | }
|
---|
[8] | 52 | }
|
---|
| 53 |
|
---|
| 54 | class MyEventReceiver;
|
---|
| 55 |
|
---|
[145] | 56 | class Gui_impl {
|
---|
[15] | 57 | public:
|
---|
| 58 | Gui_impl(flair::simulator::Gui *self, int app_width, int app_height,
|
---|
| 59 | int scene_width, int scene_height, std::string media_path,
|
---|
| 60 | irr::video::E_DRIVER_TYPE driver_type = irr::video::EDT_OPENGL);
|
---|
| 61 | ~Gui_impl();
|
---|
[70] | 62 | void RunGui(std::vector<flair::simulator::Model *> models,
|
---|
[15] | 63 | std::vector<flair::simulator::GenericObject *> objects);
|
---|
| 64 | void setMesh(std::string file,
|
---|
| 65 | irr::core::vector3df position = irr::core::vector3df(0, 0, 0),
|
---|
| 66 | irr::core::vector3df rotation = irr::core::vector3df(0, 0, 0),
|
---|
| 67 | irr::core::vector3df scale = irr::core::vector3df(1, 1, 1));
|
---|
[8] | 68 |
|
---|
[15] | 69 | irr::scene::IMeshSceneNode *node;
|
---|
| 70 | irr::IrrlichtDevice *device;
|
---|
| 71 | std::string media_path;
|
---|
| 72 | irr::video::IVideoDriver *driver;
|
---|
| 73 | irr::scene::ISceneManager *smgr;
|
---|
| 74 | int scene_width, scene_height;
|
---|
[70] | 75 | void AddVisualizationCamera(flair::simulator::VisualizationCamera* camera);
|
---|
[8] | 76 |
|
---|
[15] | 77 | private:
|
---|
| 78 | MyEventReceiver *receiver;
|
---|
| 79 | irr::scene::ITriangleSelector *selector;
|
---|
| 80 | irr::gui::IGUIFont *font;
|
---|
| 81 | irr::gui::IGUIEnvironment *env;
|
---|
[70] | 82 | void setWindowCaption(int cam_id, int fps);
|
---|
[15] | 83 | void takeScreenshot(void);
|
---|
| 84 | hdfile_t *dbtFile_r, *dbtFile_w;
|
---|
| 85 | size_t dbtSize(std::vector<flair::simulator::Model *> modeles);
|
---|
| 86 | char *dbtbuf;
|
---|
| 87 | flair::simulator::Gui *self;
|
---|
[70] | 88 | std::vector<flair::simulator::VisualizationCamera *> cameras;
|
---|
| 89 | flair::simulator::Model *getModelFromVisualizationCamera(std::vector<flair::simulator::Model *> models,flair::simulator::VisualizationCamera *camera);
|
---|
[8] | 90 | };
|
---|
| 91 |
|
---|
| 92 | #endif // GUI_IMPL_H
|
---|