18 #ifndef GZ_RENDERING_OGRE_OGREDEPTHCAMERA_HH_
19 #define GZ_RENDERING_OGRE_OGREDEPTHCAMERA_HH_
41 #include "gz/common/Event.hh"
42 #include "gz/common/Console.hh"
57 inline namespace GZ_RENDERING_VERSION_NAMESPACE {
60 class OgreDepthCameraPrivate;
65 class GZ_RENDERING_OGRE_VISIBLE OgreDepthCamera :
67 public virtual BaseDepthCamera<OgreSensor>,
68 public virtual OgreObjectInterface
71 protected: OgreDepthCamera();
74 public:
virtual ~OgreDepthCamera();
77 public:
virtual void Init()
override;
80 public:
virtual void CreateDepthTexture()
override;
84 protected:
void DestroyDepthTexture();
87 public:
virtual void PostRender()
override;
91 public:
virtual const float *DepthData()
const override;
98 unsigned int,
const std::string &)> _subscriber)
override;
104 std::function<
void(
const float *,
unsigned int,
unsigned int,
105 unsigned int,
const std::string &)> _subscriber)
override;
108 public:
virtual void PreRender()
override;
111 public:
virtual void Render()
override;
115 public:
virtual void SetFarClipPlane(
const double _far)
override;
119 public:
virtual void SetNearClipPlane(
const double _near)
override;
124 public:
double NearClipPlane()
const override;
129 public:
double FarClipPlane()
const override;
132 public:
virtual void Destroy()
override;
135 public:
virtual Ogre::Camera *Camera()
const override;
142 Ogre::Material *_material,
153 protected:
static double LimitFOV(
const double _fov);
156 protected:
void CreateCamera();
159 private:
void CreatePointCloudTexture();
163 protected:
void DestroyPointCloudTexture();
166 protected:
bool newData =
false;
168 protected:
bool captureData =
false;
174 protected: Ogre::Viewport *depthViewport =
nullptr;