Gazebo Rendering

API Reference

9.0.0~pre2
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/utils/SuppressWarning.hh>
26
28#include "gz/rendering/Scene.hh"
30
31namespace gz
32{
33 namespace rendering
34 {
35 inline namespace GZ_RENDERING_VERSION_NAMESPACE {
36 //
37 class GZ_RENDERING_VISIBLE BaseScene :
38 GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING
39 public std::enable_shared_from_this<BaseScene>,
40 GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING
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 std::chrono::steady_clock::duration Time()
62 const override;
63
64 public: virtual void SetTime(
65 const std::chrono::steady_clock::duration &_time) override;
66
67 public: virtual void SetAmbientLight(double _r, double _g, double _b,
68 double _a = 1.0) override;
69
70 public: virtual void SetAmbientLight(const math::Color &_color)
71 override = 0;
72
73 public: virtual math::Color BackgroundColor() const override;
74
75 public: virtual void SetBackgroundColor(double _r, double _g, double _b,
76 double _a = 1.0) override;
77
78 public: virtual void SetBackgroundColor(const math::Color &_color)
79 override;
80
81 // Documentation inherited.
82 public: virtual bool IsGradientBackgroundColor() const override;
83
84 // Documentation inherited.
86 const override;
87
88 // Documentation inherited.
89 public: virtual void SetGradientBackgroundColor(
90 const std::array<math::Color, 4> &_colors) override;
91
92 // Documentation inherited.
93 public: virtual void RemoveGradientBackgroundColor() override;
94
95 // Documentation inherited.
96 public: virtual MaterialPtr BackgroundMaterial() const override;
97
98 // Documentation inherited.
99 public: virtual void SetBackgroundMaterial(MaterialPtr _material)
100 override;
101
102 public: virtual unsigned int NodeCount() const override;
103
104 public: virtual bool HasNode(ConstNodePtr _node) const override;
105
106 public: virtual bool HasNodeId(unsigned int _id) const override;
107
108 public: virtual bool HasNodeName(const std::string &_name) const override;
109
110 public: virtual NodePtr NodeById(unsigned int _id) const override;
111
112 public: virtual NodePtr NodeByName(const std::string &_name) const
113 override;
114
115 public: virtual NodePtr NodeByIndex(unsigned int _index) const override;
116
117 // Documentation inherited.
118 public: virtual void DestroyNode(NodePtr _node, bool _recursive = false)
119 override;
120
121 public: virtual void DestroyNodeById(unsigned int _id) override;
122
123 public: virtual void DestroyNodeByName(const std::string &_name) override;
124
125 public: virtual void DestroyNodeByIndex(unsigned int _index) override;
126
127 public: virtual void DestroyNodes() override;
128
129 public: virtual unsigned int LightCount() const override;
130
131 public: virtual bool HasLight(ConstLightPtr _light) const override;
132
133 public: virtual bool HasLightId(unsigned int _id) const override;
134
135 public: virtual bool HasLightName(const std::string &_name) const
136 override;
137
138 public: virtual LightPtr LightById(unsigned int _id) const override;
139
140 public: virtual LightPtr LightByName(const std::string &_name) const
141 override;
142
143 public: virtual LightPtr LightByIndex(unsigned int _index) const override;
144
145 // Documentation inherited.
146 public: virtual void DestroyLight(LightPtr _light,
147 bool _recursive = false) override;
148
149 public: virtual void DestroyLightById(unsigned int _id) override;
150
151 public: virtual void DestroyLightByName(const std::string &_name)
152 override;
153
154 public: virtual void DestroyLightByIndex(unsigned int _index) override;
155
156 public: virtual void DestroyLights() override;
157
158 public: virtual unsigned int SensorCount() const override;
159
160 public: virtual bool HasSensor(ConstSensorPtr _sensor) const override;
161
162 public: virtual bool HasSensorId(unsigned int _id) const override;
163
164 public: virtual bool HasSensorName(const std::string &_name) const
165 override;
166
167 public: virtual SensorPtr SensorById(unsigned int _id) const override;
168
169 public: virtual SensorPtr SensorByName(const std::string &_name) const
170 override;
171
172 public: virtual SensorPtr SensorByIndex(unsigned int _index) const
173 override;
174
175 // Documentation inherited.
176 public: virtual void DestroySensor(SensorPtr _sensor,
177 bool _recursive = false) override;
178
179 public: virtual void DestroySensorById(unsigned int _id) override;
180
181 public: virtual void DestroySensorByName(const std::string &_name)
182 override;
183
184 public: virtual void DestroySensorByIndex(unsigned int _index) override;
185
186 public: virtual void DestroySensors() override;
187
188 public: virtual unsigned int VisualCount() const override;
189
190 public: virtual bool HasVisual(ConstVisualPtr _visual) const override;
191
192 public: virtual bool HasVisualId(unsigned int _id) const override;
193
194 public: virtual bool HasVisualName(const std::string &_name) const
195 override;
196
197 public: virtual VisualPtr VisualById(unsigned int _id) const override;
198
199 public: virtual VisualPtr VisualByName(const std::string &_name) const
200 override;
201
202 public: virtual VisualPtr VisualByIndex(unsigned int _index) const
203 override;
204
205 // Documentation inherited
206 public: virtual VisualPtr VisualAt(const CameraPtr &_camera,
207 const gz::math::Vector2i &_mousePos) override;
208
209 // Documentation inherited.
210 public: virtual void DestroyVisual(VisualPtr _visual,
211 bool _recursive = false) override;
212
213 public: virtual void DestroyVisualById(unsigned int _id) override;
214
215 public: virtual void DestroyVisualByName(const std::string &_name)
216 override;
217
218 public: virtual void DestroyVisualByIndex(unsigned int _index) override;
219
220 public: virtual void DestroyVisuals() override;
221
222 public: virtual bool MaterialRegistered(const std::string &_name) const
223 override;
224
225 public: virtual MaterialPtr Material(const std::string &_name) const
226 override;
227
228 public: virtual void RegisterMaterial(const std::string &_name,
229 MaterialPtr _material) override;
230
231 public: virtual void UnregisterMaterial(const std::string &_name)
232 override;
233
234 public: virtual void UnregisterMaterials() override;
235
236 // Documentation inherited
237 public: virtual void DestroyMaterial(MaterialPtr _material) override;
238
239 // Documentation inherited
240 public: virtual void DestroyMaterials() override;
241
242 public: virtual DirectionalLightPtr CreateDirectionalLight() override;
243
245 unsigned int _id) override;
246
248 const std::string &_name) override;
249
251 unsigned int _id, const std::string &_name) override;
252
253 public: virtual PointLightPtr CreatePointLight() override;
254
255 public: virtual PointLightPtr CreatePointLight(unsigned int _id) override;
256
257 public: virtual PointLightPtr CreatePointLight(const std::string &_name)
258 override;
259
260 public: virtual PointLightPtr CreatePointLight(unsigned int _id,
261 const std::string &_name) override;
262
267 protected: virtual COMVisualPtr CreateCOMVisualImpl(unsigned int _id,
268 const std::string &_name) = 0;
269
275 unsigned int _id, const std::string &_name) = 0;
276
281 protected: virtual JointVisualPtr CreateJointVisualImpl(unsigned int _id,
282 const std::string &_name) = 0;
283
288 protected: virtual LightVisualPtr CreateLightVisualImpl(unsigned int _id,
289 const std::string &_name) = 0;
290
291 public: virtual SpotLightPtr CreateSpotLight() override;
292
293 public: virtual SpotLightPtr CreateSpotLight(unsigned int _id) override;
294
295 public: virtual SpotLightPtr CreateSpotLight(const std::string &_name)
296 override;
297
298 public: virtual SpotLightPtr CreateSpotLight(unsigned int _id,
299 const std::string &_name) override;
300
301 public: virtual CameraPtr CreateCamera() override;
302
303 public: virtual CameraPtr CreateCamera(unsigned int _id) override;
304
305 public: virtual CameraPtr CreateCamera(const std::string &_name) override;
306
307 public: virtual CameraPtr CreateCamera(unsigned int _id,
308 const std::string &_name) override;
309
310 public: virtual DepthCameraPtr CreateDepthCamera() override;
311
312 public: virtual DepthCameraPtr CreateDepthCamera(const unsigned int _id)
313 override;
314
316 const std::string &_name) override;
317
318 public: virtual DepthCameraPtr CreateDepthCamera(const unsigned int _id,
319 const std::string &_name) override;
320
321 // Documentation inherited.
322 public: virtual ThermalCameraPtr CreateThermalCamera() override;
323
324 // Documentation inherited.
326 const unsigned int _id) override;
327
328 // Documentation inherited.
330 const std::string &_name) override;
331
332 // Documentation inherited.
334 const unsigned int _id, const std::string &_name) override;
335
336 // Documentation inherited.
338
339 // Documentation inherited.
341 const unsigned int _id) override;
342
343 // Documentation inherited.
345 const std::string &_name) override;
346
347 // Documentation inherited.
349 const unsigned int _id, const std::string &_name) override;
350
351 // Documentation inherited.
353
354 // Documentation inherited.
356 const unsigned int _id) override;
357
358 // Documentation inherited.
360 const std::string &_name) override;
361
362 // Documentation inherited.
364 const unsigned int _id, const std::string &_name) override;
365
366 // Documentation inherited.
367 public: virtual WideAngleCameraPtr CreateWideAngleCamera() override;
368
369 // Documentation inherited.
371 const unsigned int _id) override;
372
373 // Documentation inherited.
375 const std::string &_name) override;
376
377 // Documentation inherited.
379 const unsigned int _id, const std::string &_name) override;
380
381 // Documentation inherited.
382 public: virtual GpuRaysPtr CreateGpuRays() override;
383
384 // Documentation inherited.
385 public: virtual GpuRaysPtr CreateGpuRays(const unsigned int _id) override;
386
387 // Documentation inherited.
388 public: virtual GpuRaysPtr CreateGpuRays(
389 const std::string &_name) override;
390
391 // Documentation inherited.
392 public: virtual GpuRaysPtr CreateGpuRays(const unsigned int _id,
393 const std::string &_name) override;
394
395 public: virtual VisualPtr CreateVisual() override;
396
397 public: virtual VisualPtr CreateVisual(unsigned int _id) override;
398
399 public: virtual VisualPtr CreateVisual(const std::string &_name) override;
400
401 public: virtual VisualPtr CreateVisual(unsigned int _id,
402 const std::string &_name) override;
403
404 public: virtual ArrowVisualPtr CreateArrowVisual() override;
405
406 public: virtual ArrowVisualPtr CreateArrowVisual(unsigned int _id)
407 override;
408
410 const std::string &_name) override;
411
412 public: virtual ArrowVisualPtr CreateArrowVisual(unsigned int _id,
413 const std::string &_name) override;
414
415 public: virtual AxisVisualPtr CreateAxisVisual() override;
416
417 public: virtual AxisVisualPtr CreateAxisVisual(unsigned int _id) override;
418
419 public: virtual AxisVisualPtr CreateAxisVisual(const std::string &_name)
420 override;
421
422 public: virtual AxisVisualPtr CreateAxisVisual(unsigned int _id,
423 const std::string &_name) override;
424
425 // Documentation inherited
426 public: virtual COMVisualPtr CreateCOMVisual() override;
427
428 // Documentation inherited
429 public: virtual COMVisualPtr CreateCOMVisual(unsigned int _id)
430 override;
431
432 // Documentation inherited
433 public: virtual COMVisualPtr CreateCOMVisual(const std::string &_name)
434 override;
435
436 // Documentation inherited
437 public: virtual COMVisualPtr CreateCOMVisual(unsigned int _id,
438 const std::string &_name) override;
439
440 public: virtual InertiaVisualPtr CreateInertiaVisual() override;
441
442 // Documentation inherited
443 public: virtual InertiaVisualPtr CreateInertiaVisual(unsigned int _id)
444 override;
445
446 // Documentation inherited
448 const std::string &_name) override;
449
450 // Documentation inherited
451 public: virtual InertiaVisualPtr CreateInertiaVisual(unsigned int _id,
452 const std::string &_name) override;
453
454 // Documentation inherited
455 public: virtual JointVisualPtr CreateJointVisual() override;
456
457 // Documentation inherited
458 public: virtual JointVisualPtr CreateJointVisual(unsigned int _id)
459 override;
460
461 // Documentation inherited
463 const std::string &_name) override;
464
465 // Documentation inherited
466 public: virtual JointVisualPtr CreateJointVisual(unsigned int _id,
467 const std::string &_name) override;
468
469 // Documentation inherited
470 public: virtual LightVisualPtr CreateLightVisual() override;
471
472 // Documentation inherited
473 public: virtual LightVisualPtr CreateLightVisual(unsigned int _id)
474 override;
475
476 // Documentation inherited
477 public: virtual LightVisualPtr CreateLightVisual(const std::string &_name)
478 override;
479
480 // Documentation inherited
481 public: virtual LightVisualPtr CreateLightVisual(unsigned int _id,
482 const std::string &_name) override;
483
484 // Documentation inherited
485 public: virtual GizmoVisualPtr CreateGizmoVisual() override;
486
487 // Documentation inherited
488 public: virtual GizmoVisualPtr CreateGizmoVisual(unsigned int _id)
489 override;
490
491 // Documentation inherited
492 public: virtual GizmoVisualPtr CreateGizmoVisual(const std::string &_name)
493 override;
494
495 // Documentation inherited
496 public: virtual GizmoVisualPtr CreateGizmoVisual(unsigned int _id,
497 const std::string &_name) override;
498
499
500 public: virtual GeometryPtr CreateBox() override;
501
502 public: virtual GeometryPtr CreateCone() override;
503
504 public: virtual GeometryPtr CreateCylinder() override;
505
506 public: virtual GeometryPtr CreatePlane() override;
507
508 public: virtual GeometryPtr CreateSphere() override;
509
510 public: virtual MeshPtr CreateMesh(const std::string &_meshName) override;
511
512 public: virtual MeshPtr CreateMesh(const common::Mesh *_mesh) override;
513
514 public: virtual MeshPtr CreateMesh(const MeshDescriptor &_desc) override;
515
516 // Documentation inherited.
517 public: virtual CapsulePtr CreateCapsule() override;
518
519 // Documentation inherited.
520 public: virtual GridPtr CreateGrid() override;
521
522 // Documentation inherited.
523 public: virtual MarkerPtr CreateMarker() override;
524
525 // Documentation inherited.
526 public: virtual LidarVisualPtr CreateLidarVisual() override;
527
528 // Documentation inherited.
530 unsigned int _id) override;
531
532 // Documentation inherited.
534 const std::string &_name) override;
535
536 // Documentation inherited.
537 public: virtual LidarVisualPtr CreateLidarVisual(unsigned int _id,
538 const std::string &_name) override;
539
540 // Documentation inherited.
542 const HeightmapDescriptor &_desc) override;
543
544 // Documentation inherited.
545 public: virtual WireBoxPtr CreateWireBox() override;
546
547 // Documentation inherited.
548 public: virtual TextPtr CreateText() override;
549
550 public: virtual MaterialPtr CreateMaterial(const std::string &_name = "")
551 override;
552
554 const common::Material &_material) override;
555
556 public: virtual RenderTexturePtr CreateRenderTexture() override;
557
558 // Documentation inherited.
559 public: virtual RenderWindowPtr CreateRenderWindow() override;
560
561 public: virtual RayQueryPtr CreateRayQuery() override;
562
563 // Documentation inherited.
564 public: virtual ParticleEmitterPtr CreateParticleEmitter() override;
565
566 // Documentation inherited.
567 public: virtual ParticleEmitterPtr CreateParticleEmitter(unsigned int _id)
568 override;
569
570 // Documentation inherited.
572 const std::string &_name) override;
573
574 // Documentation inherited.
576 unsigned int _id, const std::string &_name) override;
577
578 // Documentation inherited.
579 public: virtual ProjectorPtr CreateProjector() override;
580
581 // Documentation inherited.
582 public: virtual ProjectorPtr CreateProjector(unsigned int _id)
583 override;
584
585 // Documentation inherited.
587 const std::string &_name) override;
588
589 // Documentation inherited.
591 unsigned int _id, const std::string &_name) override;
592
593 // Documentation inherited.
594 public: virtual GlobalIlluminationVctPtr
596
597 // Documentation inherited.
599 unsigned int _id) override;
600
601 // Documentation inherited.
603 const std::string &_name) override;
604
605 // Documentation inherited.
607 unsigned int _id, const std::string &_name) override;
608
609 // Documentation inherited.
610 public: virtual GlobalIlluminationCiVctPtr
612
613 // Documentation inherited.
615 unsigned int _id) override;
616
617 // Documentation inherited.
619 const std::string &_name) override;
620
621 // Documentation inherited.
623 unsigned int _id, const std::string &_name) override;
624
625 // Documentation inherited.
626 public: virtual void SetSkyEnabled(bool _enabled) override;
627
628 // Documentation inherited.
629 public: virtual bool SkyEnabled() const override;
630
631 // Documentation inherited.
632 public: virtual bool SetShadowTextureSize(LightType _lightType,
633 unsigned int _textureSize) override;
634
635 // Documentation inherited.
636 public: virtual unsigned int ShadowTextureSize(LightType _lightType) const
637 override;
638
639 // Documentation inherited.
640 public: virtual void SetActiveGlobalIllumination(
641 GlobalIlluminationBasePtr _gi) override;
642
643 public: virtual void PreRender() override;
644
645 public: virtual void Clear() override;
646
647 public: virtual void Destroy() override;
648
649 // Documentation inherited.
650 public: virtual void PostRender() override;
651
652 // Documentation inherited.
653 public: virtual void SetCameraPassCountPerGpuFlush(
654 uint8_t _numPass) override;
655
656 // Documentation inherited.
657 public: virtual uint8_t CameraPassCountPerGpuFlush() const override;
658
659 // Documentation inherited.
660 public: virtual bool LegacyAutoGpuFlush() const override;
661
662 protected: virtual unsigned int CreateObjectId();
663
664 protected: virtual std::string CreateObjectName(unsigned int _id,
665 const std::string &_prefix);
666
667 protected: virtual bool RegisterLight(LightPtr _light);
668
669 protected: virtual bool RegisterSensor(SensorPtr _vensor);
670
671 protected: virtual bool RegisterVisual(VisualPtr _visual);
672
674 unsigned int _id, const std::string &_name) = 0;
675
676 protected: virtual PointLightPtr CreatePointLightImpl(unsigned int _id,
677 const std::string &_name) = 0;
678
679 protected: virtual SpotLightPtr CreateSpotLightImpl(unsigned int _id,
680 const std::string &_name) = 0;
681
682 protected: virtual CameraPtr CreateCameraImpl(unsigned int _id,
683 const std::string &_name) = 0;
684
685 protected: virtual DepthCameraPtr CreateDepthCameraImpl(unsigned int _id,
686 const std::string &_name) = 0;
687
692 unsigned int _id, const std::string &_name)
693 {
694 // The following two lines will avoid doxygen warnings
695 (void)_id;
696 (void)_name;
697 gzerr << "Thermal camera not supported by: "
698 << this->Engine()->Name() << std::endl;
699 return ThermalCameraPtr();
700 }
701
707 unsigned int _id, const std::string &_name)
708 {
709 // The following two lines will avoid doxygen warnings
710 (void)_id;
711 (void)_name;
712 gzerr << "BoundingBox camera not supported by: "
713 << this->Engine()->Name() << std::endl;
714 return BoundingBoxCameraPtr();
715 }
716
722 unsigned int _id,
723 const std::string &_name)
724 {
725 // The following two lines will avoid doxygen warnings
726 (void)_id;
727 (void)_name;
728 gzerr << "Segmentation camera not supported by: "
729 << this->Engine()->Name() << std::endl;
730 return SegmentationCameraPtr();
731 }
732
738 unsigned int _id,
739 const std::string &_name)
740 {
741 // The following two lines will avoid doxygen warnings
742 (void)_id;
743 (void)_name;
744 gzerr << "Wide angle camera not supported by: "
745 << this->Engine()->Name() << std::endl;
746 return WideAngleCameraPtr();
747 }
748
752 protected: virtual GpuRaysPtr CreateGpuRaysImpl(unsigned int _id,
753 const std::string & _name)
754 {
755 (void)_id;
756 (void)_name;
757 gzerr << "GpuRays not supported by: "
758 << this->Engine()->Name() << std::endl;
759 return GpuRaysPtr();
760 }
761
762 protected: virtual VisualPtr CreateVisualImpl(unsigned int _id,
763 const std::string &_name) = 0;
764
765 protected: virtual ArrowVisualPtr CreateArrowVisualImpl(unsigned int _id,
766 const std::string &_name) = 0;
767
768 protected: virtual AxisVisualPtr CreateAxisVisualImpl(unsigned int _id,
769 const std::string &_name) = 0;
770
774 protected: virtual GizmoVisualPtr CreateGizmoVisualImpl(unsigned int _id,
775 const std::string &_name)
776 {
777 (void)_id;
778 (void)_name;
779 gzerr << "GizmoVisual not supported by: "
780 << this->Engine()->Name() << std::endl;
781 return GizmoVisualPtr();
782 }
783
784 protected: virtual GeometryPtr CreateBoxImpl(unsigned int _id,
785 const std::string &_name) = 0;
786
787 protected: virtual GeometryPtr CreateConeImpl(unsigned int _id,
788 const std::string &_name) = 0;
789
790 protected: virtual GeometryPtr CreateCylinderImpl(unsigned int _id,
791 const std::string &_name) = 0;
792
793 protected: virtual GeometryPtr CreatePlaneImpl(unsigned int _id,
794 const std::string &_name) = 0;
795
796 protected: virtual GeometryPtr CreateSphereImpl(unsigned int _id,
797 const std::string &_name) = 0;
798
799 protected: virtual MeshPtr CreateMeshImpl(unsigned int _id,
800 const std::string &_name,
801 const MeshDescriptor &_desc) = 0;
802
807 protected: virtual CapsulePtr CreateCapsuleImpl(unsigned int _id,
808 const std::string &_name) = 0;
809
814 protected: virtual GridPtr CreateGridImpl(unsigned int _id,
815 const std::string &_name) = 0;
816
821 protected: virtual MarkerPtr CreateMarkerImpl(unsigned int _id,
822 const std::string &_name) = 0;
823
828 protected: virtual LidarVisualPtr CreateLidarVisualImpl(unsigned int _id,
829 const std::string &_name) = 0;
830
836 protected: virtual HeightmapPtr CreateHeightmapImpl(unsigned int _id,
837 const std::string &_name,
838 const HeightmapDescriptor &_desc) = 0;
839
844 protected: virtual WireBoxPtr CreateWireBoxImpl(unsigned int _id,
845 const std::string &_name) = 0;
846
851 protected: virtual TextPtr CreateTextImpl(unsigned int _id,
852 const std::string &_name);
853
854 protected: virtual MaterialPtr CreateMaterialImpl(unsigned int _id,
855 const std::string &_name) = 0;
856
858 unsigned int _id, const std::string &_name) = 0;
859
866 unsigned int _id, const std::string &_name) = 0;
867
868 protected: virtual RayQueryPtr CreateRayQueryImpl(
869 unsigned int _id, const std::string &_name) = 0;
870
876 unsigned int _id, const std::string &_name)
877 {
878 (void)_id;
879 (void)_name;
880 gzerr << "ParticleEmitter not supported by: "
881 << this->Engine()->Name() << std::endl;
882 return ParticleEmitterPtr();
883 }
884
890 unsigned int _id, const std::string &_name)
891 {
892 (void)_id;
893 (void)_name;
894 gzerr << "Projector not supported by: "
895 << this->Engine()->Name() << std::endl;
896 return ProjectorPtr();
897 }
898
903 protected: virtual GlobalIlluminationVctPtr
905 unsigned int _id, const std::string &_name)
906 {
907 (void)_id;
908 (void)_name;
909 gzerr << "GlobalIlluminationVct not supported by: "
910 << this->Engine()->Name() << std::endl;
912 }
913
918 protected: virtual GlobalIlluminationCiVctPtr
920 unsigned int _id, const std::string &_name)
921 {
922 (void)_id;
923 (void)_name;
924 gzerr << "GlobalIlluminationCiVct not supported by: "
925 << this->Engine()->Name() << std::endl;
927 }
928
929 protected: virtual LightStorePtr Lights() const = 0;
930
931 protected: virtual SensorStorePtr Sensors() const = 0;
932
933 protected: virtual VisualStorePtr Visuals() const = 0;
934
935 protected: virtual MaterialMapPtr Materials() const = 0;
936
937 protected: virtual bool LoadImpl() = 0;
938
939 protected: virtual bool InitImpl() = 0;
940
941 private: virtual void CreateNodeStore();
942
943 private: virtual void CreateMaterials();
944
950 private: void DestroyNodeRecursive(NodePtr _node,
951 std::set<unsigned int> &_nodeIds);
952
953 protected: unsigned int id;
954
955 GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING
956 protected: std::string name;
957 GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING
958
959 protected: std::chrono::steady_clock::duration time =
960 std::chrono::steady_clock::duration::zero();
961
962 protected: bool loaded;
963
964 protected: bool initialized;
965
968
977
979 protected: bool isGradientBackgroundColor = false;
980
983
984 private: unsigned int nextObjectId;
985
986 GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING
987 private: NodeStorePtr nodes;
988 GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING
989 };
990 }
991 }
992}
993#endif