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

Last change on this file since 12 was 9, checked in by Sanahuja Guillaume, 9 years ago

lic

File size: 2.3 KB
RevLine 
[9]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}
[8]5/*!
6 * \file SimuCameraGL.h
7 * \brief Class for a simulation camera
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2014/03/07
10 * \version 3.4
11 */
12
13#ifndef SIMUCAMERAGL_H
14#define SIMUCAMERAGL_H
15
16#include <SimuCamera.h>
17#include <SensorGL.h>
18#include <ISceneNodeAnimator.h>
19
20// in order to get function prototypes from glext.h, define GL_GLEXT_PROTOTYPES before including glext.h
21#define GL_GLEXT_PROTOTYPES
22#include <GL/gl.h>
23
24namespace irr
25{
26 namespace scene
27 {
28 class ICameraSceneNode;
29 }
30}
31
32namespace flair
33{
34 namespace gui
35 {
36 class DoubleSpinBox;
37 class Vector3DSpinBox;
38 }
39 namespace simulator
40 {
41 class Model;
42 }
43}
44
45namespace flair
46{
47namespace sensor
48{
49 /*! \class SimuCameraGL
50 * \brief Class for a simulation camera
51 *
52 */
53 class SimuCameraGL : public SimuCamera, public SensorGL, public irr::scene::ISceneNodeAnimator
54 {
55 public:
56 //top left origin
57 SimuCameraGL(const simulator::Model* parent,std::string name,int width,int height,int x,int y,int dev_id);
58 ~SimuCameraGL();
59 //! Sets the value of the near clipping plane. (default: 1.0f)
60 /** \param zn: New z near value. */
61 void setNearValue(float zn);
62
63 //! Sets the value of the far clipping plane (default: 2000.0f)
64 /** \param zf: New z far value. */
65 void setFarValue(float zf);
66
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 };
83} // end namespace simulator
84} // end namespace flair
85#endif // SIMUCAMERAGL_H
Note: See TracBrowser for help on using the repository browser.