source: flair-src/trunk/lib/FlairSimulator/src/Gui.h@ 100

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

simu cameras

File size: 3.3 KB
RevLine 
[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.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_H
18#define GUI_H
19
20#include <Object.h>
21#include <EDriverTypes.h>
22#include <vector3d.h>
23
[15]24namespace irr {
25class IrrlichtDevice;
26namespace video {
27class ITexture;
[8]28}
[15]29namespace scene {
30class IAnimatedMesh;
31class ISceneManager;
32}
33}
[8]34
[15]35namespace flair {
36namespace core {
37class Object;
38class Vector3D;
39class Euler;
40class Quaternion;
[8]41}
[15]42}
[8]43
44class Gui_impl;
45class Simulator_impl;
46class Model_impl;
47
[15]48namespace flair {
49namespace simulator {
50class Simulator;
[8]51
[15]52class Gui : public core::Object {
53 friend class ::Simulator_impl;
[70]54 friend class VisualizationCamera;
[8]55
[15]56public:
57 Gui(const Simulator *parent, std::string name, 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();
61 irr::core::vector3df getRotation(void) const;
62 irr::video::ITexture *getTexture(std::string filename) const;
63 irr::scene::IAnimatedMesh *getMesh(std::string filename) const;
64 irr::scene::ISceneManager *getSceneManager(void) const;
[69]65 irr::IrrlichtDevice *getDevice(void) const;
[15]66 float getAspectRatio(void) const;
[8]67
[15]68protected:
69 void setMesh(std::string file,
70 irr::core::vector3df position = irr::core::vector3df(0, 0, 0),
71 irr::core::vector3df rotation = irr::core::vector3df(0, 0, 0),
72 irr::core::vector3df scale = irr::core::vector3df(1, 1, 1));
[8]73
[15]74private:
75 Gui_impl *pimpl_;
76};
[8]77
[15]78/*!
79* \brief get Gui
80*
81* \return the Gui
82*/
83Gui *getGui(void);
[8]84
[15]85bool noGui(void);
[8]86
[15]87bool isGlExtensionSupported(
88 const std::string &ext); // check if a extension is supported
[8]89
[15]90/*!
91* \brief Convert to irrlicht scale
92*
93* \param value value in simulator scale
94*
95* \return value in irrlicht scale
96*/
97float ToIrrlichtScale(float value);
[8]98
[15]99/*!
100* \brief Convert to simulator scale
101*
102* \param value value in irrlicht scale
103*
104* \return value in simulator scale
105*/
106float ToSimulatorScale(float value);
[8]107
[15]108/*!
109* \brief Convert to irrlicht coordinates
110*
111* irrlicht is left handed and as a different scale
112*
113* \param vect vector in simulator coordinates
114*
115* \return vector in irrlicht coordinates
116*/
117irr::core::vector3df ToIrrlichtCoordinates(irr::core::vector3df vect);
[8]118
[15]119/*!
120* \brief Convert to irrlicht coordinates
121*
122* irrlicht is left handed and as a different scale
123*
124* \param vect vector in simulator coordinates
125*
126* \return vector in irrlicht coordinates
127*/
128irr::core::vector3df ToIrrlichtCoordinates(core::Vector3D vect);
[8]129
[15]130/*!
131* \brief Convert to simulator coordinates
132*
133* irrlicht is left handed and as a different scale
134*
135* \param vect vector in irrlicht coordinates
136*
137* \return vector in simulator coordinates
138*/
139core::Vector3D ToSimulatorCoordinates(irr::core::vector3df vect);
[8]140
[15]141/*!
142* \brief Convert to irrlicht orientation
143*
144* irrlicht is left handed
145*
146* \param quat quaternion in simulator frame
147*
148* \return quaternion in irrlicht frame
149*/
150core::Quaternion ToIrrlichtOrientation(core::Quaternion quat);
151
[8]152} // end namespace simulator
153} // end namespace flair
154#endif // GUI_H
Note: See TracBrowser for help on using the repository browser.