Gazebo Rendering
API Reference
7.4.2
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
gz/rendering/base/BaseWireBox.hh
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2020 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_WIREBOX_HH_
18
#define GZ_RENDERING_BASE_WIREBOX_HH_
19
20
#include <string>
21
#include "
gz/rendering/WireBox.hh
"
22
23
namespace
gz
24
{
25
namespace
rendering
26
{
27
inline
namespace
GZ_RENDERING_VERSION_NAMESPACE {
28
//
30
template
<
class
T>
31
class
BaseWireBox
:
32
public
virtual
WireBox
,
33
public
virtual
T
34
{
36
protected
:
BaseWireBox
();
37
39
public
:
virtual
~
BaseWireBox
();
40
41
// Documentation inherited.
42
public
:
virtual
void
PreRender();
43
44
// Documentation inherited.
45
public
:
virtual
void
Destroy();
46
47
// Documentation inherited.
48
public
:
virtual
void
SetBox(
const
gz::math::AxisAlignedBox
&_box);
49
50
// Documentation inherited.
51
public
:
virtual
gz::math::AxisAlignedBox
Box()
const
;
52
53
// \brief Underlying axis aligned box that the wire box reflects.
54
protected
:
gz::math::AxisAlignedBox
box
;
55
57
protected
:
bool
wireBoxDirty =
false
;
58
};
59
61
// BaseWireBox
63
template
<
class
T>
64
BaseWireBox<T>::BaseWireBox
()
65
{
66
}
67
69
template
<
class
T>
70
BaseWireBox<T>::~BaseWireBox
()
71
{
72
}
73
75
template
<
class
T>
76
void
BaseWireBox<T>::PreRender
()
77
{
78
T::PreRender();
79
}
80
82
template
<
class
T>
83
void
BaseWireBox<T>::Destroy
()
84
{
85
T::Destroy();
86
}
87
89
template
<
class
T>
90
void
BaseWireBox<T>::SetBox
(
const
gz::math::AxisAlignedBox
&_box)
91
{
92
this->box = _box;
93
this->wireBoxDirty =
true
;
94
}
95
97
template
<
class
T>
98
gz::math::AxisAlignedBox
BaseWireBox<T>::Box
()
const
99
{
100
return
this->box;
101
}
102
}
103
}
104
}
105
#endif