22 #ifndef _RENDERING_DEPTHCAMERA_HH_
23 #define _RENDERING_DEPTHCAMERA_HH_
64 ScenePtr _scene,
bool _autoRender =
true);
71 public:
void Load(sdf::ElementPtr _sdf);
84 public:
void CreateDepthTexture(
const std::string &_textureName);
87 public:
virtual void PostRender();
91 public:
virtual const float *GetDepthData();
95 public:
virtual void SetDepthTarget(Ogre::RenderTarget *_target);
100 public:
template<
typename T>
102 {
return newDepthFrame.Connect(_subscriber); }
107 { newDepthFrame.Disconnect(_c); }
112 public:
template<
typename T>
114 {
return newRGBPointCloud.Connect(_subscriber); }
119 { newRGBPointCloud.Disconnect(c); }
123 private:
virtual void RenderImpl();
129 private:
void UpdateRenderTarget(Ogre::RenderTarget *_target,
130 Ogre::Material *_material,
131 const std::string &_matName);
143 private:
float *depthBuffer;
146 private: Ogre::Material *depthMaterial;
149 private:
bool outputPoints;
152 private:
float *pcdBuffer;
155 private: Ogre::Viewport *pcdViewport;
158 private: Ogre::Material *pcdMaterial;
161 private: Ogre::Texture *pcdTexture;
164 private: Ogre::RenderTarget *pcdTarget;
167 private:
event::EventT<void(
const float *,
unsigned int,
unsigned int,
168 unsigned int,
const std::string &)> newRGBPointCloud;
171 private:
event::EventT<void(
const float *,
unsigned int,
unsigned int,
172 unsigned int,
const std::string &)> newDepthFrame;