source: flair-src/trunk/lib/FlairSimulator/src/VisualizationCamera.h@ 469

Last change on this file since 469 was 288, checked in by Sanahuja Guillaume, 6 years ago

added earth frame axis

File size: 1.8 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: 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
25namespace irr {
26 namespace scene {
27 class ICameraSceneNode;
28 }
29 namespace video {
30 class ITexture;
31 }
32 namespace gui {
33 class IGUIFont;
34 }
35}
36
37namespace flair {
38namespace simulator {
39class AxisSceneNode;
40
41class VisualizationCamera : private irr::scene::ISceneNodeAnimator {
42public:
43 VisualizationCamera(std::string name);
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);
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
54private:
55 virtual bool isEventReceiverEnabled(void) const { return true; }
56 irr::scene::ISceneManager *axis_scenemanager;
57 AxisSceneNode *vrpnSceneNode;
58 AxisSceneNode *earthSceneNode;
59
60protected:
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
Note: See TracBrowser for help on using the repository browser.