Gazebo Rendering

API Reference

6.6.3
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"
33 
34 #include "gz/common/Event.hh"
35 #include "gz/common/Console.hh"
36 
37 namespace Ogre
38 {
39  class Material;
40  class RenderTarget;
41  class Texture;
42  class Viewport;
43 }
44 
45 namespace ignition
46 {
47  namespace rendering
48  {
49  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
50  //
51  // Forward declaration
52  class Ogre2ThermalCameraPrivate;
53 
55  class IGNITION_RENDERING_OGRE2_VISIBLE Ogre2ThermalCamera :
56  public BaseThermalCamera<Ogre2Sensor>
57  {
59  protected: Ogre2ThermalCamera();
60 
62  public: virtual ~Ogre2ThermalCamera();
63 
65  public: virtual void Init() override;
66 
67  // Documentation inherited
68  public: virtual void Destroy() override;
69 
70  // Documentation inherited
71  public: virtual void PreRender() override;
72 
74  public: virtual void PostRender() override;
75 
79  public: virtual gz::common::ConnectionPtr ConnectNewThermalFrame(
80  std::function<void(const uint16_t *, unsigned int, unsigned int,
81  unsigned int, const std::string &)> _subscriber) override;
82 
84  public: virtual void Render() override;
85 
88  protected: virtual RenderTargetPtr RenderTarget() const override;
89 
91  protected: void CreateCamera();
92 
94  protected: virtual void CreateRenderTexture();
95 
97  protected: virtual void CreateThermalTexture();
98 
100  protected: Ogre::Camera *ogreCamera = nullptr;
101 
105 
106  private: friend class Ogre2Scene;
107  };
108  }
109  }
110 }
111 #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:57
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:55