Gazebo Rendering

API Reference

6.6.3
gz/rendering/ogre2/Ogre2SelectionBuffer.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_OGRE2_OGRE2SELECTIONBUFFER_HH_
18 #define GZ_RENDERING_OGRE2_OGRE2SELECTIONBUFFER_HH_
19 
20 #include <memory>
21 #include <string>
22 
23 #include "gz/rendering/config.hh"
24 #include "gz/rendering/ogre2/Export.hh"
25 
26 namespace Ogre
27 {
28  class Item;
29  class RenderTarget;
30  class SceneManager;
31 }
32 
33 namespace ignition
34 {
35  namespace rendering
36  {
37  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
38  //
39  // forward declaration
40  struct Ogre2SelectionBufferPrivate;
41 
47  class IGNITION_RENDERING_OGRE2_VISIBLE Ogre2SelectionBuffer
48  {
55  public: Ogre2SelectionBuffer(const std::string &_cameraName,
56  Ogre2ScenePtr _scene, unsigned int _width,
57  unsigned int _height);
58 
60  public: ~Ogre2SelectionBuffer();
61 
66  public: Ogre::Item *OnSelectionClick(const int _x, const int _y);
67 
75  public: bool ExecuteQuery(const int _x, const int _y, Ogre::Item *&_item,
76  math::Vector3d &_point);
77 
81  public: void SetDimensions(unsigned int _width, unsigned int _height);
82 
84  public: void Update();
85 
87  private: void DeleteRTTBuffer();
88 
90  private: void CreateRTTBuffer();
91 
93  // private: void CreateRTTOverlays();
94 
98  };
99  }
100  }
101 }
102 #endif
Definition: gz/rendering/ogre/OgreCamera.hh:27
STL class.
STL class.
Generates a selection buffer object for a given camera. The selection buffer is used of entity select...
Definition: gz/rendering/ogre2/Ogre2SelectionBuffer.hh:47