Gazebo Rendering
API Reference
9.0.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
BaseRenderPass.hh
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2019 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_BASERENDERPASS_HH_
18
#define GZ_RENDERING_BASE_BASERENDERPASS_HH_
19
20
#include <string>
21
#include "
gz/rendering/RenderPass.hh
"
22
23
namespace
gz
24
{
25
namespace
rendering
26
{
27
inline
namespace
GZ_RENDERING_VERSION_NAMESPACE {
28
//
29
/* \class BaseRenderPass BaseRenderPass.hh \
30
* gz/rendering/base/BaseRenderPass.hh
31
*/
33
template
<
class
T>
34
class
BaseRenderPass
:
35
public
virtual
RenderPass
,
36
public
T
37
{
39
protected
:
BaseRenderPass
();
40
42
public
:
virtual
~BaseRenderPass
();
43
44
// Documentation inherited
45
public
:
virtual
void
SetEnabled
(
bool
_enabled)
override
;
46
47
// Documentation inherited
48
public
:
virtual
bool
IsEnabled
()
const override
;
49
50
// Documentation inherited
51
public
:
virtual
void
PreRender
(
const
CameraPtr
&_camera)
override
;
52
53
// Documentation inherited
54
public
:
void
SetWideAngleCameraAfterStitching
(
bool
_afterStitching)
55
override
;
56
57
// Documentation inherited
58
public
:
bool
WideAngleCameraAfterStitching
()
const override
;
59
61
protected
:
bool
enabled =
true
;
62
65
protected
:
bool
afterStitching =
false
;
66
};
67
69
// BaseRenderPass
71
template
<
class
T>
72
BaseRenderPass<T>::BaseRenderPass
()
73
{
74
}
75
77
template
<
class
T>
78
BaseRenderPass<T>::~BaseRenderPass
()
79
{
80
}
81
83
template
<
class
T>
84
void
BaseRenderPass<T>::SetEnabled
(
bool
_enabled)
85
{
86
this->enabled = _enabled;
87
}
88
90
template
<
class
T>
91
bool
BaseRenderPass<T>::IsEnabled
()
const
92
{
93
return
this->enabled;
94
}
95
97
template
<
class
T>
98
void
BaseRenderPass<T>::PreRender
(
const
CameraPtr
&
/*_camera*/
)
99
{
100
T *thisT =
this
;
101
thisT->PreRender();
// NOT the same as doing T::PreRender
102
}
103
105
template
<
class
T>
106
void
BaseRenderPass<T>::SetWideAngleCameraAfterStitching
(
107
bool
_afterStitching)
108
{
109
this->afterStitching = _afterStitching;
110
}
111
113
template
<
class
T>
114
bool
BaseRenderPass<T>::WideAngleCameraAfterStitching
()
const
115
{
116
return
this->afterStitching;
117
}
118
}
119
}
120
}
121
#endif