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

Last change on this file since 70 was 70, checked in by Sanahuja Guillaume, 6 years ago

simu cameras

File size: 2.5 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 {
27class IrrlichtDevice;
28namespace scene {
29class ISceneManager;
30class IMeshSceneNode;
31class ITriangleSelector;
32}
33namespace video {
34class IVideoDriver;
35}
36namespace gui {
37class IGUIFont;
38class IGUIEnvironment;
39}
40}
41
42namespace flair {
43namespace core {
44class Object;
45}
46namespace simulator {
47class Model;
48class GenericObject;
49class Gui;
50class VisualizationCamera;
51}
52}
53
54class MyEventReceiver;
55
56class Gui_impl {
57public:
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();
62 void RunGui(std::vector<flair::simulator::Model *> models,
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));
68
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;
75 void AddVisualizationCamera(flair::simulator::VisualizationCamera* camera);
76
77private:
78 MyEventReceiver *receiver;
79 irr::scene::ITriangleSelector *selector;
80 irr::gui::IGUIFont *font;
81 irr::gui::IGUIEnvironment *env;
82 void setWindowCaption(int cam_id, int fps);
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;
88 std::vector<flair::simulator::VisualizationCamera *> cameras;
89 flair::simulator::Model *getModelFromVisualizationCamera(std::vector<flair::simulator::Model *> models,flair::simulator::VisualizationCamera *camera);
90};
91
92#endif // GUI_IMPL_H
Note: See TracBrowser for help on using the repository browser.