Gazebo Rendering

API Reference

3.7.2
gz/rendering/base/BaseScene.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_BASE_BASESCENE_HH_
18 #define GZ_RENDERING_BASE_BASESCENE_HH_
19 
20 #include <array>
21 #include <set>
22 #include <string>
23 
24 #include <gz/common/Console.hh>
25 #include <gz/common/SuppressWarning.hh>
26 
28 #include "gz/rendering/Scene.hh"
30 
31 namespace ignition
32 {
33  namespace rendering
34  {
35  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
36  //
37  class IGNITION_RENDERING_VISIBLE BaseScene :
39  public std::enable_shared_from_this<BaseScene>,
41  public virtual Scene
42  {
43  protected: BaseScene(unsigned int _id, const std::string &_name);
44 
45  public: virtual ~BaseScene();
46 
47  public: virtual void Load() override;
48 
49  public: virtual void Init() override;
50 
51  public: virtual void Fini() override;
52 
53  public: virtual bool IsLoaded() const;
54 
55  public: virtual bool IsInitialized() const override;
56 
57  public: virtual unsigned int Id() const override;
58 
59  public: virtual std::string Name() const override;
60 
61  public: virtual common::Time SimTime() const override;
62 
63  public: virtual void SetSimTime(const common::Time &_time) override;
64 
65  public: virtual void SetAmbientLight(double _r, double _g, double _b,
66  double _a = 1.0) override;
67 
68  public: virtual void SetAmbientLight(const math::Color &_color)
69  override = 0;
70 
71  public: virtual math::Color BackgroundColor() const override;
72 
73  public: virtual void SetBackgroundColor(double _r, double _g, double _b,
74  double _a = 1.0) override;
75 
76  public: virtual void SetBackgroundColor(const math::Color &_color)
77  override;
78 
79  // Documentation inherited.
80  public: virtual bool IsGradientBackgroundColor() const override;
81 
82  // Documentation inherited.
83  public: virtual std::array<math::Color, 4> GradientBackgroundColor()
84  const override;
85 
86  // Documentation inherited.
87  public: virtual void SetGradientBackgroundColor(
88  const std::array<math::Color, 4> &_colors) override;
89 
90  // Documentation inherited.
91  public: virtual void RemoveGradientBackgroundColor() override;
92 
93  public: virtual unsigned int NodeCount() const override;
94 
95  public: virtual bool HasNode(ConstNodePtr _node) const override;
96 
97  public: virtual bool HasNodeId(unsigned int _id) const override;
98 
99  public: virtual bool HasNodeName(const std::string &_name) const override;
100 
101  public: virtual NodePtr NodeById(unsigned int _id) const override;
102 
103  public: virtual NodePtr NodeByName(const std::string &_name) const
104  override;
105 
106  public: virtual NodePtr NodeByIndex(unsigned int _index) const override;
107 
108  // Documentation inherited.
109  public: virtual void DestroyNode(NodePtr _node, bool _recursive = false)
110  override;
111 
112  public: virtual void DestroyNodeById(unsigned int _id) override;
113 
114  public: virtual void DestroyNodeByName(const std::string &_name) override;
115 
116  public: virtual void DestroyNodeByIndex(unsigned int _index) override;
117 
118  public: virtual void DestroyNodes() override;
119 
120  public: virtual unsigned int LightCount() const override;
121 
122  public: virtual bool HasLight(ConstLightPtr _light) const override;
123 
124  public: virtual bool HasLightId(unsigned int _id) const override;
125 
126  public: virtual bool HasLightName(const std::string &_name) const
127  override;
128 
129  public: virtual LightPtr LightById(unsigned int _id) const override;
130 
131  public: virtual LightPtr LightByName(const std::string &_name) const
132  override;
133 
134  public: virtual LightPtr LightByIndex(unsigned int _index) const override;
135 
136  // Documentation inherited.
137  public: virtual void DestroyLight(LightPtr _light,
138  bool _recursive = false) override;
139 
140  public: virtual void DestroyLightById(unsigned int _id) override;
141 
142  public: virtual void DestroyLightByName(const std::string &_name)
143  override;
144 
145  public: virtual void DestroyLightByIndex(unsigned int _index) override;
146 
147  public: virtual void DestroyLights() override;
148 
149  public: virtual unsigned int SensorCount() const override;
150 
151  public: virtual bool HasSensor(ConstSensorPtr _sensor) const override;
152 
153  public: virtual bool HasSensorId(unsigned int _id) const override;
154 
155  public: virtual bool HasSensorName(const std::string &_name) const
156  override;
157 
158  public: virtual SensorPtr SensorById(unsigned int _id) const override;
159 
160  public: virtual SensorPtr SensorByName(const std::string &_name) const
161  override;
162 
163  public: virtual SensorPtr SensorByIndex(unsigned int _index) const
164  override;
165 
166  // Documentation inherited.
167  public: virtual void DestroySensor(SensorPtr _sensor,
168  bool _recursive = false) override;
169 
170  public: virtual void DestroySensorById(unsigned int _id) override;
171 
172  public: virtual void DestroySensorByName(const std::string &_name)
173  override;
174 
175  public: virtual void DestroySensorByIndex(unsigned int _index) override;
176 
177  public: virtual void DestroySensors() override;
178 
179  public: virtual unsigned int VisualCount() const override;
180 
181  public: virtual bool HasVisual(ConstVisualPtr _visual) const override;
182 
183  public: virtual bool HasVisualId(unsigned int _id) const override;
184 
185  public: virtual bool HasVisualName(const std::string &_name) const
186  override;
187 
188  public: virtual VisualPtr VisualById(unsigned int _id) const override;
189 
190  public: virtual VisualPtr VisualByName(const std::string &_name) const
191  override;
192 
193  public: virtual VisualPtr VisualByIndex(unsigned int _index) const
194  override;
195 
196  // Documentation inherited
197  public: virtual VisualPtr VisualAt(const CameraPtr &_camera,
198  const gz::math::Vector2i &_mousePos) override;
199 
200  // Documentation inherited.
201  public: virtual void DestroyVisual(VisualPtr _visual,
202  bool _recursive = false) override;
203 
204  public: virtual void DestroyVisualById(unsigned int _id) override;
205 
206  public: virtual void DestroyVisualByName(const std::string &_name)
207  override;
208 
209  public: virtual void DestroyVisualByIndex(unsigned int _index) override;
210 
211  public: virtual void DestroyVisuals() override;
212 
213  public: virtual bool MaterialRegistered(const std::string &_name) const
214  override;
215 
216  public: virtual MaterialPtr Material(const std::string &_name) const
217  override;
218 
219  public: virtual void RegisterMaterial(const std::string &_name,
220  MaterialPtr _material) override;
221 
222  public: virtual void UnregisterMaterial(const std::string &_name)
223  override;
224 
225  public: virtual void UnregisterMaterials() override;
226 
227  // Documentation inherited
228  public: virtual void DestroyMaterial(MaterialPtr _material) override;
229 
230  // Documentation inherited
231  public: virtual void DestroyMaterials() override;
232 
233  public: virtual DirectionalLightPtr CreateDirectionalLight() override;
234 
235  public: virtual DirectionalLightPtr CreateDirectionalLight(
236  unsigned int _id) override;
237 
238  public: virtual DirectionalLightPtr CreateDirectionalLight(
239  const std::string &_name) override;
240 
241  public: virtual DirectionalLightPtr CreateDirectionalLight(
242  unsigned int _id, const std::string &_name) override;
243 
244  public: virtual PointLightPtr CreatePointLight() override;
245 
246  public: virtual PointLightPtr CreatePointLight(unsigned int _id) override;
247 
248  public: virtual PointLightPtr CreatePointLight(const std::string &_name)
249  override;
250 
251  public: virtual PointLightPtr CreatePointLight(unsigned int _id,
252  const std::string &_name) override;
253 
254  public: virtual SpotLightPtr CreateSpotLight() override;
255 
256  public: virtual SpotLightPtr CreateSpotLight(unsigned int _id) override;
257 
258  public: virtual SpotLightPtr CreateSpotLight(const std::string &_name)
259  override;
260 
261  public: virtual SpotLightPtr CreateSpotLight(unsigned int _id,
262  const std::string &_name) override;
263 
264  public: virtual CameraPtr CreateCamera() override;
265 
266  public: virtual CameraPtr CreateCamera(unsigned int _id) override;
267 
268  public: virtual CameraPtr CreateCamera(const std::string &_name) override;
269 
270  public: virtual CameraPtr CreateCamera(unsigned int _id,
271  const std::string &_name) override;
272 
273  public: virtual DepthCameraPtr CreateDepthCamera() override;
274 
275  public: virtual DepthCameraPtr CreateDepthCamera(const unsigned int _id)
276  override;
277 
278  public: virtual DepthCameraPtr CreateDepthCamera(
279  const std::string &_name) override;
280 
281  public: virtual DepthCameraPtr CreateDepthCamera(const unsigned int _id,
282  const std::string &_name) override;
283 
284  // Documentation inherited.
285  public: virtual ThermalCameraPtr CreateThermalCamera() override;
286 
287  // Documentation inherited.
288  public: virtual ThermalCameraPtr CreateThermalCamera(
289  const unsigned int _id) override;
290 
291  // Documentation inherited.
292  public: virtual ThermalCameraPtr CreateThermalCamera(
293  const std::string &_name) override;
294 
295  // Documentation inherited.
296  public: virtual ThermalCameraPtr CreateThermalCamera(
297  const unsigned int _id, const std::string &_name) override;
298 
299  // Documentation inherited.
300  public: virtual GpuRaysPtr CreateGpuRays() override;
301 
302  // Documentation inherited.
303  public: virtual GpuRaysPtr CreateGpuRays(const unsigned int _id) override;
304 
305  // Documentation inherited.
306  public: virtual GpuRaysPtr CreateGpuRays(
307  const std::string &_name) override;
308 
309  // Documentation inherited.
310  public: virtual GpuRaysPtr CreateGpuRays(const unsigned int _id,
311  const std::string &_name) override;
312 
313  public: virtual VisualPtr CreateVisual() override;
314 
315  public: virtual VisualPtr CreateVisual(unsigned int _id) override;
316 
317  public: virtual VisualPtr CreateVisual(const std::string &_name) override;
318 
319  public: virtual VisualPtr CreateVisual(unsigned int _id,
320  const std::string &_name) override;
321 
322  public: virtual ArrowVisualPtr CreateArrowVisual() override;
323 
324  public: virtual ArrowVisualPtr CreateArrowVisual(unsigned int _id)
325  override;
326 
327  public: virtual ArrowVisualPtr CreateArrowVisual(
328  const std::string &_name) override;
329 
330  public: virtual ArrowVisualPtr CreateArrowVisual(unsigned int _id,
331  const std::string &_name) override;
332 
333  public: virtual AxisVisualPtr CreateAxisVisual() override;
334 
335  public: virtual AxisVisualPtr CreateAxisVisual(unsigned int _id) override;
336 
337  public: virtual AxisVisualPtr CreateAxisVisual(const std::string &_name)
338  override;
339 
340  public: virtual AxisVisualPtr CreateAxisVisual(unsigned int _id,
341  const std::string &_name) override;
342 
343 
344  // Documentation inherited
345  public: virtual GizmoVisualPtr CreateGizmoVisual() override;
346 
347  // Documentation inherited
348  public: virtual GizmoVisualPtr CreateGizmoVisual(unsigned int _id)
349  override;
350 
351  // Documentation inherited
352  public: virtual GizmoVisualPtr CreateGizmoVisual(const std::string &_name)
353  override;
354 
355  // Documentation inherited
356  public: virtual GizmoVisualPtr CreateGizmoVisual(unsigned int _id,
357  const std::string &_name) override;
358 
359 
360  public: virtual GeometryPtr CreateBox() override;
361 
362  public: virtual GeometryPtr CreateCone() override;
363 
364  public: virtual GeometryPtr CreateCylinder() override;
365 
366  public: virtual GeometryPtr CreatePlane() override;
367 
368  public: virtual GeometryPtr CreateSphere() override;
369 
370  public: virtual MeshPtr CreateMesh(const std::string &_meshName) override;
371 
372  public: virtual MeshPtr CreateMesh(const common::Mesh *_mesh) override;
373 
374  public: virtual MeshPtr CreateMesh(const MeshDescriptor &_desc) override;
375 
376  // Documentation inherited.
377  public: virtual GridPtr CreateGrid() override;
378 
379  // Documentation inherited.
380  public: virtual MarkerPtr CreateMarker() override;
381 
382  // Documentation inherited.
383  public: virtual TextPtr CreateText() override;
384 
385  public: virtual MaterialPtr CreateMaterial(const std::string &_name = "")
386  override;
387 
388  public: virtual MaterialPtr CreateMaterial(
389  const common::Material &_material) override;
390 
391  public: virtual RenderTexturePtr CreateRenderTexture() override;
392 
393  // Documentation inherited.
394  public: virtual RenderWindowPtr CreateRenderWindow() override;
395 
396  public: virtual RayQueryPtr CreateRayQuery() override;
397 
398  public: virtual void PreRender() override;
399 
400  public: virtual void Clear() override;
401 
402  public: virtual void Destroy() override;
403 
404  protected: virtual unsigned int CreateObjectId();
405 
406  protected: virtual std::string CreateObjectName(unsigned int _id,
407  const std::string &_prefix);
408 
409  protected: virtual bool RegisterLight(LightPtr _light);
410 
411  protected: virtual bool RegisterSensor(SensorPtr _vensor);
412 
413  protected: virtual bool RegisterVisual(VisualPtr _visual);
414 
415  protected: virtual DirectionalLightPtr CreateDirectionalLightImpl(
416  unsigned int _id, const std::string &_name) = 0;
417 
418  protected: virtual PointLightPtr CreatePointLightImpl(unsigned int _id,
419  const std::string &_name) = 0;
420 
421  protected: virtual SpotLightPtr CreateSpotLightImpl(unsigned int _id,
422  const std::string &_name) = 0;
423 
424  protected: virtual CameraPtr CreateCameraImpl(unsigned int _id,
425  const std::string &_name) = 0;
426 
427  protected: virtual DepthCameraPtr CreateDepthCameraImpl(unsigned int _id,
428  const std::string &_name) = 0;
429 
434  unsigned int _id, const std::string &_name)
435  {
436  // The following two lines will avoid doxygen warnings
437  (void)_id;
438  (void)_name;
439  ignerr << "Thermal camera not supported by: "
440  << this->Engine()->Name() << std::endl;
441  return ThermalCameraPtr();
442  }
443 
447  protected: virtual GpuRaysPtr CreateGpuRaysImpl(unsigned int _id,
448  const std::string & _name)
449  {
450  (void)_id;
451  (void)_name;
452  ignerr << "GpuRays not supported by: "
453  << this->Engine()->Name() << std::endl;
454  return GpuRaysPtr();
455  }
456 
457  protected: virtual VisualPtr CreateVisualImpl(unsigned int _id,
458  const std::string &_name) = 0;
459 
460  protected: virtual ArrowVisualPtr CreateArrowVisualImpl(unsigned int _id,
461  const std::string &_name) = 0;
462 
463  protected: virtual AxisVisualPtr CreateAxisVisualImpl(unsigned int _id,
464  const std::string &_name) = 0;
465 
469  protected: virtual GizmoVisualPtr CreateGizmoVisualImpl(unsigned int _id,
470  const std::string &_name)
471  {
472  (void)_id;
473  (void)_name;
474  ignerr << "GizmoVisual not supported by: "
475  << this->Engine()->Name() << std::endl;
476  return GizmoVisualPtr();
477  }
478 
479  protected: virtual GeometryPtr CreateBoxImpl(unsigned int _id,
480  const std::string &_name) = 0;
481 
482  protected: virtual GeometryPtr CreateConeImpl(unsigned int _id,
483  const std::string &_name) = 0;
484 
485  protected: virtual GeometryPtr CreateCylinderImpl(unsigned int _id,
486  const std::string &_name) = 0;
487 
488  protected: virtual GeometryPtr CreatePlaneImpl(unsigned int _id,
489  const std::string &_name) = 0;
490 
491  protected: virtual GeometryPtr CreateSphereImpl(unsigned int _id,
492  const std::string &_name) = 0;
493 
494  protected: virtual MeshPtr CreateMeshImpl(unsigned int _id,
495  const std::string &_name,
496  const MeshDescriptor &_desc) = 0;
497 
502  protected: virtual GridPtr CreateGridImpl(unsigned int _id,
503  const std::string &_name) = 0;
504 
509  protected: virtual MarkerPtr CreateMarkerImpl(unsigned int _id,
510  const std::string &_name) = 0;
511 
516  protected: virtual TextPtr CreateTextImpl(unsigned int _id,
517  const std::string &_name);
518 
519  protected: virtual MaterialPtr CreateMaterialImpl(unsigned int _id,
520  const std::string &_name) = 0;
521 
522  protected: virtual RenderTexturePtr CreateRenderTextureImpl(
523  unsigned int _id, const std::string &_name) = 0;
524 
530  protected: virtual RenderWindowPtr CreateRenderWindowImpl(
531  unsigned int _id, const std::string &_name) = 0;
532 
533  protected: virtual RayQueryPtr CreateRayQueryImpl(
534  unsigned int _id, const std::string &_name) = 0;
535 
536  protected: virtual LightStorePtr Lights() const = 0;
537 
538  protected: virtual SensorStorePtr Sensors() const = 0;
539 
540  protected: virtual VisualStorePtr Visuals() const = 0;
541 
542  protected: virtual MaterialMapPtr Materials() const = 0;
543 
544  protected: virtual bool LoadImpl() = 0;
545 
546  protected: virtual bool InitImpl() = 0;
547 
548  private: virtual void CreateNodeStore();
549 
550  private: virtual void CreateMaterials();
551 
557  private: void DestroyNodeRecursive(NodePtr _node,
558  std::set<unsigned int> &_nodeIds);
559 
560  protected: unsigned int id;
561 
563  protected: std::string name;
565 
566  protected: common::Time simTime;
567 
568  protected: bool loaded;
569 
570  protected: bool initialized;
571 
574 
583 
585  protected: bool isGradientBackgroundColor = false;
586 
587  private: unsigned int nextObjectId;
588 
590  private: NodeStorePtr nodes;
592  };
593  }
594  }
595 }
596 #endif
virtual PointLightPtr CreatePointLightImpl(unsigned int _id, const std::string &_name)=0
virtual void DestroyLight(LightPtr _light, bool _recursive=false) override
virtual void DestroyVisualByIndex(unsigned int _index) override
virtual MaterialPtr Material(const std::string &_name) const override
virtual SensorStorePtr Sensors() const =0
virtual AxisVisualPtr CreateAxisVisual() override
virtual SensorPtr SensorById(unsigned int _id) const override
virtual MaterialMapPtr Materials() const =0
shared_ptr< GpuRays > GpuRaysPtr
Shared pointer to GpuRays.
Definition: gz/rendering/RenderTypes.hh:107
STL class.
STL class.
#define IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
virtual math::Color BackgroundColor() const override
virtual GeometryPtr CreateConeImpl(unsigned int _id, const std::string &_name)=0
virtual RayQueryPtr CreateRayQuery() override
virtual void DestroyNodeByIndex(unsigned int _index) override
virtual SensorPtr SensorByIndex(unsigned int _index) const override
Describes how a Mesh should be loaded.
Definition: gz/rendering/MeshDescriptor.hh:44
virtual MaterialPtr CreateMaterialImpl(unsigned int _id, const std::string &_name)=0
virtual std::string Name() const override
virtual bool HasLightName(const std::string &_name) const override
virtual SensorPtr SensorByName(const std::string &_name) const override
virtual void DestroySensor(SensorPtr _sensor, bool _recursive=false) override
virtual bool RegisterVisual(VisualPtr _visual)
virtual VisualPtr CreateVisual() override
virtual GeometryPtr CreatePlane() override
virtual bool HasSensor(ConstSensorPtr _sensor) const override
virtual void RegisterMaterial(const std::string &_name, MaterialPtr _material) override
virtual bool IsGradientBackgroundColor() const override
virtual RenderTexturePtr CreateRenderTexture() override
virtual bool HasSensorId(unsigned int _id) const override
virtual unsigned int Id() const override
virtual RenderTexturePtr CreateRenderTextureImpl(unsigned int _id, const std::string &_name)=0
virtual LightPtr LightByName(const std::string &_name) const override
virtual RayQueryPtr CreateRayQueryImpl(unsigned int _id, const std::string &_name)=0
virtual void DestroyNode(NodePtr _node, bool _recursive=false) override
virtual unsigned int VisualCount() const override
virtual bool HasLightId(unsigned int _id) const override
virtual void DestroyNodes() override
virtual void DestroySensors() override
virtual NodePtr NodeByIndex(unsigned int _index) const override
virtual GizmoVisualPtr CreateGizmoVisual() override
virtual VisualPtr VisualAt(const CameraPtr &_camera, const gz::math::Vector2i &_mousePos) override
virtual void Load() override
virtual TextPtr CreateText() override
virtual DirectionalLightPtr CreateDirectionalLightImpl(unsigned int _id, const std::string &_name)=0
virtual GeometryPtr CreateBox() override
virtual void DestroyLightByName(const std::string &_name) override
virtual bool HasLight(ConstLightPtr _light) const override
virtual DepthCameraPtr CreateDepthCamera() override
virtual void SetGradientBackgroundColor(const std::array< math::Color, 4 > &_colors) override
virtual RenderWindowPtr CreateRenderWindowImpl(unsigned int _id, const std::string &_name)=0
Render engine specific implementation for creating a render window.
virtual bool HasNode(ConstNodePtr _node) const override
virtual TextPtr CreateTextImpl(unsigned int _id, const std::string &_name)
Implementation for creating a text's geometry object.
virtual GeometryPtr CreateCylinder() override
#define ignerr
virtual unsigned int NodeCount() const override
virtual bool HasNodeName(const std::string &_name) const override
virtual MarkerPtr CreateMarker() override
Manages a single scene-graph. This class updates scene-wide properties and holds the root scene node....
Definition: gz/rendering/Scene.hh:48
virtual SpotLightPtr CreateSpotLightImpl(unsigned int _id, const std::string &_name)=0
virtual void DestroyVisualByName(const std::string &_name) override
virtual bool IsInitialized() const override
virtual std::array< math::Color, 4 > GradientBackgroundColor() const override
virtual bool RegisterLight(LightPtr _light)
virtual GeometryPtr CreateSphere() override
virtual void Fini() override
virtual LightPtr LightByIndex(unsigned int _index) const override
virtual std::string CreateObjectName(unsigned int _id, const std::string &_prefix)
virtual void Clear() override
virtual GeometryPtr CreateCone() override
virtual void DestroySensorByName(const std::string &_name) override
virtual common::Time SimTime() const override
virtual NodePtr NodeById(unsigned int _id) const override
virtual unsigned int CreateObjectId()
virtual LightPtr LightById(unsigned int _id) const override
virtual MeshPtr CreateMeshImpl(unsigned int _id, const std::string &_name, const MeshDescriptor &_desc)=0
virtual VisualPtr VisualByName(const std::string &_name) const override
virtual LightStorePtr Lights() const =0
virtual GeometryPtr CreatePlaneImpl(unsigned int _id, const std::string &_name)=0
virtual void UnregisterMaterials() override
STL class.
common::Time simTime
Definition: gz/rendering/base/BaseScene.hh:566
virtual void DestroyLightById(unsigned int _id) override
math::Color backgroundColor
Scene background color. Default should be black.
Definition: gz/rendering/base/BaseScene.hh:573
virtual void DestroyNodeById(unsigned int _id) override
virtual DirectionalLightPtr CreateDirectionalLight() override
virtual unsigned int LightCount() const override
virtual void DestroyLights() override
virtual GpuRaysPtr CreateGpuRays() override
virtual bool HasVisual(ConstVisualPtr _visual) const override
virtual void DestroyVisualById(unsigned int _id) override
shared_ptr< GizmoVisual > GizmoVisualPtr
Shared pointer to GizmoVisual.
Definition: gz/rendering/RenderTypes.hh:123
virtual void DestroyMaterials() override
virtual void DestroyVisual(VisualPtr _visual, bool _recursive=false) override
virtual ArrowVisualPtr CreateArrowVisualImpl(unsigned int _id, const std::string &_name)=0
virtual VisualStorePtr Visuals() const =0
virtual void SetAmbientLight(double _r, double _g, double _b, double _a=1.0) override
virtual void DestroyNodeByName(const std::string &_name) override
virtual void Init() override
virtual CameraPtr CreateCamera() override
virtual void DestroyMaterial(MaterialPtr _material) override
virtual GpuRaysPtr CreateGpuRaysImpl(unsigned int _id, const std::string &_name)
Implementation for creating GpuRays sensor.
Definition: gz/rendering/base/BaseScene.hh:447
shared_ptr< ThermalCamera > ThermalCameraPtr
Shared pointer to ThermalCamera.
Definition: gz/rendering/RenderTypes.hh:103
virtual PointLightPtr CreatePointLight() override
virtual bool HasNodeId(unsigned int _id) const override
virtual void Destroy() override
virtual ThermalCameraPtr CreateThermalCamera() override
virtual GeometryPtr CreateBoxImpl(unsigned int _id, const std::string &_name)=0
T endl(T... args)
Definition: gz/rendering/base/BaseScene.hh:37
virtual CameraPtr CreateCameraImpl(unsigned int _id, const std::string &_name)=0
virtual SpotLightPtr CreateSpotLight() override
virtual bool MaterialRegistered(const std::string &_name) const override
virtual void DestroyLightByIndex(unsigned int _index) override
virtual bool HasVisualId(unsigned int _id) const override
virtual VisualPtr VisualById(unsigned int _id) const override
virtual AxisVisualPtr CreateAxisVisualImpl(unsigned int _id, const std::string &_name)=0
virtual void DestroySensorById(unsigned int _id) override
virtual void DestroyVisuals() override
bool initialized
Definition: gz/rendering/base/BaseScene.hh:570
BaseScene(unsigned int _id, const std::string &_name)
virtual NodePtr NodeByName(const std::string &_name) const override
virtual bool HasVisualName(const std::string &_name) const override
virtual MeshPtr CreateMesh(const std::string &_meshName) override
virtual GridPtr CreateGrid() override
virtual bool IsLoaded() const
virtual GizmoVisualPtr CreateGizmoVisualImpl(unsigned int _id, const std::string &_name)
Implementation for creating a GizmoVisual.
Definition: gz/rendering/base/BaseScene.hh:469
virtual void DestroySensorByIndex(unsigned int _index) override
unsigned int id
Definition: gz/rendering/base/BaseScene.hh:560
virtual ArrowVisualPtr CreateArrowVisual() override
virtual ThermalCameraPtr CreateThermalCameraImpl(unsigned int _id, const std::string &_name)
Implementation for creating a thermal camera.
Definition: gz/rendering/base/BaseScene.hh:433
virtual void SetBackgroundColor(double _r, double _g, double _b, double _a=1.0) override
std::array< math::Color, 4 > gradientBackgroundColor
The four corners of the gradient background color. Next is the description of how to interpret each v...
Definition: gz/rendering/base/BaseScene.hh:582
virtual DepthCameraPtr CreateDepthCameraImpl(unsigned int _id, const std::string &_name)=0
virtual GridPtr CreateGridImpl(unsigned int _id, const std::string &_name)=0
Implementation for creating a grid geometry object.
virtual RenderWindowPtr CreateRenderWindow() override
virtual unsigned int SensorCount() const override
virtual void UnregisterMaterial(const std::string &_name) override
std::string name
Definition: gz/rendering/base/BaseScene.hh:563
Represents a surface material of a Geometry.
Definition: gz/rendering/Material.hh:47
bool loaded
Definition: gz/rendering/base/BaseScene.hh:568
virtual GeometryPtr CreateSphereImpl(unsigned int _id, const std::string &_name)=0
virtual bool HasSensorName(const std::string &_name) const override
virtual VisualPtr CreateVisualImpl(unsigned int _id, const std::string &_name)=0
virtual MaterialPtr CreateMaterial(const std::string &_name="") override
STL class.
virtual void PreRender() override
virtual bool RegisterSensor(SensorPtr _vensor)
virtual void SetSimTime(const common::Time &_time) override
virtual GeometryPtr CreateCylinderImpl(unsigned int _id, const std::string &_name)=0
virtual VisualPtr VisualByIndex(unsigned int _index) const override
virtual MarkerPtr CreateMarkerImpl(unsigned int _id, const std::string &_name)=0
Implementation for creating a marker geometry object.
#define IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
bool isGradientBackgroundColor
Whether the scene has a gradient background.
Definition: gz/rendering/base/BaseScene.hh:585
virtual void RemoveGradientBackgroundColor() override