18 #ifndef GZ_RENDERING_OGRE2_OGRE2SEGMENTATIONCAMERA_HH_
19 #define GZ_RENDERING_OGRE2_OGRE2SEGMENTATIONCAMERA_HH_
30 #include <gz/common/Console.hh>
31 #include <gz/common/Event.hh>
42 inline namespace GZ_RENDERING_VERSION_NAMESPACE {
45 class Ogre2SegmentationCameraPrivate;
60 public:
virtual void Init()
override;
63 public:
virtual void Destroy()
override;
66 public:
virtual void PreRender()
override;
69 public:
virtual void PostRender()
override;
73 ConnectNewSegmentationFrame(
74 std::function<
void(
const uint8_t *,
unsigned int,
unsigned int,
75 unsigned int,
const std::string &)> _subscriber)
override;
78 public:
virtual void Render()
override;
85 public:
void SetBackgroundLabel(
int _label)
override;
88 public:
void LabelMapFromColoredBuffer(
89 uint8_t * _labelBuffer)
const override;
92 public:
virtual Ogre::Camera *
OgreCamera()
const override;
95 protected:
void CreateCamera();
98 protected:
virtual void CreateRenderTexture();
101 protected:
virtual void CreateSegmentationTexture()
override;
104 protected: Ogre::Camera *ogreCamera =
nullptr;