Gazebo Rendering

API Reference

3.7.2
gz/rendering/RenderingIface.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_RENDERINGIFACE_HH_
18 #define GZ_RENDERING_RENDERINGIFACE_HH_
19 
20 #include <list>
21 #include <map>
22 #include <string>
23 #include <vector>
24 
25 #include "gz/rendering/config.hh"
26 #include "gz/rendering/Export.hh"
28 
29 namespace ignition
30 {
31  namespace rendering
32  {
33  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
34  //
35  class RenderEngine;
36 
39  IGNITION_RENDERING_VISIBLE
40  bool load();
41 
44  IGNITION_RENDERING_VISIBLE
45  bool init();
46 
49  IGNITION_RENDERING_VISIBLE
50  bool fini();
51 
54  IGNITION_RENDERING_VISIBLE
55  unsigned int engineCount();
56 
60  IGNITION_RENDERING_VISIBLE
61  bool hasEngine(const std::string &_name);
62 
66  IGNITION_RENDERING_VISIBLE
67  bool isEngineLoaded(const std::string &_name);
68 
71  IGNITION_RENDERING_VISIBLE
73 
82  IGNITION_RENDERING_VISIBLE
83  RenderEngine *engine(const std::string &_name,
84  const std::map<std::string, std::string> &_params = {},
85  const std::string &_path = "");
86 
94  IGNITION_RENDERING_VISIBLE
95  RenderEngine *engine(const unsigned int _index,
96  const std::map<std::string, std::string> &_params = {},
97  const std::string &_path = "");
98 
102  IGNITION_RENDERING_VISIBLE
103  bool unloadEngine(const std::string &_name);
104 
109  IGNITION_RENDERING_VISIBLE
110  void registerEngine(const std::string &_name, RenderEngine *_engine);
111 
116  IGNITION_RENDERING_VISIBLE
117  void unregisterEngine(const std::string &_name);
118 
122  IGNITION_RENDERING_VISIBLE
123  void unregisterEngine(RenderEngine *_engine);
124 
128  IGNITION_RENDERING_VISIBLE
129  void unregisterEngine(const unsigned int _index);
130 
133  IGNITION_RENDERING_VISIBLE
134  void setPluginPaths(const std::list<std::string> &_paths);
135 
144  IGNITION_RENDERING_VISIBLE
146  }
147  }
148 }
149 #endif
STL class.
STL class.
std::vector< std::string > loadedEngines()
Get the names of all engines currently loaded.
void unregisterEngine(const std::string &_name)
Unregister a render-engine registered under the given name. If the no render-engine is registered und...
bool unloadEngine(const std::string &_name)
Unload the render-engine registered under the given name.
void registerEngine(const std::string &_name, RenderEngine *_engine)
Register a new render-engine under the given name. If the given name is already in use,...
RenderEngine * engine(const std::string &_name, const std::map< std::string, std::string > &_params={}, const std::string &_path="")
Get the render-engine registered under the given name. If no render-engine is registered under the gi...
bool fini()
Destroy all render-engines and related resources.
bool isEngineLoaded(const std::string &_name)
Determine if a render-engine is already loaded.
ScenePtr sceneFromFirstRenderEngine()
Most applications will only have one rendering engine loaded at a time, and only one scene within tha...
STL class.
bool init()
Initialized shared render-engine features.
void setPluginPaths(const std::list< std::string > &_paths)
Set the plugin paths from which render engines can be loaded.
unsigned int engineCount()
Get the number of available render-engines.
bool load()
Load shared render-engine resources.
shared_ptr< Scene > ScenePtr
Shared pointer to Scene.
Definition: gz/rendering/RenderTypes.hh:194
bool hasEngine(const std::string &_name)
Determine if a render-engine is registered under the given name.