gz/rendering/Scene.hh
virtual VisualPtr RootVisual() const =0
Get root Visual node. All nodes that are desired to be rendered in a scene should be added to this Vi...
virtual MaterialPtr CreateMaterial(const std::string &_name="")=0
Create new material with the given name. Created material will have default properties.
virtual bool HasNodeName(const std::string &_name) const =0
Determine if a given node with the given name is managed by this Scene.
virtual void UnregisterMaterial(const std::string &_name)=0
Unregister material registered under the given name. If no material is registered under this name,...
virtual bool LegacyAutoGpuFlush() const =0
Checks if SetCameraPassCountPerGpuFlush is 0.
virtual JointVisualPtr CreateJointVisual()=0
Create new joint visual. A unique ID and name will automatically be assigned to the Joint visual.
virtual PointLightPtr CreatePointLight()=0
Create new point light. A unique ID and name will automatically be assigned to the light.
virtual void RemoveGradientBackgroundColor()=0
Remove the scene gradient background color.
virtual void DestroySensorByName(const std::string &_name)=0
Destroy sensor with the given name. If no sensor exists with the given name, no work will be done....
STL class.
virtual RenderTexturePtr CreateRenderTexture()=0
Create new render texture.
virtual unsigned int VisualCount() const =0
Get the number of nodes managed by this scene. Note these nodes may not be directly or indirectly att...
virtual bool HasSensorId(unsigned int _id) const =0
Determine if a given sensor with the given id is managed by this Scene.
Describes how a Heightmap should be loaded.
Definition: gz/rendering/HeightmapDescriptor.hh:146
virtual RayQueryPtr CreateRayQuery()=0
Create new ray query.
Describes how a Mesh should be loaded.
Definition: gz/rendering/MeshDescriptor.hh:44
virtual SensorPtr SensorByName(const std::string &_name) const =0
Get sensor with the given name. If no sensor exists with the given name, NULL will be returned.
virtual void DestroySensors()=0
Destroy all sensors manages by this scene.
virtual GeometryPtr CreateSphere()=0
Create new sphere or ellipsoid geometry This method allow to create ellipsoid too,...
virtual void DestroyNodeByIndex(unsigned int _index)=0
Destroy node at the given index. If no node exists at the given index, no work will be done....
virtual void DestroyVisualByName(const std::string &_name)=0
Destroy node with the given name. If no node exists with the given name, no work will be done....
virtual math::Color BackgroundColor() const =0
Get the scene background color.
virtual void SetGradientBackgroundColor(const std::array< math::Color, 4 > &_colors)=0
Set a custom gradient background color on top of the regular background. Default should be black.
virtual SpotLightPtr CreateSpotLight()=0
Create new spotlight. A unique ID and name will automatically be assigned to the light.
virtual void UnregisterMaterials()=0
Unregister all registered materials.
virtual void DestroyNodeByName(const std::string &_name)=0
Destroy node with the given name. If no node exists with the given name, no work will be done....
virtual RenderWindowPtr CreateRenderWindow()=0
Create new render window. This feature is render engine dependent. If the engine does not support att...
virtual HeightmapPtr CreateHeightmap(const HeightmapDescriptor &_desc)=0
Create new heightmap geomerty. The rendering::Heightmap will be created from the given HeightmapDescr...
virtual bool HasNode(ConstNodePtr _node) const =0
Determine if the given node is managed by this Scene.
virtual SensorPtr SensorByIndex(unsigned int _index) const =0
Get sensor at the given index. If no sensor exists at the given index, NULL will be returned.
virtual CapsulePtr CreateCapsule()=0
Create new capsule geometry.
virtual void Destroy()=0
Completely destroy the scene an all its resources. Continued use of this scene after its destruction ...
virtual RenderEngine * Engine() const =0
Get the creating render-engine of the scene.
virtual GeometryPtr CreatePlane()=0
Create new plane geometry.
Vector2< int > Vector2i
virtual ~Scene()
Deconstructor.
Definition: gz/rendering/Scene.hh:52
virtual void Fini()=0
virtual void SetBackgroundColor(double _r, double _g, double _b, double _a=1.0)=0
Set the scene background color.
virtual ParticleEmitterPtr CreateParticleEmitter()=0
Create new particle emitter. A unique ID and name will automatically be assigned to the visual.
virtual CameraPtr CreateCamera()=0
Create new camera. A unique ID and name will automatically be assigned to the camera.
virtual void Clear()=0
Remove and destroy all objects from the scene graph. This does not completely destroy scene resources...
virtual void DestroyVisualByIndex(unsigned int _index)=0
Destroy node at the given index. If no node exists at the given index, no work will be done....
virtual void SetSkyEnabled(bool _enabled)=0
Enable sky in the scene.
virtual VisualPtr VisualByIndex(unsigned int _index) const =0
Get node at the given index. If no node exists at the given index, NULL will be returned.
virtual void DestroyNodes()=0
Destroy all nodes manages by this scene.
virtual VisualPtr CreateVisual()=0
Create new visual. A unique ID and name will automatically be assigned to the visual.
virtual bool HasLight(ConstLightPtr _light) const =0
Determine if the given light is managed by this Scene.
virtual bool IsGradientBackgroundColor() const =0
Whether the scene has a gradient background or not (solid)
virtual bool SkyEnabled() const =0
Get whether the sky is enabled in the scene.
virtual bool HasLightId(unsigned int _id) const =0
Determine if a given light with the given id is managed by this Scene.
virtual VisualPtr VisualAt(const CameraPtr &_camera, const math::Vector2i &_mousePos)=0
Get a visual at a mouse position.
virtual bool IsInitialized() const =0
Determine if the scene is initialized.
Manages a single scene-graph. This class updates scene-wide properties and holds the root scene node....
Definition: gz/rendering/Scene.hh:49
virtual void DestroyLightByIndex(unsigned int _index)=0
Destroy light at the given index. If no light exists at the given index, no work will be done....
virtual std::array< math::Color, 4 > GradientBackgroundColor() const =0
Get the scene gradient background color.
virtual GpuRaysPtr CreateGpuRays()=0
Create new gpu rays caster. A unique ID and name will automatically be assigned to the gpu rays caste...
virtual bool HasNodeId(unsigned int _id) const =0
Determine if a given node with the given id is managed by this Scene.
virtual NodePtr NodeById(unsigned int _id) const =0
Get node with the given id. If no node exists with the given id, NULL will be returned.
virtual void DestroyNode(NodePtr _node, bool _recursive=false)=0
Destroy given node. If the given node is not managed by this scene, no work will be done....
Represents a collection of mesh geometries.
Definition: gz/rendering/Mesh.hh:37
virtual void DestroyMaterials()=0
Unregister and destroys all registered materials.
virtual DepthCameraPtr CreateDepthCamera()=0
Create new depth camera. A unique ID and name will automatically be assigned to the camera.
virtual void SetAmbientLight(double _r, double _g, double _b, double _a=1.0)=0
Set the scene ambient light color.
virtual ThermalCameraPtr CreateThermalCamera()=0
Create new thermal camera. A unique ID and name will automatically be assigned to the camera.
virtual SensorPtr SensorById(unsigned int _id) const =0
Get sensor with the given id. If no sensor exists with the given id, NULL will be returned.
virtual void PreRender()=0
Prepare scene for rendering. The scene will flushing any scene changes by traversing scene-graph,...
STL class.
virtual VisualPtr VisualById(unsigned int _id) const =0
Get node with the given id. If no node exists with the given id, NULL will be returned.
virtual GizmoVisualPtr CreateGizmoVisual()=0
Create new gizmo visual. A unique ID and name will automatically be assigned to the visual.
virtual bool HasSensorName(const std::string &_name) const =0
Determine if a given sensor with the given name is managed by this Scene.
virtual void DestroyVisual(VisualPtr _node, bool _recursive=false)=0
Destroy given node. If the given node is not managed by this scene, no work will be done....
virtual bool HasVisualId(unsigned int _id) const =0
Determine if a given node with the given id is managed by this Scene.
virtual bool HasVisualName(const std::string &_name) const =0
Determine if a given node with the given name is managed by this Scene.
virtual common::Time SimTime() const =0
Get the last simulation update time.
virtual MaterialPtr Material(const std::string &_name) const =0
Get material registered under the given name. If no material is registered under the given name,...
virtual LightPtr LightById(unsigned int _id) const =0
Get light with the given id. If no light exists with the given id, NULL will be returned.
virtual std::chrono::steady_clock::duration Time() const =0
Get the last simulation update time.
virtual void DestroyNodeById(unsigned int _id)=0
Destroy node with the given id. If no node exists with the given id, no work will be done....
virtual void DestroySensorById(unsigned int _id)=0
Destroy sensor with the given id. If no sensor exists with the given id, no work will be done....
virtual unsigned int SensorCount() const =0
Get the number of sensors managed by this scene. Note these sensors may not be directly or indirectly...
virtual SegmentationCameraPtr CreateSegmentationCamera()=0
Create new segmentation camera. A unique ID and name will automatically be assigned to the camera.
virtual LightPtr LightByName(const std::string &_name) const =0
Get light with the given name. If no light exists with the given name, NULL will be returned.
virtual DirectionalLightPtr CreateDirectionalLight()=0
Create new directional light. A unique ID and name will automatically be assigned to the light.
virtual unsigned int NodeCount() const =0
Get the number of nodes managed by this scene. Note these nodes may not be directly or indirectly att...
virtual MeshPtr CreateMesh(const std::string &_meshName)=0
Create new mesh geomerty. The rendering::Mesh will be created from a common::Mesh retrieved from comm...
virtual bool HasVisual(ConstVisualPtr _node) const =0
Determine if the given node is managed by this Scene.
virtual bool HasLightName(const std::string &_name) const =0
Determine if a given light with the given name is managed by this Scene.
virtual void SetTime(const std::chrono::steady_clock::duration &_time)=0
Set the last simulation update time.
virtual void DestroySensor(SensorPtr _sensor, bool _recursive=false)=0
Destroy given sensor. If the given sensor is not managed by this scene, no work will be done....
virtual void DestroyLightById(unsigned int _id)=0
Destroy light with the given id. If no light exists with the given id, no work will be done....
STL namespace.
virtual void DestroyVisualById(unsigned int _id)=0
Destroy node with the given id. If no node exists with the given id, no work will be done....
virtual ArrowVisualPtr CreateArrowVisual()=0
Create new arrow visual. A unique ID and name will automatically be assigned to the visual.
virtual void DestroyLightByName(const std::string &_name)=0
Destroy light with the given name. If no light exists with the given name, no work will be done....
An abstract interface to a concrete render-engine. A RenderEngine is responsible for initializing a r...
Definition: gz/rendering/RenderEngine.hh:36
virtual void SetBackgroundMaterial(MaterialPtr _material)=0
Set the scene background material e.g. a material with skybox cubemap texture.
virtual void SetCameraPassCountPerGpuFlush(uint8_t _numPass)=0
The ideal render loop is as follows:
virtual COMVisualPtr CreateCOMVisual()=0
Create new CoM visual. A unique ID and name will automatically be assigned to the CoM visual.
virtual void SetSimTime(const common::Time &_time)=0
Set the last simulation update time.
virtual GeometryPtr CreateCylinder()=0
Create new cylinder geometry.
virtual void DestroySensorByIndex(unsigned int _index)=0
Destroy sensor at the given index. If no sensor exists at the given index, no work will be done....
virtual LightPtr LightByIndex(unsigned int _index) const =0
Get light at the given index. If no light exists at the given index, NULL will be returned.
virtual VisualPtr VisualByName(const std::string &_name) const =0
Get node with the given name. If no node exists with the given name, NULL will be returned.
Represents a surface material of a Geometry.
Definition: gz/rendering/Material.hh:47
virtual bool MaterialRegistered(const std::string &_name) const =0
Determine if a material is registered under the given name.
virtual bool HasSensor(ConstSensorPtr _sensor) const =0
Determine if the given sensor is managed by this Scene.
virtual void PostRender()=0
Call this function after you're done updating ALL cameras.
virtual math::Color AmbientLight() const =0
Get the scene ambient light color.
virtual WireBoxPtr CreateWireBox()=0
Create new wire box geometry.
virtual void DestroyVisuals()=0
Destroy all nodes manages by this scene.
virtual BoundingBoxCameraPtr CreateBoundingBoxCamera()=0
Create new BoundingBox camera. A unique ID and name will automatically be assigned to the camera.
virtual void RegisterMaterial(const std::string &_name, MaterialPtr _material)=0
Register a new material under the given name. If the name is already in use, no work will be done.
virtual MarkerPtr CreateMarker()=0
Create new marker geometry.
virtual void DestroyLight(LightPtr _light, bool _recursive=false)=0
Destroy given light. If the given light is not managed by this scene, no work will be done....
virtual unsigned int LightCount() const =0
Get the number of lights managed by this scene. Note these lights may not be directly or indirectly a...
virtual NodePtr NodeByName(const std::string &_name) const =0
Get node with the given name. If no node exists with the given name, NULL will be returned.
virtual MaterialPtr BackgroundMaterial() const =0
Get the scene background material e.g. a material with skybox cubemap texture.
virtual AxisVisualPtr CreateAxisVisual()=0
Create new axis visual. A unique ID and name will automatically be assigned to the visual.
virtual uint8_t CameraPassCountPerGpuFlush() const =0
Returns the value set in SetCameraPassCountPerGpuFlush.
virtual void DestroyLights()=0
Destroy all lights manages by this scene.
virtual LidarVisualPtr CreateLidarVisual()=0
Create new lidar visual. A unique ID and name will automatically be assigned to the lidar visual.
virtual InertiaVisualPtr CreateInertiaVisual()=0
Create new inertia visual. A unique ID and name will automatically be assigned to the inertia visual.
virtual NodePtr NodeByIndex(unsigned int _index) const =0
Get node at the given index. If no node exists at the given index, NULL will be returned.
virtual void DestroyMaterial(MaterialPtr _material)=0
Unregister and destroy a material.
virtual LightVisualPtr CreateLightVisual()=0
Create new light visual. A unique ID and name will automatically be assigned to the light visual.