GLcamera.h
Go to the documentation of this file.
00001 #ifndef __GLCAMERA_H__
00002 #define __GLCAMERA_H__
00003 
00004 #include <string>
00005 #include <vector>
00006 #include "GLcoordinates.h"
00007 
00008 class GLsceneBase;
00009 class GLlink;
00010 class GLshape;
00011 namespace hrp{
00012     class VisionSensor;
00013 };
00014 
00015 class GLcamera : public GLcoordinates
00016 {
00017 public:
00018     GLcamera(int i_width, int i_height, 
00019              double i_near, double i_far, double i_fovy, 
00020              GLlink *i_link=NULL, int i_id=-1);
00021     ~GLcamera();
00022     const std::string& name() const;
00023     void setView(int w, int h);
00024     void setView();
00025     void computeAbsTransform(double o_trans[16]);
00026     double *getAbsTransform();
00027     double near() { return m_near; }
00028     double far() { return m_far; }
00029     double fovy() { return m_fovy; }
00030     unsigned int width() { return m_width; }
00031     unsigned int height() { return m_height; }
00032     void setViewPoint(double x, double y, double z);
00033     void setViewTarget(double x, double y, double z);
00034     size_t draw(int i_mode);
00035     GLlink *link();
00036     void highlight(bool flag);
00037     void render(GLsceneBase *i_scene);
00038     hrp::VisionSensor *sensor();
00039     void addShape(GLshape *i_shape);
00040     void name(const std::string &i_name);
00041 private:
00042     void initFramebuffer( void );
00043     void initRenderbuffer( void );
00044     void initTexture( void );
00045     std::string m_name;
00046     double m_absTrans[16];
00047     GLlink *m_link;
00048     double m_near, m_far, m_fovy;
00049     unsigned int m_width, m_height;
00050     double m_viewPoint[3], m_viewTarget[3];
00051     std::vector<GLshape *> m_shapes;
00052     GLuint m_frameBuffer, m_renderBuffer, m_texture;
00053     hrp::VisionSensor *m_sensor;
00054     unsigned char *m_colorBuffer;
00055 };
00056 
00057 #endif


hrpsys
Author(s): AIST, Fumio Kanehiro
autogenerated on Wed May 15 2019 05:02:17