22 #ifndef _RENDERING_CAMERA_HH_
23 #define _RENDERING_CAMERA_HH_
25 #include <boost/enable_shared_from_this.hpp>
40 #include "msgs/MessageTypes.hh"
53 class CompositorInstance;
74 class Camera :
public boost::enable_shared_from_this<Camera>
81 bool _autoRender =
true);
91 public:
virtual void Load();
94 public:
virtual void Init();
120 public:
virtual void Update();
125 public:
virtual void Fini();
183 public:
void SetClipDist(
float _near,
float _far);
200 public:
void SetImageSize(
unsigned int _w,
unsigned int _h);
244 unsigned int _height,
245 const std::string &_format);
252 public:
double GetZValue(
int _x,
int _y);
273 public:
bool SaveFrame(
const std::string &_filename);
332 public:
virtual const unsigned char *
GetImageData(
unsigned int i = 0);
336 public: std::string
GetName()
const;
340 public:
void SetName(
const std::string &_name);
394 bool _inheritOrientation,
395 double _minDist = 0.0,
double _maxDist = 0.0);
399 public:
void TrackVisual(
const std::string &_visualName);
413 public:
template<
typename T>
430 public:
static bool SaveFrame(
const unsigned char *_image,
431 unsigned int _width,
unsigned int _height,
int _depth,
432 const std::string &_format,
433 const std::string &_filename);
450 public:
bool IsVisible(
const std::string &_visualName);
475 boost::function<
void()> _onComplete =
NULL);
500 bool _inheritOrientation,
501 double _minDist = 0,
double _maxDist = 0);
513 bool _inheritOrientation,
514 double _minDist = 0,
double _maxDist = 0);
531 private:
void ConvertRGBToBAYER(
unsigned char *_dst,
unsigned char *_src,
532 std::string _format,
int _width,
int _height);
535 private:
void SetClipDist();
540 private:
static int GetOgrePixelFormat(
const std::string &_format);
544 private:
void CreateCamera();
611 unsigned int,
unsigned int,
unsigned int,
639 private:
static unsigned int cameraCounter;
642 private: Ogre::CompositorInstance *dsGBufferInstance;
645 private: Ogre::CompositorInstance *dsMergeInstance;
648 private: Ogre::CompositorInstance *dlGBufferInstance;
651 private: Ogre::CompositorInstance *dlMergeInstance;
654 private: Ogre::CompositorInstance *ssaoInstance;
657 private: std::deque<std::pair<math::Pose, double> > moveToPositionQueue;