GLcamera.h
Go to the documentation of this file.
1 #ifndef __GLCAMERA_H__
2 #define __GLCAMERA_H__
3 
4 #include <string>
5 #include <vector>
6 #include "GLcoordinates.h"
7 
8 class GLsceneBase;
9 class GLlink;
10 class GLshape;
11 namespace hrp{
12  class VisionSensor;
13 };
14 
15 class GLcamera : public GLcoordinates
16 {
17 public:
18  GLcamera(int i_width, int i_height,
19  double i_near, double i_far, double i_fovy,
20  GLlink *i_link=NULL, int i_id=-1);
21  ~GLcamera();
22  const std::string& name() const;
23  void setView(int w, int h);
24  void setView();
25  void computeAbsTransform(double o_trans[16]);
26  double *getAbsTransform();
27  double near() { return m_near; }
28  double far() { return m_far; }
29  double fovy() { return m_fovy; }
30  unsigned int width() { return m_width; }
31  unsigned int height() { return m_height; }
32  void setViewPoint(double x, double y, double z);
33  void setViewTarget(double x, double y, double z);
34  size_t draw(int i_mode);
35  GLlink *link();
36  void highlight(bool flag);
37  void render(GLsceneBase *i_scene);
38  hrp::VisionSensor *sensor();
39  void addShape(GLshape *i_shape);
40  void name(const std::string &i_name);
41 private:
42  void initFramebuffer( void );
43  void initRenderbuffer( void );
44  void initTexture( void );
45  std::string m_name;
46  double m_absTrans[16];
48  double m_near, m_far, m_fovy;
49  unsigned int m_width, m_height;
50  double m_viewPoint[3], m_viewTarget[3];
51  std::vector<GLshape *> m_shapes;
52  GLuint m_frameBuffer, m_renderBuffer, m_texture;
54  unsigned char *m_colorBuffer;
55 };
56 
57 #endif
unsigned int height()
Definition: GLcamera.h:31
double near()
Definition: GLcamera.h:27
png_infop png_charpp name
GLuint m_texture
Definition: GLcamera.h:52
double m_near
Definition: GLcamera.h:48
std::vector< GLshape * > m_shapes
Definition: GLcamera.h:51
w
double fovy()
Definition: GLcamera.h:29
GLlink * m_link
Definition: GLcamera.h:47
unsigned int width()
Definition: GLcamera.h:30
unsigned int m_width
Definition: GLcamera.h:49
hrp::VisionSensor * m_sensor
Definition: GLcamera.h:53
std::string m_name
Definition: GLcamera.h:45
png_infop png_uint_32 flag
unsigned char * m_colorBuffer
Definition: GLcamera.h:54
double far()
Definition: GLcamera.h:28


hrpsys
Author(s): AIST, Fumio Kanehiro
autogenerated on Sat Dec 17 2022 03:52:20