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>
80 public:
Camera(
const std::string &_namePrefix,
Scene *_scene,
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);
328 public:
virtual const unsigned char *
GetImageData(
unsigned int i = 0);
332 public: std::string
GetName()
const;
336 public:
void SetName(
const std::string &_name);
390 bool _inheritOrientation,
391 double _minDist = 0.0,
double _maxDist = 0.0);
395 public:
void TrackVisual(
const std::string &_visualName);
409 public:
template<
typename T>
426 public:
static bool SaveFrame(
const unsigned char *_image,
427 unsigned int _width,
unsigned int _height,
int _depth,
428 const std::string &_format,
429 const std::string &_filename);
446 public:
bool IsVisible(
const std::string &_visualName);
468 boost::function<
void()> _onComplete =
NULL);
493 bool _inheritOrientation,
494 double _minDist = 0,
double _maxDist = 0);
506 bool _inheritOrientation,
507 double _minDist = 0,
double _maxDist = 0);
516 private:
void ConvertRGBToBAYER(
unsigned char *_dst,
unsigned char *_src,
517 std::string _format,
int _width,
int _height);
520 private:
void SetClipDist();
525 private:
static int GetOgrePixelFormat(
const std::string &_format);
532 private:
void CreateCamera();
559 private:
static unsigned int cameraCounter;
560 private:
unsigned int myCount;
571 unsigned int,
unsigned int,
unsigned int,
587 private: Ogre::CompositorInstance *dsGBufferInstance;
588 private: Ogre::CompositorInstance *dsMergeInstance;
590 private: Ogre::CompositorInstance *dlGBufferInstance;
591 private: Ogre::CompositorInstance *dlMergeInstance;
593 private: Ogre::CompositorInstance *ssaoInstance;
595 private: std::deque<std::pair<math::Pose, double> > moveToPositionQueue;