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

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

simulator

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