Ignition Rendering

API Reference

0.1.0
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 IGNITION_RENDERING_BASE_BASERENDERENGINE_HH_
18 #define IGNITION_RENDERING_BASE_BASERENDERENGINE_HH_
19 
20 #include <string>
21 #include <vector>
24 
25 namespace ignition
26 {
27  namespace rendering
28  {
29  class IGNITION_RENDERING_VISIBLE BaseRenderEngine :
30  public virtual RenderEngine
31  {
32  protected: BaseRenderEngine();
33 
34  public: virtual ~BaseRenderEngine();
35 
36  public: virtual bool Load();
37 
38  public: virtual bool Init();
39 
40  public: virtual bool Fini();
41 
42  public: virtual bool IsLoaded() const;
43 
44  public: virtual bool IsInitialized() const;
45 
46  public: virtual bool IsEnabled() const;
47 
48  public: virtual unsigned int SceneCount() const;
49 
50  public: virtual bool HasScene(ConstScenePtr _scene) const;
51 
52  public: virtual bool HasSceneId(unsigned int _id) const;
53 
54  public: virtual bool HasSceneName(const std::string &_name) const;
55 
56  public: virtual ScenePtr SceneById(unsigned int _id) const;
57 
58  public: virtual ScenePtr SceneByName(const std::string &_name) const;
59 
60  public: virtual ScenePtr SceneByIndex(unsigned int _index) const;
61 
62  public: virtual void DestroyScene(ScenePtr _scene);
63 
64  public: virtual void DestroySceneById(unsigned int _id);
65 
66  public: virtual void DestroySceneByName(const std::string &_name);
67 
68  public: virtual void DestroySceneByIndex(unsigned int _index);
69 
70  public: virtual void DestroyScenes();
71 
72  public: virtual ScenePtr CreateScene(const std::string &_name);
73 
74  public: virtual ScenePtr CreateScene(unsigned int _id,
75  const std::string &_name);
76 
77  public: virtual void Destroy();
78 
80  public: virtual void AddResourcePath(const std::string &_path);
81 
82  protected: virtual void PrepareScene(ScenePtr _scene);
83 
84  protected: virtual unsigned int NextSceneId();
85 
86  protected: virtual bool LoadImpl() = 0;
87 
88  protected: virtual bool InitImpl() = 0;
89 
90  protected: virtual ScenePtr CreateSceneImpl(unsigned int _id,
91  const std::string &_name) = 0;
92 
93  protected: virtual SceneStorePtr Scenes() const = 0;
94 
95  protected: bool loaded;
96 
97  protected: bool initialized;
98 
99  protected: unsigned int nextSceneId;
100 
104  };
105  }
106 }
107 #endif
bool loaded
Definition: BaseRenderEngine.hh:95
std::vector< std::string > resourcePaths
a list of paths that render engines use to locate their resources
Definition: BaseRenderEngine.hh:103
STL class.
Definition: BaseRenderEngine.hh:29
bool initialized
Definition: BaseRenderEngine.hh:97
unsigned int nextSceneId
Definition: BaseRenderEngine.hh:99
An abstract interface to a concrete render-engine. A RenderEngine is responsible for initializing a r...
Definition: RenderEngine.hh:32
Definition: ArrowVisual.hh:22