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/BaseRenderEngine.hh
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2015 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_BASERENDERENGINE_HH_
18
#define GZ_RENDERING_BASE_BASERENDERENGINE_HH_
19
20
#include <map>
21
#include <string>
22
#include <vector>
23
#include <gz/utils/SuppressWarning.hh>
24
#include "
gz/rendering/RenderEngine.hh
"
25
#include "
gz/rendering/Storage.hh
"
26
27
namespace
gz
28
{
29
namespace
rendering
30
{
31
inline
namespace
GZ_RENDERING_VERSION_NAMESPACE {
32
//
33
class
GZ_RENDERING_VISIBLE
BaseRenderEngine
:
34
public
virtual
RenderEngine
35
{
36
protected
:
BaseRenderEngine
();
37
38
public
:
virtual
~
BaseRenderEngine
();
39
40
// Documentation Inherited.
41
public
:
virtual
bool
Load(
42
const
std::map<std::string, std::string>
&_params = {})
override
;
43
44
public
:
virtual
bool
Init()
override
;
45
46
public
:
virtual
bool
Fini()
override
;
47
48
public
:
virtual
bool
IsLoaded()
const override
;
49
50
public
:
virtual
bool
IsInitialized()
const override
;
51
52
public
:
virtual
bool
IsEnabled()
const override
;
53
54
public
:
virtual
unsigned
int
SceneCount()
const override
;
55
56
public
:
virtual
bool
HasScene(
ConstScenePtr
_scene)
const override
;
57
58
public
:
virtual
bool
HasSceneId(
unsigned
int
_id)
const override
;
59
60
public
:
virtual
bool
HasSceneName(
const
std::string
&_name)
const
61
override
;
62
63
public
:
virtual
ScenePtr
SceneById(
unsigned
int
_id)
const override
;
64
65
public
:
virtual
ScenePtr
SceneByName(
const
std::string
&_name)
const
66
override
;
67
68
public
:
virtual
ScenePtr
SceneByIndex(
unsigned
int
_index)
const override
;
69
70
public
:
virtual
void
DestroyScene(
ScenePtr
_scene)
override
;
71
72
public
:
virtual
void
DestroySceneById(
unsigned
int
_id)
override
;
73
74
public
:
virtual
void
DestroySceneByName(
const
std::string
&_name)
75
override
;
76
77
public
:
virtual
void
DestroySceneByIndex(
unsigned
int
_index)
override
;
78
79
public
:
virtual
void
DestroyScenes()
override
;
80
81
public
:
virtual
ScenePtr
CreateScene(
const
std::string
&_name)
override
;
82
83
public
:
virtual
ScenePtr
CreateScene(
unsigned
int
_id,
84
const
std::string
&_name)
override
;
85
86
public
:
virtual
void
Destroy()
override
;
87
88
// Documentation Inherited
89
public
:
virtual
void
AddResourcePath(
const
std::string
&_path)
override
;
90
91
// Documentation Inherited
92
public
:
virtual
rendering::GraphicsAPI
GraphicsAPI
()
const override
93
{
94
return
GraphicsAPI::UNKNOWN
;
95
}
96
97
// Documentation Inherited
98
public
:
virtual
void
SetHeadless(
bool
_headless)
override
;
99
100
// Documentation Inherited
101
public
:
virtual
bool
Headless()
const override
;
102
103
// Documentation Inherited
104
public
:
virtual
RenderPassSystemPtr
RenderPassSystem
()
const override
;
105
106
protected
:
virtual
void
PrepareScene(
ScenePtr
_scene);
107
108
protected
:
virtual
unsigned
int
NextSceneId();
109
112
protected
:
virtual
bool
LoadImpl(
113
const
std::map<std::string, std::string>
&_params) = 0;
114
115
protected
:
virtual
bool
InitImpl() = 0;
116
117
protected
:
virtual
ScenePtr
CreateSceneImpl(
unsigned
int
_id,
118
const
std::string
&_name) = 0;
119
120
protected
:
virtual
SceneStorePtr
Scenes()
const
= 0;
121
122
protected
:
bool
loaded =
false
;
123
124
protected
:
bool
initialized =
false
;
125
126
protected
:
bool
isHeadless =
false
;
127
129
protected
:
std::string
winID =
""
;
130
131
protected
:
unsigned
int
nextSceneId
;
132
133
GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING
136
protected
:
std::vector<std::string>
resourcePaths
;
137
139
protected
:
RenderPassSystemPtr
renderPassSystem
;
140
GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING
141
};
142
}
143
}
144
}
145
#endif