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);
116 public:
virtual void Update();
179 public:
void SetClipDist(
float _near,
float _far);
196 public:
void SetImageSize(
unsigned int _w,
unsigned int _h);
240 unsigned int _height,
241 const std::string &_format);
248 public:
double GetZValue(
int _x,
int _y);
269 public:
bool SaveFrame(
const std::string &_filename);
324 public:
virtual const unsigned char *
GetImageData(
unsigned int i = 0);
328 public: std::string
GetName()
const;
332 public:
void SetName(
const std::string &_name);
386 bool _inheritOrientation,
387 double _minDist = 0.0,
double _maxDist = 0.0);
391 public:
void TrackVisual(
const std::string &_visualName);
405 public:
template<
typename T>
422 public:
static bool SaveFrame(
const unsigned char *_image,
423 unsigned int _width,
unsigned int _height,
int _depth,
424 const std::string &_format,
425 const std::string &_filename);
442 public:
bool IsVisible(
const std::string &_visualName);
461 boost::function<
void()> _onComplete =
NULL);
486 bool _inheritOrientation,
487 double _minDist = 0,
double _maxDist = 0);
499 bool _inheritOrientation,
500 double _minDist = 0,
double _maxDist = 0);
509 private:
void ConvertRGBToBAYER(
unsigned char *_dst,
unsigned char *_src,
510 std::string _format,
int _width,
int _height);
513 private:
void SetClipDist();
518 private:
static int GetOgrePixelFormat(
const std::string &_format);
525 private:
void CreateCamera();
552 private:
static unsigned int cameraCounter;
553 private:
unsigned int myCount;
564 unsigned int,
unsigned int,
unsigned int,
580 private: Ogre::CompositorInstance *dsGBufferInstance;
581 private: Ogre::CompositorInstance *dsMergeInstance;
583 private: Ogre::CompositorInstance *dlGBufferInstance;
584 private: Ogre::CompositorInstance *dlMergeInstance;
586 private: Ogre::CompositorInstance *ssaoInstance;
588 private: std::deque<std::pair<math::Pose, double> > moveToPositionQueue;