source: flair-dev/tags/0.0.2/include/FlairSimulator/Gui.h

Last change on this file was 34, checked in by Sanahuja Guillaume, 8 years ago

doc

File size: 3.3 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.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
24namespace irr {
25class IrrlichtDevice;
26namespace video {
27class ITexture;
28}
29namespace scene {
30class IAnimatedMesh;
31class ISceneManager;
32}
33}
34
35namespace flair {
36namespace core {
37class Object;
38class Vector3D;
39class Euler;
40class Quaternion;
41}
42}
43
44class Gui_impl;
45class Simulator_impl;
46class Model_impl;
47
48namespace flair {
49namespace simulator {
50class Simulator;
51
52class Gui : public core::Object {
53 friend class ::Simulator_impl;
54 friend class VisualizationCamera;
55
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;
65 irr::IrrlichtDevice *getDevice(void) const;
66 float getAspectRatio(void) const;
67
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));
73
74private:
75 Gui_impl *pimpl_;
76};
77
78/*!
79* \brief get Gui
80*
81* \return the Gui
82*/
83Gui *getGui(void);
84
85bool noGui(void);
86
87bool isGlExtensionSupported(
88 const std::string &ext); // check if a extension is supported
89
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);
98
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);
107
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);
118
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);
129
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);
140
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
152} // end namespace simulator
153} // end namespace flair
154#endif // GUI_H
Note: See TracBrowser for help on using the repository browser.