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

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

simulator

File size: 2.2 KB
Line 
1/*!
2 * \file SimuCameraGL.h
3 * \brief Class for a simulation camera
4 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
5 * \date 2014/03/07
6 * \version 3.4
7 */
8
9#ifndef SIMUCAMERAGL_H
10#define SIMUCAMERAGL_H
11
12#include <SimuCamera.h>
13#include <SensorGL.h>
14#include <ISceneNodeAnimator.h>
15
16// in order to get function prototypes from glext.h, define GL_GLEXT_PROTOTYPES before including glext.h
17#define GL_GLEXT_PROTOTYPES
18#include <GL/gl.h>
19
20namespace irr
21{
22    namespace scene
23    {
24        class ICameraSceneNode;
25    }
26}
27
28namespace flair
29{
30    namespace gui
31    {
32        class DoubleSpinBox;
33        class Vector3DSpinBox;
34    }
35    namespace simulator
36    {
37        class Model;
38    }
39}
40
41namespace flair
42{
43namespace sensor
44{
45    /*! \class SimuCameraGL
46    * \brief Class for a simulation camera
47    *
48    */
49    class SimuCameraGL : public SimuCamera, public SensorGL, public irr::scene::ISceneNodeAnimator
50    {
51        public:
52            //top left origin
53            SimuCameraGL(const simulator::Model* parent,std::string name,int width,int height,int x,int y,int dev_id);
54            ~SimuCameraGL();
55            //! Sets the value of the near clipping plane. (default: 1.0f)
56            /** \param zn: New z near value. */
57            void setNearValue(float zn);
58
59            //! Sets the value of the far clipping plane (default: 2000.0f)
60            /** \param zf: New z far value. */
61            void setFarValue(float zf);
62
63        private:
64            void UpdateFrom(const core::io_data *data);
65            void animateNode(irr::scene::ISceneNode* node, irr::u32 timeMs);
66            ISceneNodeAnimator* createClone(irr::scene::ISceneNode* node,irr::scene::ISceneManager* newManager=0);
67            void getImage(void);
68            void putImage(char* pixels);
69            irr::scene::ICameraSceneNode* camera;
70            irr::scene::ISceneManager* smgr;
71            gui::Vector3DSpinBox *position,*direction,*up;
72            gui::DoubleSpinBox *fov;
73            int width,height,x,y;
74            char* buffer;
75            bool use_pbo,invert_pixel,disable_output;
76            GLuint *pboIds;
77            int index ;
78    };
79} // end namespace simulator
80} // end namespace flair
81#endif // SIMUCAMERAGL_H
Note: See TracBrowser for help on using the repository browser.