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;
 
Basic camera sensor. 
Definition: Camera.hh:78
event::ConnectionPtr ConnectNewDepthFrame(T _subscriber)
Connect a to the new depth image signal. 
Definition: DepthCamera.hh:101
boost::shared_ptr< Connection > ConnectionPtr
Definition: CommonTypes.hh:144
void DisconnectNewRGBPointCloud(event::ConnectionPtr &c)
Disconnect from an rgb point cloud singal. 
Definition: DepthCamera.hh:118
event::ConnectionPtr ConnectNewRGBPointCloud(T _subscriber)
Connect a to the new rgb point cloud signal. 
Definition: DepthCamera.hh:113
Ogre::Texture * depthTexture
Pointer to the depth texture. 
Definition: DepthCamera.hh:134
boost::shared_ptr< Scene > ScenePtr
Definition: RenderTypes.hh:74
void DisconnectNewDepthFrame(event::ConnectionPtr &_c)
Disconnect from an depth image singal. 
Definition: DepthCamera.hh:106
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message. 
A class for event processing. 
Definition: Event.hh:156
Ogre::Viewport * depthViewport
Pointer to the depth viewport. 
Definition: DepthCamera.hh:140
Ogre::RenderTarget * depthTarget
Pointer to the depth target. 
Definition: DepthCamera.hh:137
Depth camera used to render depth data into an image buffer. 
Definition: DepthCamera.hh:57
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported. 
Definition: system.hh:48