[34] | 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 | }
|
---|
[94] | 29 | namespace video {
|
---|
| 30 | class ITexture;
|
---|
| 31 | }
|
---|
[34] | 32 | }
|
---|
| 33 |
|
---|
| 34 | namespace flair {
|
---|
| 35 | namespace simulator {
|
---|
| 36 |
|
---|
| 37 | class VisualizationCamera : private irr::scene::ISceneNodeAnimator {
|
---|
| 38 | public:
|
---|
| 39 | VisualizationCamera(std::string name);
|
---|
| 40 | ~VisualizationCamera();
|
---|
| 41 |
|
---|
| 42 | ISceneNodeAnimator *createClone(irr::scene::ISceneNode *node,
|
---|
| 43 | irr::scene::ISceneManager *newManager = 0);
|
---|
| 44 | virtual bool OnEvent(const irr::SEvent& event);
|
---|
| 45 | irr::scene::ICameraSceneNode *getCameraSceneNode(void);
|
---|
| 46 | std::string getName(void);
|
---|
[94] | 47 | void renderAxisToTexture(irr::video::ITexture* texture);
|
---|
[34] | 48 |
|
---|
| 49 | private:
|
---|
| 50 | virtual bool isEventReceiverEnabled(void) const { return true; }
|
---|
[94] | 51 | irr::scene::ISceneNode *nodeX,*nodeY,*nodeZ;
|
---|
| 52 | irr::scene::ISceneManager *axis_scenemanager;
|
---|
| 53 |
|
---|
[34] | 54 | protected:
|
---|
| 55 | bool LMouseKey;
|
---|
| 56 | irr::scene::ICameraSceneNode *camera;
|
---|
[94] | 57 | irr::scene::ICameraSceneNode *axis_camera;
|
---|
[34] | 58 | irr::core::position2df MousePos;
|
---|
| 59 | float currentZoom;
|
---|
| 60 | std::string name;
|
---|
| 61 | };
|
---|
| 62 |
|
---|
| 63 | } // end namespace simulator
|
---|
| 64 | } // end namespace flair
|
---|
| 65 |
|
---|
| 66 | #endif // VISUALIZATIONCAMERA_H
|
---|