Gazebo Rendering

API Reference

3.7.2
gz/rendering/ogre/OgreScene.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_OGRE_OGRESCENE_HH_
18 #define GZ_RENDERING_OGRE_OGRESCENE_HH_
19 
20 #include <array>
21 #include <string>
23 #include "gz/rendering/ogre/Export.hh"
25 
26 
27 namespace Ogre
28 {
29  class Root;
30  class SceneManager;
31 }
32 
33 namespace ignition
34 {
35  namespace rendering
36  {
37  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
38  //
39  class IGNITION_RENDERING_OGRE_VISIBLE OgreScene :
40  public BaseScene
41  {
42  protected: OgreScene(unsigned int _id, const std::string &_name);
43 
44  public: virtual ~OgreScene();
45 
46  public: virtual void Fini();
47 
48  public: virtual RenderEngine *Engine() const;
49 
50  public: virtual VisualPtr RootVisual() const;
51 
52  public: virtual math::Color AmbientLight() const;
53 
54  public: virtual void SetAmbientLight(const math::Color &_color);
55 
56  public: virtual void SetBackgroundColor(const math::Color &_color);
57 
58  // Documentation inherited.
59  public: virtual void SetGradientBackgroundColor(
60  const std::array<math::Color, 4> &_colors);
61 
62  // Documentation inherited.
63  public: virtual void RemoveGradientBackgroundColor();
64 
65  public: virtual void PreRender();
66 
67  public: virtual void Clear();
68 
69  public: virtual void Destroy();
70 
71  public: virtual Ogre::SceneManager *OgreSceneManager() const;
72 
73  protected: virtual bool LoadImpl();
74 
75  protected: virtual bool InitImpl();
76 
77  protected: virtual DirectionalLightPtr CreateDirectionalLightImpl(
78  unsigned int _id, const std::string &_name);
79 
80  protected: virtual PointLightPtr CreatePointLightImpl(unsigned int _id,
81  const std::string &_name);
82 
83  protected: virtual SpotLightPtr CreateSpotLightImpl(unsigned int _id,
84  const std::string &_name);
85 
86  protected: virtual CameraPtr CreateCameraImpl(unsigned int _id,
87  const std::string &_name);
88 
89  // Documentation inherited
90  protected: virtual DepthCameraPtr CreateDepthCameraImpl(
91  const unsigned int _id,
92  const std::string &_name);
93 
94  // Documentation inherited
95  protected: virtual ThermalCameraPtr CreateThermalCameraImpl(
96  const unsigned int _id,
97  const std::string &_name);
98 
99  protected: virtual GpuRaysPtr CreateGpuRaysImpl(
100  const unsigned int _id,
101  const std::string &_name);
102 
103  protected: virtual VisualPtr CreateVisualImpl(unsigned int _id,
104  const std::string &_name);
105 
106  protected: virtual ArrowVisualPtr CreateArrowVisualImpl(unsigned int _id,
107  const std::string &_name);
108 
109  protected: virtual AxisVisualPtr CreateAxisVisualImpl(unsigned int _id,
110  const std::string &_name);
111 
112  // Documentation inherited
113  protected: virtual GizmoVisualPtr CreateGizmoVisualImpl(unsigned int _id,
114  const std::string &_name);
115 
116  protected: virtual GeometryPtr CreateBoxImpl(unsigned int _id,
117  const std::string &_name);
118 
119  protected: virtual GeometryPtr CreateConeImpl(unsigned int _id,
120  const std::string &_name);
121 
122  protected: virtual GeometryPtr CreateCylinderImpl(unsigned int _id,
123  const std::string &_name);
124 
125  protected: virtual GeometryPtr CreatePlaneImpl(unsigned int _id,
126  const std::string &_name);
127 
128  protected: virtual GeometryPtr CreateSphereImpl(unsigned int _id,
129  const std::string &_name);
130 
131  protected: virtual MeshPtr CreateMeshImpl(unsigned int _id,
132  const std::string &_name, const std::string &_meshName);
133 
134  protected: virtual MeshPtr CreateMeshImpl(unsigned int _id,
135  const std::string &_name, const MeshDescriptor &_desc);
136 
137  // Documentation inherited
138  protected: virtual GridPtr CreateGridImpl(unsigned int _id,
139  const std::string &_name);
140 
141  // Documentation inherited
142  protected: virtual MarkerPtr CreateMarkerImpl(unsigned int _id,
143  const std::string &_name);
144 
145  // Documentation inherited
146  protected: virtual TextPtr CreateTextImpl(unsigned int _id,
147  const std::string &_name);
148 
149  protected: virtual MaterialPtr CreateMaterialImpl(unsigned int _id,
150  const std::string &_name);
151 
152  protected: virtual RenderTexturePtr CreateRenderTextureImpl(
153  unsigned int _id, const std::string &_name);
154 
155  // Documentation inherited.
156  protected: virtual RenderWindowPtr CreateRenderWindowImpl(
157  unsigned int _id, const std::string &_name);
158 
159  protected: virtual RayQueryPtr CreateRayQueryImpl(
160  unsigned int _id, const std::string &_name);
161 
162  protected: virtual bool InitObject(OgreObjectPtr _object,
163  unsigned int _id, const std::string &_name);
164 
165  protected: virtual LightStorePtr Lights() const;
166 
167  protected: virtual SensorStorePtr Sensors() const;
168 
169  protected: virtual VisualStorePtr Visuals() const;
170 
171  protected: virtual MaterialMapPtr Materials() const;
172 
173  private: void CreateContext();
174 
175  private: void CreateRootVisual();
176 
177  private: void CreateMeshFactory();
178 
179  private: void CreateStores();
180 
181  private: OgreScenePtr SharedThis();
182 
184 
186 
188 
190 
192 
194 
195  protected: Ogre::Root *ogreRoot;
196 
197  protected: Ogre::SceneManager *ogreSceneManager;
198 
199  private: friend class OgreRenderEngine;
200  };
201  }
202  }
203 }
204 #endif
OgreVisualPtr rootVisual
Definition: gz/rendering/ogre/OgreScene.hh:183
Definition: gz/rendering/ogre/OgreCamera.hh:27
STL class.
STL class.
Definition: gz/rendering/ogre/OgreScene.hh:39
Describes how a Mesh should be loaded.
Definition: gz/rendering/MeshDescriptor.hh:44
Ogre::Root * ogreRoot
Definition: gz/rendering/ogre/OgreScene.hh:195
OgreMaterialMapPtr materials
Definition: gz/rendering/ogre/OgreScene.hh:193
OgreSensorStorePtr sensors
Definition: gz/rendering/ogre/OgreScene.hh:189
STL class.
Definition: gz/rendering/ogre/OgreRenderEngine.hh:68
Definition: gz/rendering/base/BaseScene.hh:37
Ogre::SceneManager * ogreSceneManager
Definition: gz/rendering/ogre/OgreScene.hh:197
An abstract interface to a concrete render-engine. A RenderEngine is responsible for initializing a r...
Definition: gz/rendering/RenderEngine.hh:36
OgreVisualStorePtr visuals
Definition: gz/rendering/ogre/OgreScene.hh:191
OgreMeshFactoryPtr meshFactory
Definition: gz/rendering/ogre/OgreScene.hh:185
OgreLightStorePtr lights
Definition: gz/rendering/ogre/OgreScene.hh:187