Changeset 15 in flair-src for trunk/lib/FlairSimulator/src/SimuCameraGL.h
- Timestamp:
- 04/08/16 15:40:57 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairSimulator/src/SimuCameraGL.h
r10 r15 18 18 #include <ISceneNodeAnimator.h> 19 19 20 // in order to get function prototypes from glext.h, define GL_GLEXT_PROTOTYPES before including glext.h 20 // in order to get function prototypes from glext.h, define GL_GLEXT_PROTOTYPES 21 // before including glext.h 21 22 #define GL_GLEXT_PROTOTYPES 22 23 #include <GL/gl.h> 23 24 24 namespace irr 25 { 26 namespace scene 27 { 28 class ICameraSceneNode; 29 } 25 namespace irr { 26 namespace scene { 27 class ICameraSceneNode; 28 } 30 29 } 31 30 32 namespace flair 33 { 34 namespace gui 35 { 36 class DoubleSpinBox; 37 class Vector3DSpinBox; 38 } 39 namespace simulator 40 { 41 class Model; 42 } 31 namespace flair { 32 namespace gui { 33 class DoubleSpinBox; 34 class Vector3DSpinBox; 35 } 36 namespace simulator { 37 class Model; 38 } 43 39 } 44 40 45 namespace flair 46 {47 namespace sensor 48 { 49 /*! \class SimuCameraGL 50 * \brief Class for a simulation camera 51 * 52 */53 class SimuCameraGL : public SimuCamera, public SensorGL, public irr::scene::ISceneNodeAnimator54 { 55 public:56 //top left origin57 SimuCameraGL(const simulator::Model* parent,std::string name,int width,int height,int x,int y,int dev_id);58 59 60 61 41 namespace flair { 42 namespace sensor { 43 /*! \class SimuCameraGL 44 * \brief Class for a simulation camera 45 * 46 */ 47 class SimuCameraGL : public SimuCamera, 48 public SensorGL, 49 public irr::scene::ISceneNodeAnimator { 50 public: 51 // top left origin 52 SimuCameraGL(const simulator::Model *parent, std::string name, int width, 53 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); 62 58 63 64 65 59 //! Sets the value of the far clipping plane (default: 2000.0f) 60 /** \param zf: New z far value. */ 61 void setFarValue(float zf); 66 62 67 private: 68 void UpdateFrom(const core::io_data *data); 69 void animateNode(irr::scene::ISceneNode* node, irr::u32 timeMs); 70 ISceneNodeAnimator* createClone(irr::scene::ISceneNode* node,irr::scene::ISceneManager* newManager=0); 71 void getImage(void); 72 void putImage(char* pixels); 73 irr::scene::ICameraSceneNode* camera; 74 irr::scene::ISceneManager* smgr; 75 gui::Vector3DSpinBox *position,*direction,*up; 76 gui::DoubleSpinBox *fov; 77 int width,height,x,y; 78 char* buffer; 79 bool use_pbo,invert_pixel,disable_output; 80 GLuint *pboIds; 81 int index ; 82 }; 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, 67 irr::scene::ISceneManager *newManager = 0); 68 void getImage(void); 69 void putImage(char *pixels); 70 irr::scene::ICameraSceneNode *camera; 71 irr::scene::ISceneManager *smgr; 72 gui::Vector3DSpinBox *position, *direction, *up; 73 gui::DoubleSpinBox *fov; 74 int width, height, x, y; 75 char *buffer; 76 bool use_pbo, invert_pixel, disable_output; 77 GLuint *pboIds; 78 int index; 79 }; 83 80 } // end namespace simulator 84 81 } // end namespace flair
Note:
See TracChangeset
for help on using the changeset viewer.