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();
204 public:
void SetImageSize(
unsigned int _w,
unsigned int _h);
248 unsigned int _height,
249 const std::string &_format);
256 public:
double GetZValue(
int _x,
int _y);
277 public:
bool SaveFrame(
const std::string &_filename);
336 public:
virtual const unsigned char *
GetImageData(
unsigned int i = 0);
340 public: std::string
GetName()
const;
344 public:
void SetName(
const std::string &_name);
398 bool _inheritOrientation,
399 double _minDist = 0.0,
double _maxDist = 0.0);
403 public:
void TrackVisual(
const std::string &_visualName);
417 public:
template<
typename T>
434 public:
static bool SaveFrame(
const unsigned char *_image,
435 unsigned int _width,
unsigned int _height,
int _depth,
436 const std::string &_format,
437 const std::string &_filename);
454 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;