Go to the documentation of this file.
18 #ifndef GZ_RENDERING_OGRE_OGREDEPTHCAMERA_HH_
19 #define GZ_RENDERING_OGRE_OGREDEPTHCAMERA_HH_
40 #include "gz/common/Event.hh"
41 #include "gz/common/Console.hh"
56 inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
59 class OgreDepthCameraPrivate;
64 class IGNITION_RENDERING_OGRE_VISIBLE OgreDepthCamera :
66 public BaseDepthCamera<OgreSensor>
69 protected: OgreDepthCamera();
72 public:
virtual ~OgreDepthCamera();
75 public:
virtual void Init()
override;
78 public:
virtual void CreateDepthTexture()
override;
82 protected:
void DestroyDepthTexture();
85 public:
virtual void PostRender()
override;
89 public:
virtual const float *DepthData()
const override;
94 public:
virtual gz::common::ConnectionPtr ConnectNewDepthFrame(
96 unsigned int,
const std::string &)> _subscriber)
override;
101 public:
virtual gz::common::ConnectionPtr ConnectNewRgbPointCloud(
102 std::function<
void(
const float *,
unsigned int,
unsigned int,
103 unsigned int,
const std::string &)> _subscriber)
override;
106 public:
virtual void PreRender()
override;
109 public:
virtual void Render()
override;
113 public:
virtual void SetFarClipPlane(
const double _far)
override;
117 public:
virtual void SetNearClipPlane(
const double _near)
override;
122 public:
double NearClipPlane()
const override;
127 public:
double FarClipPlane()
const override;
130 public:
virtual void Destroy()
override;
137 Ogre::Material *_material,
148 protected:
static double LimitFOV(
const double _fov);
151 protected:
void CreateCamera();
154 private:
void CreatePointCloudTexture();
158 protected:
void DestroyPointCloudTexture();
161 protected:
bool newData =
false;
163 protected:
bool captureData =
false;
169 protected: Ogre::Viewport *depthViewport =
nullptr;
Definition: gz/rendering/ogre/OgreCamera.hh:27
Definition: gz/rendering/ogre/OgreScene.hh:39
OgreRenderTexturePtr depthTexture
Pointer to the depth texture.
Definition: gz/rendering/ogre/OgreDepthCamera.hh:166
shared_ptr< OgreRenderTexture > OgreRenderTexturePtr
Definition: gz/rendering/ogre/OgreRenderTypes.hh:113
shared_ptr< RenderTarget > RenderTargetPtr
Shared pointer to RenderTarget.
Definition: gz/rendering/RenderTypes.hh:235
A Ray Query class used for computing ray object intersections.
Definition: gz/rendering/ogre/OgreRayQuery.hh:39
Ogre::Camera * ogreCamera
Pointer to the ogre camera.
Definition: gz/rendering/ogre/OgreDepthCamera.hh:172