source: flair-src/trunk/lib/FlairSimulator/src/unexported/Gui_impl.h@ 144

Last change on this file since 144 was 144, checked in by Bayard Gildas, 7 years ago

Go!

File size: 2.6 KB
Line 
1// %flair:license{
2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
4// %flair:license}
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
26namespace irr {
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 }
40}
41
42namespace flair {
43 namespace core {
44 class Object;
45 class IODevice;
46 }
47 namespace simulator {
48 class Model;
49 class GenericObject;
50 class Gui;
51 class VisualizationCamera;
52 }
53}
54
55class MyEventReceiver;
56
57class Gui_impl:public IODevice {
58public:
59 Gui_impl(flair::simulator::Gui *self, int app_width, int app_height,
60 int scene_width, int scene_height, std::string media_path,
61 irr::video::E_DRIVER_TYPE driver_type = irr::video::EDT_OPENGL);
62 ~Gui_impl();
63 void RunGui(std::vector<flair::simulator::Model *> models,
64 std::vector<flair::simulator::GenericObject *> objects);
65 void setMesh(std::string file,
66 irr::core::vector3df position = irr::core::vector3df(0, 0, 0),
67 irr::core::vector3df rotation = irr::core::vector3df(0, 0, 0),
68 irr::core::vector3df scale = irr::core::vector3df(1, 1, 1));
69
70 irr::scene::IMeshSceneNode *node;
71 irr::IrrlichtDevice *device;
72 std::string media_path;
73 irr::video::IVideoDriver *driver;
74 irr::scene::ISceneManager *smgr;
75 int scene_width, scene_height;
76 void AddVisualizationCamera(flair::simulator::VisualizationCamera* camera);
77
78private:
79 MyEventReceiver *receiver;
80 irr::scene::ITriangleSelector *selector;
81 irr::gui::IGUIFont *font;
82 irr::gui::IGUIEnvironment *env;
83 void setWindowCaption(int cam_id, int fps);
84 void takeScreenshot(void);
85 hdfile_t *dbtFile_r, *dbtFile_w;
86 size_t dbtSize(std::vector<flair::simulator::Model *> modeles);
87 char *dbtbuf;
88 flair::simulator::Gui *self;
89 std::vector<flair::simulator::VisualizationCamera *> cameras;
90 flair::simulator::Model *getModelFromVisualizationCamera(std::vector<flair::simulator::Model *> models,flair::simulator::VisualizationCamera *camera);
91};
92
93#endif // GUI_IMPL_H
Note: See TracBrowser for help on using the repository browser.