[69] | 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: 2016/09/01
|
---|
| 6 | // filename: VisualizationCamera.h
|
---|
| 7 | //
|
---|
| 8 | // author: Guillaume Sanahuja
|
---|
| 9 | // Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
| 10 | //
|
---|
| 11 | // version: $Id: $
|
---|
| 12 | //
|
---|
| 13 | // purpose: cclass for a visualization camera in the gui
|
---|
| 14 | //
|
---|
| 15 | /*********************************************************************/
|
---|
| 16 |
|
---|
| 17 | #ifndef VISUALIZATIONCAMERA_H
|
---|
| 18 | #define VISUALIZATIONCAMERA_H
|
---|
| 19 |
|
---|
| 20 | #include <ISceneNodeAnimator.h>
|
---|
| 21 | #include <position2d.h>
|
---|
| 22 | #include <Vector3D.h>
|
---|
[70] | 23 | #include <string>
|
---|
[69] | 24 |
|
---|
| 25 | namespace irr {
|
---|
| 26 | namespace scene {
|
---|
| 27 | class ICameraSceneNode;
|
---|
| 28 | }
|
---|
[286] | 29 | namespace video {
|
---|
| 30 | class ITexture;
|
---|
| 31 | }
|
---|
[288] | 32 | namespace gui {
|
---|
| 33 | class IGUIFont;
|
---|
| 34 | }
|
---|
[69] | 35 | }
|
---|
| 36 |
|
---|
| 37 | namespace flair {
|
---|
| 38 | namespace simulator {
|
---|
[288] | 39 | class AxisSceneNode;
|
---|
[69] | 40 |
|
---|
| 41 | class VisualizationCamera : private irr::scene::ISceneNodeAnimator {
|
---|
| 42 | public:
|
---|
[70] | 43 | VisualizationCamera(std::string name);
|
---|
[69] | 44 | ~VisualizationCamera();
|
---|
| 45 |
|
---|
| 46 | ISceneNodeAnimator *createClone(irr::scene::ISceneNode *node,
|
---|
| 47 | irr::scene::ISceneManager *newManager = 0);
|
---|
| 48 | virtual bool OnEvent(const irr::SEvent& event);
|
---|
| 49 | irr::scene::ICameraSceneNode *getCameraSceneNode(void);
|
---|
[70] | 50 | std::string getName(void);
|
---|
[288] | 51 | enum class AxisType { vrpn,earth,none};
|
---|
| 52 | void renderAxisToTexture(irr::video::ITexture* texture,irr::gui::IGUIFont *font,AxisType axisType);
|
---|
[69] | 53 |
|
---|
| 54 | private:
|
---|
| 55 | virtual bool isEventReceiverEnabled(void) const { return true; }
|
---|
[286] | 56 | irr::scene::ISceneManager *axis_scenemanager;
|
---|
[288] | 57 | AxisSceneNode *vrpnSceneNode;
|
---|
| 58 | AxisSceneNode *earthSceneNode;
|
---|
[287] | 59 |
|
---|
[69] | 60 | protected:
|
---|
| 61 | bool LMouseKey;
|
---|
| 62 | irr::scene::ICameraSceneNode *camera;
|
---|
[286] | 63 | irr::scene::ICameraSceneNode *axis_camera;
|
---|
[69] | 64 | irr::core::position2df MousePos;
|
---|
| 65 | float currentZoom;
|
---|
[70] | 66 | std::string name;
|
---|
[69] | 67 | };
|
---|
| 68 |
|
---|
| 69 | } // end namespace simulator
|
---|
| 70 | } // end namespace flair
|
---|
| 71 |
|
---|
| 72 | #endif // VISUALIZATIONCAMERA_H
|
---|