Gazebo Rendering
API Reference
8.2.1
insert_drive_file
Tutorials
library_books
Classes
toc
Namespaces
insert_drive_file
Files
launch
Gazebo Website
Index
List
Hierarchy
Members: All
Members: Functions
Members: Variables
Members: Typedefs
Members: Enumerations
Members: Enumerator
List
Members
Functions
Typedefs
Variables
Enumerations
Enumerator
src
gz-rendering
ogre2
include
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
gz
34
{
35
namespace
rendering
36
{
37
inline
namespace
GZ_RENDERING_VERSION_NAMESPACE {
38
//
39
// forward declaration
40
struct
Ogre2SelectionBufferPrivate;
41
47
class
GZ_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
97
private
:
std::unique_ptr<Ogre2SelectionBufferPrivate>
dataPtr;
98
};
99
}
100
}
101
}
102
#endif