Gazebo Rendering

API Reference

7.4.2
gz/rendering/ogre/OgreSelectionBuffer.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018 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 #ifndef GZ_RENDERING_OGRE_OGRESELECTIONBUFFER_HH_
18 #define GZ_RENDERING_OGRE_OGRESELECTIONBUFFER_HH_
19 
20 #include <memory>
21 #include <string>
22 
23 #include "gz/rendering/config.hh"
24 #include "gz/rendering/ogre/Export.hh"
25 
26 namespace Ogre
27 {
28  class Entity;
29  class RenderTarget;
30  class SceneManager;
31 }
32 
33 namespace gz
34 {
35  namespace rendering
36  {
37  inline namespace GZ_RENDERING_VERSION_NAMESPACE {
38  //
39  // forward declaration
40  class OgreSelectionBufferPrivate;
41 
47  class GZ_RENDERING_OGRE_VISIBLE OgreSelectionBuffer
48  {
53  public: OgreSelectionBuffer(const std::string &_cameraName,
54  Ogre::SceneManager *_mgr);
55 
57  public: ~OgreSelectionBuffer();
58 
63  public: Ogre::Entity *OnSelectionClick(const int _x, const int _y);
64 
67  public: void ShowOverlay(const bool _show);
68 
70  public: void Update();
71 
73  private: void DeleteRTTBuffer();
74 
76  private: void CreateRTTBuffer();
77 
79  private: void CreateRTTOverlays();
80 
84  };
85  }
86  }
87 }
88 #endif