Ignition Rendering

API Reference

6.3.1
RenderEngine.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_RENDERENGINE_HH_
18 #define IGNITION_RENDERING_RENDERENGINE_HH_
19 
20 #include <map>
21 #include <string>
22 #include "ignition/rendering/config.hh"
24 #include "ignition/rendering/Export.hh"
25 
26 namespace ignition
27 {
28  namespace rendering
29  {
30  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
31  //
36  class IGNITION_RENDERING_VISIBLE RenderEngine
37  {
39  public: virtual ~RenderEngine() { }
40 
46  public: virtual bool Load(
47  const std::map<std::string, std::string> &_params = {}) = 0;
48 
52  public: virtual bool Init() = 0;
53 
58  public: virtual void Destroy() = 0;
59 
60  // TODO(anyone): merge with Destroy
61  public: virtual bool Fini() = 0;
62 
65  public: virtual bool IsLoaded() const = 0;
66 
69  public: virtual bool IsInitialized() const = 0;
70 
75  public: virtual bool IsEnabled() const = 0;
76 
79  public: virtual std::string Name() const = 0;
80 
84  public: virtual unsigned int SceneCount() const = 0;
85 
90  public: virtual bool HasScene(ConstScenePtr _scene) const = 0;
91 
96  public: virtual bool HasSceneId(unsigned int _id) const = 0;
97 
102  public: virtual bool HasSceneName(const std::string &_name) const = 0;
103 
108  public: virtual ScenePtr SceneById(unsigned int _id) const = 0;
109 
114  public: virtual ScenePtr SceneByName(
115  const std::string &_name) const = 0;
116 
123  public: virtual ScenePtr SceneByIndex(unsigned int _index) const = 0;
124 
128  public: virtual void DestroyScene(ScenePtr _scene) = 0;
129 
133  public: virtual void DestroySceneById(unsigned int _id) = 0;
134 
138  public: virtual void DestroySceneByName(const std::string &_name) = 0;
139 
143  public: virtual void DestroySceneByIndex(unsigned int _index) = 0;
144 
146  public: virtual void DestroyScenes() = 0;
147 
154  public: virtual ScenePtr CreateScene(const std::string &_name) = 0;
155 
163  public: virtual ScenePtr CreateScene(unsigned int _id,
164  const std::string &_name) = 0;
165 
169  public: virtual void SetHeadless(bool _headless) = 0;
170 
173  public: virtual bool Headless() const = 0;
174 
177  public: virtual void AddResourcePath(const std::string &_path) = 0;
178 
180  public: virtual RenderPassSystemPtr RenderPassSystem() const = 0;
181  };
182  }
183  }
184 }
185 #endif
A class for creating and managing render passes.
Definition: RenderPassSystem.hh:56
STL class.
STL class.
virtual ~RenderEngine()
Destructor.
Definition: RenderEngine.hh:39
An abstract interface to a concrete render-engine. A RenderEngine is responsible for initializing a r...
Definition: RenderEngine.hh:36