source: flair-dev/tags/0.0.1/include/FlairSimulator/SimuCameraGL.h@ 83

Last change on this file since 83 was 13, checked in by Bayard Gildas, 8 years ago

formatting script + include reformatted

File size: 2.1 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/*!
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
21// before including glext.h
22#define GL_GLEXT_PROTOTYPES
23#include <GL/gl.h>
24
25namespace irr {
26namespace scene {
27class ICameraSceneNode;
28}
29}
30
31namespace flair {
32namespace gui {
33class DoubleSpinBox;
34class Vector3DSpinBox;
35}
36namespace simulator {
37class Model;
38}
39}
40
41namespace flair {
42namespace sensor {
43/*! \class SimuCameraGL
44* \brief Class for a simulation camera
45*
46*/
47class SimuCameraGL : public SimuCamera,
48 public SensorGL,
49 public irr::scene::ISceneNodeAnimator {
50public:
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);
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
63private:
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};
80} // end namespace simulator
81} // end namespace flair
82#endif // SIMUCAMERAGL_H
Note: See TracBrowser for help on using the repository browser.