Gazebo Rendering
API Reference
9.5.0
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
include
gz
rendering
base
BaseBoundingBoxCamera.hh
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2021 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_BASE_BASEBOUNDINGBOXCAMERA_HH_
18
#define GZ_RENDERING_BASE_BASEBOUNDINGBOXCAMERA_HH_
19
20
#include <vector>
21
22
#include <
gz/common/Event.hh
>
23
#include <
gz/math/Color.hh
>
24
25
#include "
gz/rendering/base/BaseCamera.hh
"
26
#include "
gz/rendering/BoundingBoxCamera.hh
"
27
28
namespace
gz
29
{
30
namespace
rendering
31
{
32
inline
namespace
GZ_RENDERING_VERSION_NAMESPACE {
33
34
template
<
class
T>
35
class
BaseBoundingBoxCamera
:
36
public
virtual
BoundingBoxCamera
,
37
public
virtual
BaseCamera
<T>,
38
public
virtual
T
39
{
41
protected
:
BaseBoundingBoxCamera
();
42
44
public
:
~BaseBoundingBoxCamera
()
override
;
45
46
// Documentation inherited
47
public
:
const
std::vector<BoundingBox>
&
BoundingBoxData
()
const override
;
48
49
// Documentation inherited
50
public
:
gz::common::ConnectionPtr
ConnectNewBoundingBoxes
(
51
std::function
<
void
(
const
std::vector<BoundingBox>
&)> _subscriber)
52
override
= 0;
53
54
// Documentation inherited
55
public
:
void
SetBoundingBoxType
(
BoundingBoxType
_type)
override
;
56
57
// Documentation inherited
58
public
:
BoundingBoxType
Type
()
const override
;
59
60
// Documentation inherited
61
public
:
void
DrawBoundingBox
(
unsigned
char
*_data,
62
const
math::Color
&_color,
const
BoundingBox
&_box)
const override
= 0;
63
65
protected
:
BoundingBoxType
type = BoundingBoxType::BBT_FULLBOX2D;
66
68
protected
:
std::vector<BoundingBox>
boundingBoxes
;
69
};
70
72
template
<
class
T>
73
BaseBoundingBoxCamera<T>::BaseBoundingBoxCamera
()
74
{
75
}
76
78
template
<
class
T>
79
BaseBoundingBoxCamera<T>::~BaseBoundingBoxCamera
()
80
{
81
}
82
84
template
<
class
T>
85
const
std::vector<BoundingBox>
&
86
BaseBoundingBoxCamera<T>::BoundingBoxData
()
const
87
{
88
return
this->boundingBoxes;
89
}
90
92
template
<
class
T>
93
void
BaseBoundingBoxCamera<T>::SetBoundingBoxType
(
BoundingBoxType
_type)
94
{
95
this->type = _type;
96
}
97
99
template
<
class
T>
100
BoundingBoxType
BaseBoundingBoxCamera<T>::Type
()
const
101
{
102
return
this->type;
103
}
104
}
105
}
106
}
107
#endif