source: flair-dev/trunk/include/FlairSimulator/Gui.h@ 12

Last change on this file since 12 was 9, checked in by Sanahuja Guillaume, 9 years ago

lic

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