Flair
Framework Libre Air
VisualizationCamera.h
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>
23 #include <string>
24 
25 namespace irr {
26  namespace scene {
27  class ICameraSceneNode;
28  }
29  namespace video {
30  class ITexture;
31  }
32  namespace gui {
33  class IGUIFont;
34  }
35 }
36 
37 namespace flair {
38 namespace simulator {
39 class AxisSceneNode;
40 
41 class VisualizationCamera : private irr::scene::ISceneNodeAnimator {
42 public:
43  VisualizationCamera(std::string name);
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);
50  std::string getName(void);
51  enum class AxisType { vrpn,earth,none};
52  void renderAxisToTexture(irr::video::ITexture* texture,irr::gui::IGUIFont *font,AxisType axisType);
53 
54 private:
55  virtual bool isEventReceiverEnabled(void) const { return true; }
56  irr::scene::ISceneManager *axis_scenemanager;
57  AxisSceneNode *vrpnSceneNode;
58  AxisSceneNode *earthSceneNode;
59 
60 protected:
61  bool LMouseKey;
62  irr::scene::ICameraSceneNode *camera;
63  irr::scene::ICameraSceneNode *axis_camera;
64  irr::core::position2df MousePos;
65  float currentZoom;
66  std::string name;
67 };
68 
69 } // end namespace simulator
70 } // end namespace flair
71 
72 #endif // VISUALIZATIONCAMERA_H
namespace of the flair Framework
Definition: Ahrs.h:19
Definition: VisualizationCamera.h:41
Class defining a 3D vector.
Definition: Blade.h:22