Ignition Rendering

API Reference

4.0.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 <map>
21 #include <string>
22 #include <vector>
23 
24 #include "ignition/rendering/config.hh"
25 #include "ignition/rendering/Export.hh"
26 
27 namespace ignition
28 {
29  namespace rendering
30  {
31  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
32  //
33  class RenderEngine;
34 
37  IGNITION_RENDERING_VISIBLE
38  bool load();
39 
42  IGNITION_RENDERING_VISIBLE
43  bool init();
44 
47  IGNITION_RENDERING_VISIBLE
48  bool fini();
49 
52  IGNITION_RENDERING_VISIBLE
53  unsigned int engineCount();
54 
58  IGNITION_RENDERING_VISIBLE
59  bool hasEngine(const std::string &_name);
60 
64  IGNITION_RENDERING_VISIBLE
65  bool isEngineLoaded(const std::string &_name);
66 
69  IGNITION_RENDERING_VISIBLE
71 
80  IGNITION_RENDERING_VISIBLE
81  RenderEngine *engine(const std::string &_name,
82  const std::map<std::string, std::string> &_params = {},
83  const std::string &_path = "");
84 
92  IGNITION_RENDERING_VISIBLE
93  RenderEngine *engine(const unsigned int _index,
94  const std::map<std::string, std::string> &_params = {},
95  const std::string &_path = "");
96 
100  IGNITION_RENDERING_VISIBLE
101  bool unloadEngine(const std::string &_name);
102 
107  IGNITION_RENDERING_VISIBLE
108  void registerEngine(const std::string &_name, RenderEngine *_engine);
109 
114  IGNITION_RENDERING_VISIBLE
115  void unregisterEngine(const std::string &_name);
116 
120  IGNITION_RENDERING_VISIBLE
121  void unregisterEngine(RenderEngine *_engine);
122 
126  IGNITION_RENDERING_VISIBLE
127  void unregisterEngine(const unsigned int _index);
128  }
129  }
130 }
131 #endif
bool load()
Load shared render-engine resources.
bool isEngineLoaded(const std::string &_name)
Determine if a render-engine is already 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.
bool init()
Initialized shared render-engine features.
bool fini()
Destroy all render-engines and related resources.