Gazebo Rendering

API Reference

3.7.2
gz/rendering/ogre2/Ogre2ThermalCamera.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2019 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 
18 #ifndef GZ_RENDERING_OGRE2_OGRE2THERMALCAMERA_HH_
19 #define GZ_RENDERING_OGRE2_OGRE2THERMALCAMERA_HH_
20 
21 #ifdef _WIN32
22  // Ensure that Winsock2.h is included before Windows.h, which can get
23  // pulled in by anybody (e.g., Boost).
24  #include <Winsock2.h>
25 #endif
26 
27 #include <memory>
28 #include <string>
29 
31 #include "gz/rendering/ogre2/Export.hh"
34 
35 #include "gz/common/Event.hh"
36 #include "gz/common/Console.hh"
37 
38 namespace Ogre
39 {
40  class Material;
41  class RenderTarget;
42  class Texture;
43  class Viewport;
44 }
45 
46 namespace ignition
47 {
48  namespace rendering
49  {
50  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
51  //
52  // Forward declaration
53  class Ogre2ThermalCameraPrivate;
54 
56  class IGNITION_RENDERING_OGRE2_VISIBLE Ogre2ThermalCamera :
57  public BaseThermalCamera<Ogre2Sensor>
58  {
60  protected: Ogre2ThermalCamera();
61 
63  public: virtual ~Ogre2ThermalCamera();
64 
66  public: virtual void Init() override;
67 
68  // Documentation inherited
69  public: virtual void Destroy() override;
70 
71  // Documentation inherited
72  public: virtual void PreRender() override;
73 
75  public: virtual void PostRender() override;
76 
80  public: virtual gz::common::ConnectionPtr ConnectNewThermalFrame(
81  std::function<void(const uint16_t *, unsigned int, unsigned int,
82  unsigned int, const std::string &)> _subscriber) override;
83 
85  public: virtual void Render() override;
86 
89  protected: virtual RenderTargetPtr RenderTarget() const override;
90 
92  protected: void CreateCamera();
93 
95  protected: virtual void CreateRenderTexture();
96 
98  protected: virtual void CreateThermalTexture();
99 
101  protected: Ogre::Camera *ogreCamera = nullptr;
102 
106 
107  private: friend class Ogre2Scene;
108  };
109  }
110  }
111 }
112 #endif
Definition: gz/rendering/ogre/OgreCamera.hh:27
STL class.
STL class.
Ogre2.x implementation of the scene class.
Definition: gz/rendering/ogre2/Ogre2Scene.hh:41
Represents a render-target to which cameras can render images.
Definition: gz/rendering/RenderTarget.hh:37
Base implementation of the ThermalCamera class.
Definition: gz/rendering/base/BaseThermalCamera.hh:33
Thermal camera used to render thermal data into an image buffer.
Definition: gz/rendering/ogre2/Ogre2ThermalCamera.hh:56