Ignition Rendering

API Reference

4.1.0
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 IGNITION_RENDERING_RENDERINGIFACE_HH_
18 #define IGNITION_RENDERING_RENDERINGIFACE_HH_
19 
20 #include <list>
21 #include <map>
22 #include <string>
23 #include <vector>
24 
25 #include "ignition/rendering/config.hh"
26 #include "ignition/rendering/Export.hh"
27 
28 namespace ignition
29 {
30  namespace rendering
31  {
32  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
33  //
34  class RenderEngine;
35 
38  IGNITION_RENDERING_VISIBLE
39  bool load();
40 
43  IGNITION_RENDERING_VISIBLE
44  bool init();
45 
48  IGNITION_RENDERING_VISIBLE
49  bool fini();
50 
53  IGNITION_RENDERING_VISIBLE
54  unsigned int engineCount();
55 
59  IGNITION_RENDERING_VISIBLE
60  bool hasEngine(const std::string &_name);
61 
65  IGNITION_RENDERING_VISIBLE
66  bool isEngineLoaded(const std::string &_name);
67 
70  IGNITION_RENDERING_VISIBLE
72 
81  IGNITION_RENDERING_VISIBLE
82  RenderEngine *engine(const std::string &_name,
83  const std::map<std::string, std::string> &_params = {},
84  const std::string &_path = "");
85 
93  IGNITION_RENDERING_VISIBLE
94  RenderEngine *engine(const unsigned int _index,
95  const std::map<std::string, std::string> &_params = {},
96  const std::string &_path = "");
97 
101  IGNITION_RENDERING_VISIBLE
102  bool unloadEngine(const std::string &_name);
103 
108  IGNITION_RENDERING_VISIBLE
109  void registerEngine(const std::string &_name, RenderEngine *_engine);
110 
115  IGNITION_RENDERING_VISIBLE
116  void unregisterEngine(const std::string &_name);
117 
121  IGNITION_RENDERING_VISIBLE
122  void unregisterEngine(RenderEngine *_engine);
123 
127  IGNITION_RENDERING_VISIBLE
128  void unregisterEngine(const unsigned int _index);
129 
132  IGNITION_RENDERING_VISIBLE
133  void setPluginPaths(const std::list<std::string> &_paths);
134  }
135  }
136 }
137 #endif
bool load()
Load shared render-engine resources.
bool isEngineLoaded(const std::string &_name)
Determine if a render-engine is already loaded.
void setPluginPaths(const std::list< std::string > &_paths)
Set the plugin paths from which render engines can be loaded.
std::vector< std::string > loadedEngines()
Get the names of all engines currently loaded.
STL class.
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...
STL class.
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...
bool unloadEngine(const std::string &_name)
Unload the render-engine registered under the given name.
bool hasEngine(const std::string &_name)
Determine if a render-engine is registered under the given name.
void unregisterEngine(const std::string &_name)
Unregister a render-engine registered under the given name. If the no render-engine is registered und...
unsigned int engineCount()
Get the number of available render-engines.
STL class.
bool init()
Initialized shared render-engine features.
bool fini()
Destroy all render-engines and related resources.