Manages a single scene-graph. This class updates scene-wide properties and holds the root scene node. A Scene also serves as a factory for all scene objects. More...
#include <gz/rendering/Scene.hh>
Public Member Functions | |
virtual | ~Scene () |
Destructor. | |
virtual math::Color | AmbientLight () const =0 |
Get the scene ambient light color. | |
virtual math::Color | BackgroundColor () const =0 |
Get the scene background color. | |
virtual MaterialPtr | BackgroundMaterial () const =0 |
Get the scene background material e.g. a material with skybox cubemap texture. | |
virtual uint8_t | CameraPassCountPerGpuFlush () const =0 |
Returns the value set in SetCameraPassCountPerGpuFlush. | |
virtual void | Clear ()=0 |
Remove and destroy all objects from the scene graph. This does not completely destroy scene resources, so new objects can be created and added to the scene afterwards. | |
virtual ArrowVisualPtr | CreateArrowVisual ()=0 |
Create new arrow visual. A unique ID and name will automatically be assigned to the visual. | |
virtual ArrowVisualPtr | CreateArrowVisual (const std::string &_name)=0 |
Create new arrow visual with the given name. A unique ID will automatically be assigned to the visual. If the given name is already in use, NULL will be returned. | |
virtual ArrowVisualPtr | CreateArrowVisual (unsigned int _id)=0 |
Create new arrow visual with the given ID. A unique name will automatically be assigned to the visual. If the given ID is already in use, NULL will be returned. | |
virtual ArrowVisualPtr | CreateArrowVisual (unsigned int _id, const std::string &_name)=0 |
Create new arrow visual with the given name. If either the given ID or name is already in use, NULL will be returned. | |
virtual AxisVisualPtr | CreateAxisVisual ()=0 |
Create new axis visual. A unique ID and name will automatically be assigned to the visual. | |
virtual AxisVisualPtr | CreateAxisVisual (const std::string &_name)=0 |
Create new axis visual with the given name. A unique ID will automatically be assigned to the visual. If the given name is already in use, NULL will be returned. | |
virtual AxisVisualPtr | CreateAxisVisual (unsigned int _id)=0 |
Create new axis visual with the given ID. A unique name will automatically be assigned to the visual. If the given ID is already in use, NULL will be returned. | |
virtual AxisVisualPtr | CreateAxisVisual (unsigned int _id, const std::string &_name)=0 |
Create new axis visual with the given name. If either the given ID or name is already in use, NULL will be returned. | |
virtual BoundingBoxCameraPtr | CreateBoundingBoxCamera ()=0 |
Create new BoundingBox camera. A unique ID and name will automatically be assigned to the camera. | |
virtual BoundingBoxCameraPtr | CreateBoundingBoxCamera (const std::string &_name)=0 |
Create new BoundingBox camera with the given name. A unique ID will automatically be assigned to the camera. If the given name is already in use, NULL will be returned. | |
virtual BoundingBoxCameraPtr | CreateBoundingBoxCamera (unsigned int _id)=0 |
Create new BoundingBox camera with the given ID. A unique name will automatically be assigned to the camera. If the given ID is already in use, NULL will be returned. | |
virtual BoundingBoxCameraPtr | CreateBoundingBoxCamera (unsigned int _id, const std::string &_name)=0 |
Create new BoundingBox camera with the given ID & name. If either the given ID or name is already in use, will return NULL. | |
virtual GeometryPtr | CreateBox ()=0 |
Create new box geometry. | |
virtual CameraPtr | CreateCamera ()=0 |
Create new camera. A unique ID and name will automatically be assigned to the camera. | |
virtual CameraPtr | CreateCamera (const std::string &_name)=0 |
Create new camera with the given name. A unique ID will automatically be assigned to the camera. If the given name is already in use, NULL will be returned. | |
virtual CameraPtr | CreateCamera (unsigned int _id)=0 |
Create new camera with the given ID. A unique name will automatically be assigned to the camera. If the given ID is already in use, NULL will be returned. | |
virtual CameraPtr | CreateCamera (unsigned int _id, const std::string &_name)=0 |
Create new camera with the given name. If either the given ID or name is already in use, NULL will be returned. | |
virtual CapsulePtr | CreateCapsule ()=0 |
Create new capsule geometry. | |
virtual COMVisualPtr | CreateCOMVisual ()=0 |
Create new CoM visual. A unique ID and name will automatically be assigned to the CoM visual. | |
virtual COMVisualPtr | CreateCOMVisual (const std::string &_name)=0 |
Create new CoM visual with the given name. A unique ID will automatically be assigned to the visual. If the given name is already in use, NULL will be returned. | |
virtual COMVisualPtr | CreateCOMVisual (unsigned int _id)=0 |
Create new CoM visual with the given ID. A unique name will automatically be assigned to the visual. If the given ID is already in use, NULL will be returned. | |
virtual COMVisualPtr | CreateCOMVisual (unsigned int _id, const std::string &_name)=0 |
Create new CoM visual with the given name. If either the given ID or name is already in use, NULL will be returned. | |
virtual GeometryPtr | CreateCone ()=0 |
Create new cone geometry. | |
virtual GeometryPtr | CreateCylinder ()=0 |
Create new cylinder geometry. | |
virtual DepthCameraPtr | CreateDepthCamera ()=0 |
Create new depth camera. A unique ID and name will automatically be assigned to the camera. | |
virtual DepthCameraPtr | CreateDepthCamera (const std::string &_name)=0 |
Create new depth camera with the given name. A unique ID will automatically be assigned to the camera. If the given name is already in use, NULL will be returned. | |
virtual DepthCameraPtr | CreateDepthCamera (unsigned int _id)=0 |
Create new depth camera with the given ID. A unique name will automatically be assigned to the camera. If the given ID is already in use, NULL will be returned. | |
virtual DepthCameraPtr | CreateDepthCamera (unsigned int _id, const std::string &_name)=0 |
Create new depth camera with the given name. If either the given ID or name is already in use, 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 DirectionalLightPtr | CreateDirectionalLight (const std::string &_name)=0 |
Create new directional light with the given name. A unique ID will automatically be assigned to the light. If the given name is already in use, NULL will be returned. | |
virtual DirectionalLightPtr | CreateDirectionalLight (unsigned int _id)=0 |
Create new directional light with the given ID. A unique name will automatically be assigned to the light. If the given ID is already in use, NULL will be returned. | |
virtual DirectionalLightPtr | CreateDirectionalLight (unsigned int _id, const std::string &_name)=0 |
Create new directional light with the given name. If either the given ID or name is already in use, 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 GizmoVisualPtr | CreateGizmoVisual (const std::string &_name)=0 |
Create new gizmo visual with the given name. A unique ID will automatically be assigned to the visual. If the given name is already in use, NULL will be returned. | |
virtual GizmoVisualPtr | CreateGizmoVisual (unsigned int _id)=0 |
Create new gizmo visual with the given ID. A unique name will automatically be assigned to the visual. If the given ID is already in use, NULL will be returned. | |
virtual GizmoVisualPtr | CreateGizmoVisual (unsigned int _id, const std::string &_name)=0 |
Create new gizmo visual with the given name. If either the given ID or name is already in use, NULL will be returned. | |
virtual GlobalIlluminationCiVctPtr | CreateGlobalIlluminationCiVct ()=0 |
Create new GI CIVCT solution with the given name. A unique ID and name will automatically be assigned to the GI. | |
virtual GlobalIlluminationCiVctPtr | CreateGlobalIlluminationCiVct (const std::string &_name)=0 |
Create new GI CIVCT solution with the given name. A unique ID will automatically be assigned to the visual. If the given name is already in use, NULL will be returned. | |
virtual GlobalIlluminationCiVctPtr | CreateGlobalIlluminationCiVct (unsigned int _id)=0 |
Create new GI CIVCT solution with the given name. A unique name will automatically be assigned to the GI. If the given ID is already in use, NULL will be returned. | |
virtual GlobalIlluminationCiVctPtr | CreateGlobalIlluminationCiVct (unsigned int _id, const std::string &_name)=0 |
Create new GI CIVCT solution with the given name. If either the given ID or name is already in use, NULL will be returned. | |
virtual GlobalIlluminationVctPtr | CreateGlobalIlluminationVct ()=0 |
Create new GI VCT solution with the given name. A unique ID and name will automatically be assigned to the GI. | |
virtual GlobalIlluminationVctPtr | CreateGlobalIlluminationVct (const std::string &_name)=0 |
Create new GI VCT solution with the given name. A unique ID will automatically be assigned to the visual. If the given name is already in use, NULL will be returned. | |
virtual GlobalIlluminationVctPtr | CreateGlobalIlluminationVct (unsigned int _id)=0 |
Create new GI VCT solution with the given name. A unique name will automatically be assigned to the GI. If the given ID is already in use, NULL will be returned. | |
virtual GlobalIlluminationVctPtr | CreateGlobalIlluminationVct (unsigned int _id, const std::string &_name)=0 |
Create new GI VCT solution with the given name. If either the given ID or name is already in use, NULL will be returned. | |
virtual GpuRaysPtr | CreateGpuRays ()=0 |
Create new gpu rays caster. A unique ID and name will automatically be assigned to the gpu rays caster. | |
virtual GpuRaysPtr | CreateGpuRays (const std::string &_name)=0 |
Create new gpu rays caster with the given name. A unique ID will automatically be assigned to the gpu rays caster. If the given name is already in use, NULL will be returned. | |
virtual GpuRaysPtr | CreateGpuRays (unsigned int _id)=0 |
Create new gpu rays caster with the given ID. A unique name will automatically be assigned to the gpu rays caster. If the given ID is already in use, NULL will be returned. | |
virtual GpuRaysPtr | CreateGpuRays (unsigned int _id, const std::string &_name)=0 |
Create new gpu rays caster with the given name. If either the given ID or name is already in use, NULL will be returned. | |
virtual GridPtr | CreateGrid ()=0 |
Create new grid geometry. | |
virtual HeightmapPtr | CreateHeightmap (const HeightmapDescriptor &_desc)=0 |
Create new heightmap geomerty. The rendering::Heightmap will be created from the given HeightmapDescriptor. | |
virtual InertiaVisualPtr | CreateInertiaVisual ()=0 |
Create new inertia visual. A unique ID and name will automatically be assigned to the inertia visual. | |
virtual InertiaVisualPtr | CreateInertiaVisual (const std::string &_name)=0 |
Create new inertia visual with the given name. A unique ID will automatically be assigned to the visual. If the given name is already in use, NULL will be returned. | |
virtual InertiaVisualPtr | CreateInertiaVisual (unsigned int _id)=0 |
Create new inertia visual with the given ID. A unique name will automatically be assigned to the visual. If the given ID is already in use, NULL will be returned. | |
virtual InertiaVisualPtr | CreateInertiaVisual (unsigned int _id, const std::string &_name)=0 |
Create new inertia visual with the given name. If either the given ID or name is already in use, NULL will be returned. | |
virtual JointVisualPtr | CreateJointVisual ()=0 |
Create new joint visual. A unique ID and name will automatically be assigned to the Joint visual. | |
virtual JointVisualPtr | CreateJointVisual (const std::string &_name)=0 |
Create new joint visual with the given name. A unique ID will automatically be assigned to the visual. If the given name is already in use, NULL will be returned. | |
virtual JointVisualPtr | CreateJointVisual (unsigned int _id)=0 |
Create new joint visual with the given ID. A unique name will automatically be assigned to the visual. If the given ID is already in use, NULL will be returned. | |
virtual JointVisualPtr | CreateJointVisual (unsigned int _id, const std::string &_name)=0 |
Create new joint visual with the given name. If either the given ID or name is already in use, NULL will be returned. | |
virtual LidarVisualPtr | CreateLidarVisual ()=0 |
Create new lidar visual. A unique ID and name will automatically be assigned to the lidar visual. | |
virtual LidarVisualPtr | CreateLidarVisual (const std::string &_name)=0 |
Create new lidar visual with the given name. A unique ID will automatically be assigned to the lidar visual. If the given name is already in use, NULL will be returned. | |
virtual LidarVisualPtr | CreateLidarVisual (unsigned int _id)=0 |
Create new lidar visual with the given ID. A unique name will automatically be assigned to the lidar visual. If the given ID is already in use, NULL will be returned. | |
virtual LidarVisualPtr | CreateLidarVisual (unsigned int _id, const std::string &_name)=0 |
Create new lidar visual with the given name. If either the given ID or name is already in use, NULL will be returned. | |
virtual LightVisualPtr | CreateLightVisual ()=0 |
Create new light visual. A unique ID and name will automatically be assigned to the light visual. | |
virtual LightVisualPtr | CreateLightVisual (const std::string &_name)=0 |
Create new light visual with the given name. A unique ID will automatically be assigned to the visual. If the given name is already in use, NULL will be returned. | |
virtual LightVisualPtr | CreateLightVisual (unsigned int _id)=0 |
Create new light visual with the given ID. A unique name will automatically be assigned to the visual. If the given ID is already in use, NULL will be returned. | |
virtual LightVisualPtr | CreateLightVisual (unsigned int _id, const std::string &_name)=0 |
Create new light visual with the given name. If either the given ID or name is already in use, NULL will be returned. | |
virtual MarkerPtr | CreateMarker ()=0 |
Create new marker geometry. | |
virtual MaterialPtr | CreateMaterial (const common::Material &_material)=0 |
Create new material from the reference common::Material. | |
virtual MaterialPtr | CreateMaterial (const std::string &_name="")=0 |
Create new material with the given name. Created material will have default properties. | |
virtual MeshPtr | CreateMesh (const common::Mesh *_mesh)=0 |
Create new mesh geomerty. The rendering::Mesh will be created from the given common::Mesh. All sub-meshes will be loaded into this created mesh, uncentered. | |
virtual MeshPtr | CreateMesh (const MeshDescriptor &_desc)=0 |
Create new mesh geometry. The rendering::Mesh will be created from the given common::Mesh specified in the MeshDescriptor. Sub-meshes will be loaded and centered according to the descriptor. | |
virtual MeshPtr | CreateMesh (const std::string &_meshName)=0 |
Create new mesh geomerty. The rendering::Mesh will be created from a common::Mesh retrieved from common::MeshManager using the given mesh name. If no mesh exists by this name, NULL will be returned. All sub-meshes will be loaded into the created mesh, uncentered. | |
virtual ParticleEmitterPtr | CreateParticleEmitter ()=0 |
Create new particle emitter. A unique ID and name will automatically be assigned to the visual. | |
virtual ParticleEmitterPtr | CreateParticleEmitter (const std::string &_name)=0 |
Create new particle emitter with the given name. A unique ID will automatically be assigned to the visual. If the given name is already in use, NULL will be returned. | |
virtual ParticleEmitterPtr | CreateParticleEmitter (unsigned int _id)=0 |
Create new particle emitter with the given ID. A unique name will automatically be assigned to the visual. If the given ID is already in use, NULL will be returned. | |
virtual ParticleEmitterPtr | CreateParticleEmitter (unsigned int _id, const std::string &_name)=0 |
Create new particle emitter with the given name. If either the given ID or name is already in use, NULL will be returned. | |
virtual GeometryPtr | CreatePlane ()=0 |
Create new plane geometry. | |
virtual PointLightPtr | CreatePointLight ()=0 |
Create new point light. A unique ID and name will automatically be assigned to the light. | |
virtual PointLightPtr | CreatePointLight (const std::string &_name)=0 |
Create new point light with the given name. A unique ID will automatically be assigned to the light. If the given name is already in use, NULL will be returned. | |
virtual PointLightPtr | CreatePointLight (unsigned int _id)=0 |
Create new point light with the given ID. A unique name will automatically be assigned to the light. If the given ID is already in use, NULL will be returned. | |
virtual PointLightPtr | CreatePointLight (unsigned int _id, const std::string &_name)=0 |
Create new point light with the given name. If either the given ID or name is already in use, NULL will be returned. | |
virtual ProjectorPtr | CreateProjector ()=0 |
Create new projector. A unique ID and name will automatically be assigned to the visual. | |
virtual ProjectorPtr | CreateProjector (const std::string &_name)=0 |
Create new projector with the given name. A unique ID will automatically be assigned to the visual. If the given name is already in use, NULL will be returned. | |
virtual ProjectorPtr | CreateProjector (unsigned int _id)=0 |
Create new projector with the given ID. A unique name will automatically be assigned to the visual. If the given ID is already in use, NULL will be returned. | |
virtual ProjectorPtr | CreateProjector (unsigned int _id, const std::string &_name)=0 |
Create new projector with the given name. If either the given ID or name is already in use, NULL will be returned. | |
virtual RayQueryPtr | CreateRayQuery ()=0 |
Create new ray query. | |
virtual RenderTexturePtr | CreateRenderTexture ()=0 |
Create new render texture. | |
virtual RenderWindowPtr | CreateRenderWindow ()=0 |
Create new render window. This feature is render engine dependent. If the engine does not support attaching to a windowing system then it should behave as a a render texture. | |
virtual SegmentationCameraPtr | CreateSegmentationCamera ()=0 |
Create new segmentation camera. A unique ID and name will automatically be assigned to the camera. | |
virtual SegmentationCameraPtr | CreateSegmentationCamera (const std::string &_name)=0 |
Create new segmentation camera with the given name. A unique ID will automatically be assigned to the camera. If the given name is already in use, NULL will be returned. | |
virtual SegmentationCameraPtr | CreateSegmentationCamera (unsigned int _id)=0 |
Create new segmentation camera with the given ID. A unique name will automatically be assigned to the camera. If the given ID is already in use, NULL will be returned. | |
virtual SegmentationCameraPtr | CreateSegmentationCamera (unsigned int _id, const std::string &_name)=0 |
Create new segmentation camera with the given name and ID. If either the given ID or name is already in use, will return NULL. | |
virtual GeometryPtr | CreateSphere ()=0 |
Create new sphere or ellipsoid geometry This method allow to create ellipsoid too, because it can be scaled in 3 dimensions. | |
virtual SpotLightPtr | CreateSpotLight ()=0 |
Create new spotlight. A unique ID and name will automatically be assigned to the light. | |
virtual SpotLightPtr | CreateSpotLight (const std::string &_name)=0 |
Create new spotlight with the given name. A unique ID will automatically be assigned to the light. If the given name is already in use, NULL will be returned. | |
virtual SpotLightPtr | CreateSpotLight (unsigned int _id)=0 |
Create new spotlight with the given ID. A unique name will automatically be assigned to the light. If the given ID is already in use, NULL will be returned. | |
virtual SpotLightPtr | CreateSpotLight (unsigned int _id, const std::string &_name)=0 |
Create new spotlight with the given name. If either the given ID or name is already in use, NULL will be returned. | |
virtual TextPtr | CreateText ()=0 |
Create new text geometry. | |
virtual ThermalCameraPtr | CreateThermalCamera ()=0 |
Create new thermal camera. A unique ID and name will automatically be assigned to the camera. | |
virtual ThermalCameraPtr | CreateThermalCamera (const std::string &_name)=0 |
Create new thermal camera with the given name. A unique ID will automatically be assigned to the camera. If the given name is already in use, NULL will be returned. | |
virtual ThermalCameraPtr | CreateThermalCamera (unsigned int _id)=0 |
Create new thermal camera with the given ID. A unique name will automatically be assigned to the camera. If the given ID is already in use, NULL will be returned. | |
virtual ThermalCameraPtr | CreateThermalCamera (unsigned int _id, const std::string &_name)=0 |
Create new thermal camera with the given name. If either the given ID or name is already in use, NULL will be returned. | |
virtual VisualPtr | CreateVisual ()=0 |
Create new visual. A unique ID and name will automatically be assigned to the visual. | |
virtual VisualPtr | CreateVisual (const std::string &_name)=0 |
Create new visual with the given name. A unique ID will automatically be assigned to the visual. If the given name is already in use, NULL will be returned. | |
virtual VisualPtr | CreateVisual (unsigned int _id)=0 |
Create new visual with the given ID. A unique name will automatically be assigned to the visual. If the given ID is already in use, NULL will be returned. | |
virtual VisualPtr | CreateVisual (unsigned int _id, const std::string &_name)=0 |
Create new visual with the given name. If either the given ID or name is already in use, NULL will be returned. | |
virtual WideAngleCameraPtr | CreateWideAngleCamera ()=0 |
Create new wide angle camera. A unique ID and name will automatically be assigned to the camera. | |
virtual WideAngleCameraPtr | CreateWideAngleCamera (const std::string &_name)=0 |
Create new wide angle camera with the given name. A unique ID will automatically be assigned to the camera. If the given name is already in use, NULL will be returned. | |
virtual WideAngleCameraPtr | CreateWideAngleCamera (unsigned int _id)=0 |
Create wide angle camera with the given ID. A unique name will automatically be assigned to the camera. If the given ID is already in use, NULL will be returned. | |
virtual WideAngleCameraPtr | CreateWideAngleCamera (unsigned int _id, const std::string &_name)=0 |
Create new wide angle camera with the given name and ID. If either the given ID or name is already in use, will return NULL. | |
virtual WireBoxPtr | CreateWireBox ()=0 |
Create new wire box geometry. | |
virtual void | Destroy ()=0 |
Completely destroy the scene an all its resources. Continued use of this scene after its destruction will result in undefined behavior. | |
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. Depending on the _recursive argument, this function will either detach all child nodes from the scene graph or recursively destroy them. | |
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. All children of the light will consequently be detached from the scene graph, but not destroyed. | |
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. All children of the light will consequently be detached from the scene graph, but not destroyed. | |
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. All children of the light will consequently be detached from the scene graph, but not destroyed. | |
virtual void | DestroyLights ()=0 |
Destroy all lights manages by this scene. | |
virtual void | DestroyMaterial (MaterialPtr _material)=0 |
Unregister and destroy a material. | |
virtual void | DestroyMaterials ()=0 |
Unregister and destroys all registered materials. | |
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. Depending on the _recursive argument, this function will either detach all child nodes from the scene graph or recursively destroy them. | |
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. All children of the node will consequently be detached from the scene graph, but not destroyed. | |
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. All children of the node will consequently be detached from the scene graph, but not destroyed. | |
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. All children of the node will consequently be detached from the scene graph, but not destroyed. | |
virtual void | DestroyNodes ()=0 |
Destroy all nodes manages by this scene. | |
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. Depending on the _recursive argument, this function will either detach all child nodes from the scene graph or recursively destroy them. | |
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. All children of the sensor will consequently be detached from the scene graph, but not destroyed. | |
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. All children of the sensor will consequently be detached from the scene graph, but not destroyed. | |
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. All children of the sensor will consequently be detached from the scene graph, but not destroyed. | |
virtual void | DestroySensors ()=0 |
Destroy all sensors manages 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. Depending on the _recursive argument, this function will either detach all child nodes from the scene graph or recursively destroy them. consequently be detached from the scene graph, but not destroyed. | |
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. All children of the node will consequently be detached from the scene graph, but not destroyed. | |
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. All children of the node will consequently be detached from the scene graph, but not destroyed. | |
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. All children of the node will consequently be detached from the scene graph, but not destroyed. | |
virtual void | DestroyVisuals ()=0 |
Destroy all nodes manages by this scene. | |
virtual RenderEngine * | Engine () const =0 |
Get the creating render-engine of the scene. | |
SceneExt * | Extension () const |
Get scene extention APIs This provides new Scene APIs that are experimental. | |
virtual void | Fini ()=0 |
virtual std::array< math::Color, 4 > | GradientBackgroundColor () const =0 |
Get the scene gradient background color. | |
virtual bool | HasLight (ConstLightPtr _light) const =0 |
Determine if the given light is managed by this Scene. | |
virtual bool | HasLightId (unsigned int _id) const =0 |
Determine if a given light with the given id 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 bool | HasNode (ConstNodePtr _node) const =0 |
Determine if the given node is managed by this Scene. | |
virtual bool | HasNodeId (unsigned int _id) const =0 |
Determine if a given node with the given id is managed by this Scene. | |
virtual bool | HasNodeName (const std::string &_name) const =0 |
Determine if a given node with the given name is managed by this Scene. | |
virtual bool | HasSensor (ConstSensorPtr _sensor) const =0 |
Determine if the given sensor is managed by this Scene. | |
virtual bool | HasSensorId (unsigned int _id) const =0 |
Determine if a given sensor with the given id is managed by this Scene. | |
virtual bool | HasSensorName (const std::string &_name) const =0 |
Determine if a given sensor with the given name is managed by this Scene. | |
virtual bool | HasVisual (ConstVisualPtr _node) const =0 |
Determine if the given node is managed by this Scene. | |
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 unsigned int | Id () const =0 |
Get the ID of the scene. | |
virtual void | Init ()=0 |
Initialize the scene. | |
virtual bool | IsGradientBackgroundColor () const =0 |
Whether the scene has a gradient background or not (solid) | |
virtual bool | IsInitialized () const =0 |
Determine if the scene is initialized. | |
virtual bool | LegacyAutoGpuFlush () const =0 |
Checks if SetCameraPassCountPerGpuFlush is 0. | |
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 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 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 unsigned int | LightCount () const =0 |
Get the number of lights managed by this scene. Note these lights may not be directly or indirectly attached to the root light. | |
virtual void | Load ()=0 |
Load scene-specific resources. | |
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, NULL will be returned. | |
virtual bool | MaterialRegistered (const std::string &_name) const =0 |
Determine if a material is registered under the given name. | |
virtual std::string | Name () const =0 |
Get the name of the 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 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 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 unsigned int | NodeCount () const =0 |
Get the number of nodes managed by this scene. Note these nodes may not be directly or indirectly attached to the root node. | |
virtual void | PostRender ()=0 |
Call this function after you're done updating ALL cameras. | |
virtual void | PreRender ()=0 |
Prepare scene for rendering. The scene will flushing any scene changes by traversing scene-graph, calling PreRender on all objects. | |
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 void | RemoveGradientBackgroundColor ()=0 |
Remove the scene gradient background color. | |
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 Visual or one of its ancestors in the scene-graph. Nodes created by this Scene will not be added to the scene by default. | |
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 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 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 unsigned int | SensorCount () const =0 |
Get the number of sensors managed by this scene. Note these sensors may not be directly or indirectly attached to the root sensor. | |
virtual void | SetActiveGlobalIllumination (GlobalIlluminationBasePtr _gi)=0 |
Sets the given GI as the current new active GI solution. | |
virtual void | SetAmbientLight (const math::Color &_color)=0 |
Set the scene ambient light color. | |
virtual void | SetAmbientLight (double _r, double _g, double _b, double _a=1.0)=0 |
Set the scene ambient light color. | |
virtual void | SetBackgroundColor (const math::Color &_color)=0 |
Set the scene background color. | |
virtual void | SetBackgroundColor (double _r, double _g, double _b, double _a=1.0)=0 |
Set the scene background color. | |
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 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 bool | SetShadowTextureSize (LightType _lightType, unsigned int _textureSize)=0 |
Set the shadow texture size for the given light type. | |
virtual void | SetSkyEnabled (bool _enabled)=0 |
Enable sky in the scene. | |
virtual void | SetTime (const std::chrono::steady_clock::duration &_time)=0 |
Set the last simulation update time. | |
virtual unsigned int | ShadowTextureSize (LightType _lightType) const =0 |
Get the shadow texture size for the given light type. | |
virtual bool | SkyEnabled () const =0 |
Get whether the sky is enabled in the scene. | |
virtual std::chrono::steady_clock::duration | Time () const =0 |
Get the last simulation update time. | |
virtual void | UnregisterMaterial (const std::string &_name)=0 |
Unregister material registered under the given name. If no material is registered under this name, no work will be done. | |
virtual void | UnregisterMaterials ()=0 |
Unregister all registered materials. | |
virtual VisualPtr | VisualAt (const CameraPtr &_camera, const math::Vector2i &_mousePos)=0 |
Get a visual at a mouse position. | |
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 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 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. | |
virtual unsigned int | VisualCount () const =0 |
Get the number of nodes managed by this scene. Note these nodes may not be directly or indirectly attached to the root node. | |
Protected Member Functions | |
void | SetExtension (SceneExt *_ext) |
Set the scene extention API This is called by underlying render engines. | |
Detailed Description
Manages a single scene-graph. This class updates scene-wide properties and holds the root scene node. A Scene also serves as a factory for all scene objects.
Constructor & Destructor Documentation
◆ ~Scene()
|
virtual |
Destructor.
Member Function Documentation
◆ AmbientLight()
|
pure virtual |
Get the scene ambient light color.
- Returns
- The scene ambient light color
◆ BackgroundColor()
|
pure virtual |
Get the scene background color.
- Returns
- The scene background color
Referenced by BaseRenderTarget< T >::BackgroundColor().
◆ BackgroundMaterial()
|
pure virtual |
Get the scene background material e.g. a material with skybox cubemap texture.
- Returns
- Material of the background
◆ CameraPassCountPerGpuFlush()
|
pure virtual |
Returns the value set in SetCameraPassCountPerGpuFlush.
- Returns
- Value in range [0; 255]. ALWAYS returns 0 for plugins that ignore SetCameraPassCountPerGpuFlush
◆ Clear()
|
pure virtual |
Remove and destroy all objects from the scene graph. This does not completely destroy scene resources, so new objects can be created and added to the scene afterwards.
◆ CreateArrowVisual() [1/4]
|
pure virtual |
Create new arrow visual. A unique ID and name will automatically be assigned to the visual.
- Returns
- The created arrow visual
Referenced by BaseJointVisual< T >::CreateAxis(), and BaseAxisVisual< T >::Init().
◆ CreateArrowVisual() [2/4]
|
pure virtual |
Create new arrow visual with the given name. A unique ID will automatically be assigned to the visual. If the given name is already in use, NULL will be returned.
- Parameters
-
[in] _name Name of the new arrow visual
- Returns
- The created arrow visual
◆ CreateArrowVisual() [3/4]
|
pure virtual |
Create new arrow visual with the given ID. A unique name will automatically be assigned to the visual. If the given ID is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new arrow visual
- Returns
- The created arrow visual
◆ CreateArrowVisual() [4/4]
|
pure virtual |
Create new arrow visual with the given name. If either the given ID or name is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new arrow visual [in] _name Name of the new arrow visual
- Returns
- The created arrow visual
◆ CreateAxisVisual() [1/4]
|
pure virtual |
Create new axis visual. A unique ID and name will automatically be assigned to the visual.
- Returns
- The created axis visual
Referenced by BaseJointVisual< T >::Init().
◆ CreateAxisVisual() [2/4]
|
pure virtual |
Create new axis visual with the given name. A unique ID will automatically be assigned to the visual. If the given name is already in use, NULL will be returned.
- Parameters
-
[in] _name Name of the new axis visual
- Returns
- The created axis visual
◆ CreateAxisVisual() [3/4]
|
pure virtual |
Create new axis visual with the given ID. A unique name will automatically be assigned to the visual. If the given ID is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new axis visual
- Returns
- The created axis visual
◆ CreateAxisVisual() [4/4]
|
pure virtual |
Create new axis visual with the given name. If either the given ID or name is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new axis visual [in] _name Name of the new axis visual
- Returns
- The created axis visual
◆ CreateBoundingBoxCamera() [1/4]
|
pure virtual |
Create new BoundingBox camera. A unique ID and name will automatically be assigned to the camera.
- Returns
- The created camera
◆ CreateBoundingBoxCamera() [2/4]
|
pure virtual |
Create new BoundingBox camera with the given name. A unique ID will automatically be assigned to the camera. If the given name is already in use, NULL will be returned.
- Parameters
-
[in] _name Name of the new camera
- Returns
- The created camera
◆ CreateBoundingBoxCamera() [3/4]
|
pure virtual |
Create new BoundingBox camera with the given ID. A unique name will automatically be assigned to the camera. If the given ID is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new camera
- Returns
- The created camera
◆ CreateBoundingBoxCamera() [4/4]
|
pure virtual |
Create new BoundingBox camera with the given ID & name. If either the given ID or name is already in use, will return NULL.
- Parameters
-
[in] _id ID of the new camera [in] _name Name of the new camera
- Returns
- The created camera
◆ CreateBox()
|
pure virtual |
Create new box geometry.
- Returns
- The created box
◆ CreateCamera() [1/4]
|
pure virtual |
Create new camera. A unique ID and name will automatically be assigned to the camera.
- Returns
- The created camera
◆ CreateCamera() [2/4]
|
pure virtual |
Create new camera with the given name. A unique ID will automatically be assigned to the camera. If the given name is already in use, NULL will be returned.
- Parameters
-
[in] _name Name of the new camera
- Returns
- The created camera
◆ CreateCamera() [3/4]
|
pure virtual |
Create new camera with the given ID. A unique name will automatically be assigned to the camera. If the given ID is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new camera
- Returns
- The created camera
◆ CreateCamera() [4/4]
|
pure virtual |
Create new camera with the given name. If either the given ID or name is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new camera [in] _name Name of the new camera
- Returns
- The created camera
◆ CreateCapsule()
|
pure virtual |
◆ CreateCOMVisual() [1/4]
|
pure virtual |
Create new CoM visual. A unique ID and name will automatically be assigned to the CoM visual.
- Returns
- The created CoM visual
◆ CreateCOMVisual() [2/4]
|
pure virtual |
Create new CoM visual with the given name. A unique ID will automatically be assigned to the visual. If the given name is already in use, NULL will be returned.
- Parameters
-
[in] _name Name of the new CoM visual
- Returns
- The created CoM visual
◆ CreateCOMVisual() [3/4]
|
pure virtual |
Create new CoM visual with the given ID. A unique name will automatically be assigned to the visual. If the given ID is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new CoM visual
- Returns
- The created CoM visual
◆ CreateCOMVisual() [4/4]
|
pure virtual |
Create new CoM visual with the given name. If either the given ID or name is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new CoM visual [in] _name Name of the new CoM visual
- Returns
- The created CoM visual
◆ CreateCone()
|
pure virtual |
Create new cone geometry.
- Returns
- The created cone
◆ CreateCylinder()
|
pure virtual |
Create new cylinder geometry.
- Returns
- The created cylinder
◆ CreateDepthCamera() [1/4]
|
pure virtual |
Create new depth camera. A unique ID and name will automatically be assigned to the camera.
- Returns
- The created camera
◆ CreateDepthCamera() [2/4]
|
pure virtual |
Create new depth camera with the given name. A unique ID will automatically be assigned to the camera. If the given name is already in use, NULL will be returned.
- Parameters
-
[in] _name Name of the new camera
- Returns
- The created camera
◆ CreateDepthCamera() [3/4]
|
pure virtual |
Create new depth camera with the given ID. A unique name will automatically be assigned to the camera. If the given ID is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new camera
- Returns
- The created camera
◆ CreateDepthCamera() [4/4]
|
pure virtual |
Create new depth camera with the given name. If either the given ID or name is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new camera [in] _name Name of the new camera
- Returns
- The created camera
◆ CreateDirectionalLight() [1/4]
|
pure virtual |
Create new directional light. A unique ID and name will automatically be assigned to the light.
- Returns
- The created light
◆ CreateDirectionalLight() [2/4]
|
pure virtual |
Create new directional light with the given name. A unique ID will automatically be assigned to the light. If the given name is already in use, NULL will be returned.
- Parameters
-
[in] _name Name of the new light
- Returns
- The created light
◆ CreateDirectionalLight() [3/4]
|
pure virtual |
Create new directional light with the given ID. A unique name will automatically be assigned to the light. If the given ID is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new light
- Returns
- The created light
◆ CreateDirectionalLight() [4/4]
|
pure virtual |
Create new directional light with the given name. If either the given ID or name is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new light [in] _name Name of the new light
- Returns
- The created light
◆ CreateGizmoVisual() [1/4]
|
pure virtual |
Create new gizmo visual. A unique ID and name will automatically be assigned to the visual.
- Returns
- The created gizmo visual
◆ CreateGizmoVisual() [2/4]
|
pure virtual |
Create new gizmo visual with the given name. A unique ID will automatically be assigned to the visual. If the given name is already in use, NULL will be returned.
- Parameters
-
[in] _name Name of the new gizmo visual
- Returns
- The created gizmo visual
◆ CreateGizmoVisual() [3/4]
|
pure virtual |
Create new gizmo visual with the given ID. A unique name will automatically be assigned to the visual. If the given ID is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new gizmo visual
- Returns
- The created gizmo visual
◆ CreateGizmoVisual() [4/4]
|
pure virtual |
Create new gizmo visual with the given name. If either the given ID or name is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new gizmo visual [in] _name Name of the new gizmo visual
- Returns
- The created gizmo visual
◆ CreateGlobalIlluminationCiVct() [1/4]
|
pure virtual |
Create new GI CIVCT solution with the given name. A unique ID and name will automatically be assigned to the GI.
- Returns
- The created GI CIVCT
◆ CreateGlobalIlluminationCiVct() [2/4]
|
pure virtual |
Create new GI CIVCT solution with the given name. A unique ID will automatically be assigned to the visual. If the given name is already in use, NULL will be returned.
- Parameters
-
[in] _name Name of the new GI CIVCT solution
- Returns
- The created GI CIVCT
◆ CreateGlobalIlluminationCiVct() [3/4]
|
pure virtual |
Create new GI CIVCT solution with the given name. A unique name will automatically be assigned to the GI. If the given ID is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new particle emitter
- Returns
- The created GI CIVCT
◆ CreateGlobalIlluminationCiVct() [4/4]
|
pure virtual |
Create new GI CIVCT solution with the given name. If either the given ID or name is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new particle emitter [in] _name Name of the new GI CIVCT solution
- Returns
- The created GI CIVCT
◆ CreateGlobalIlluminationVct() [1/4]
|
pure virtual |
Create new GI VCT solution with the given name. A unique ID and name will automatically be assigned to the GI.
- Returns
- The created GI VCT
◆ CreateGlobalIlluminationVct() [2/4]
|
pure virtual |
Create new GI VCT solution with the given name. A unique ID will automatically be assigned to the visual. If the given name is already in use, NULL will be returned.
- Parameters
-
[in] _name Name of the new GI VCT solution
- Returns
- The created GI VCT
◆ CreateGlobalIlluminationVct() [3/4]
|
pure virtual |
Create new GI VCT solution with the given name. A unique name will automatically be assigned to the GI. If the given ID is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new particle emitter
- Returns
- The created GI VCT
◆ CreateGlobalIlluminationVct() [4/4]
|
pure virtual |
Create new GI VCT solution with the given name. If either the given ID or name is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new particle emitter [in] _name Name of the new GI VCT solution
- Returns
- The created GI VCT
◆ CreateGpuRays() [1/4]
|
pure virtual |
Create new gpu rays caster. A unique ID and name will automatically be assigned to the gpu rays caster.
- Returns
- The created gpu rays caster
◆ CreateGpuRays() [2/4]
|
pure virtual |
Create new gpu rays caster with the given name. A unique ID will automatically be assigned to the gpu rays caster. If the given name is already in use, NULL will be returned.
- Parameters
-
[in] _name Name of the new gpu rays caster
- Returns
- The created gpu ray caster
◆ CreateGpuRays() [3/4]
|
pure virtual |
Create new gpu rays caster with the given ID. A unique name will automatically be assigned to the gpu rays caster. If the given ID is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new gpu rays caster
- Returns
- The created gpu rays caster
◆ CreateGpuRays() [4/4]
|
pure virtual |
Create new gpu rays caster with the given name. If either the given ID or name is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the gpu ray caster [in] _name Name of the new gpu ray caster
- Returns
- The created Gpu ray caster
◆ CreateGrid()
|
pure virtual |
Create new grid geometry.
- Returns
- The created grid
◆ CreateHeightmap()
|
pure virtual |
Create new heightmap geomerty. The rendering::Heightmap will be created from the given HeightmapDescriptor.
- Parameters
-
[in] _desc Data about the heightmap
- Returns
- The created heightmap
◆ CreateInertiaVisual() [1/4]
|
pure virtual |
Create new inertia visual. A unique ID and name will automatically be assigned to the inertia visual.
- Returns
- The created inertia visual
◆ CreateInertiaVisual() [2/4]
|
pure virtual |
Create new inertia visual with the given name. A unique ID will automatically be assigned to the visual. If the given name is already in use, NULL will be returned.
- Parameters
-
[in] _name Name of the new inertia visual
- Returns
- The created light visual
◆ CreateInertiaVisual() [3/4]
|
pure virtual |
Create new inertia visual with the given ID. A unique name will automatically be assigned to the visual. If the given ID is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new inertia visual
- Returns
- The created light visual
◆ CreateInertiaVisual() [4/4]
|
pure virtual |
Create new inertia visual with the given name. If either the given ID or name is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new inertia visual [in] _name Name of the new inertia visual
- Returns
- The created inertia visual
◆ CreateJointVisual() [1/4]
|
pure virtual |
Create new joint visual. A unique ID and name will automatically be assigned to the Joint visual.
- Returns
- The created Joint visual
Referenced by BaseJointVisual< T >::CreateParentAxis().
◆ CreateJointVisual() [2/4]
|
pure virtual |
Create new joint visual with the given name. A unique ID will automatically be assigned to the visual. If the given name is already in use, NULL will be returned.
- Parameters
-
[in] _name Name of the new Joint visual
- Returns
- The created Joint visual
◆ CreateJointVisual() [3/4]
|
pure virtual |
Create new joint visual with the given ID. A unique name will automatically be assigned to the visual. If the given ID is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new Joint visual
- Returns
- The created Joint visual
◆ CreateJointVisual() [4/4]
|
pure virtual |
Create new joint visual with the given name. If either the given ID or name is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new Joint visual [in] _name Name of the new Joint visual
- Returns
- The created Joint visual
◆ CreateLidarVisual() [1/4]
|
pure virtual |
Create new lidar visual. A unique ID and name will automatically be assigned to the lidar visual.
- Returns
- The created lidar visual
◆ CreateLidarVisual() [2/4]
|
pure virtual |
Create new lidar visual with the given name. A unique ID will automatically be assigned to the lidar visual. If the given name is already in use, NULL will be returned.
- Parameters
-
[in] _name Name of the new lidar visual
- Returns
- The created lidar visual
◆ CreateLidarVisual() [3/4]
|
pure virtual |
Create new lidar visual with the given ID. A unique name will automatically be assigned to the lidar visual. If the given ID is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new lidar visual
- Returns
- The created lidar visual
◆ CreateLidarVisual() [4/4]
|
pure virtual |
Create new lidar visual with the given name. If either the given ID or name is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the lidar visual. [in] _name Name of the new lidar visual.
- Returns
- The created lidar visual
◆ CreateLightVisual() [1/4]
|
pure virtual |
Create new light visual. A unique ID and name will automatically be assigned to the light visual.
- Returns
- The created light visual
◆ CreateLightVisual() [2/4]
|
pure virtual |
Create new light visual with the given name. A unique ID will automatically be assigned to the visual. If the given name is already in use, NULL will be returned.
- Parameters
-
[in] _name Name of the new light visual
- Returns
- The created light visual
◆ CreateLightVisual() [3/4]
|
pure virtual |
Create new light visual with the given ID. A unique name will automatically be assigned to the visual. If the given ID is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new light visual
- Returns
- The created light visual
◆ CreateLightVisual() [4/4]
|
pure virtual |
Create new light visual with the given name. If either the given ID or name is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new light visual [in] _name Name of the new light visual
- Returns
- The created light visual
◆ CreateMarker()
|
pure virtual |
Create new marker geometry.
- Returns
- The created marker
◆ CreateMaterial() [1/2]
|
pure virtual |
Create new material from the reference common::Material.
- Parameters
-
[in] _material Reference material
- Returns
- The created material
◆ CreateMaterial() [2/2]
|
pure virtual |
Create new material with the given name. Created material will have default properties.
- Parameters
-
[in] _name Name for the new material.
- Returns
- The created material
Referenced by BaseGizmoVisual< T >::CreateMaterials(), and BaseLidarVisual< T >::CreateMaterials().
◆ CreateMesh() [1/3]
|
pure virtual |
Create new mesh geomerty. The rendering::Mesh will be created from the given common::Mesh. All sub-meshes will be loaded into this created mesh, uncentered.
- Parameters
-
[in] _mesh Reference mesh
- Returns
- The created mesh
◆ CreateMesh() [2/3]
|
pure virtual |
Create new mesh geometry. The rendering::Mesh will be created from the given common::Mesh specified in the MeshDescriptor. Sub-meshes will be loaded and centered according to the descriptor.
- Parameters
-
[in] _desc Descriptor of the mesh to load
- Returns
- The created mesh
◆ CreateMesh() [3/3]
|
pure virtual |
Create new mesh geomerty. The rendering::Mesh will be created from a common::Mesh retrieved from common::MeshManager using the given mesh name. If no mesh exists by this name, NULL will be returned. All sub-meshes will be loaded into the created mesh, uncentered.
- Parameters
-
[in] _meshName Name of the reference mesh
- Returns
- The created mesh
Referenced by BaseMesh< T >::Clone().
◆ CreateParticleEmitter() [1/4]
|
pure virtual |
Create new particle emitter. A unique ID and name will automatically be assigned to the visual.
- Returns
- The created particle emitter
◆ CreateParticleEmitter() [2/4]
|
pure virtual |
Create new particle emitter with the given name. A unique ID will automatically be assigned to the visual. If the given name is already in use, NULL will be returned.
- Parameters
-
[in] _name Name of the new particle emitter
- Returns
- The created particle emitter
◆ CreateParticleEmitter() [3/4]
|
pure virtual |
Create new particle emitter with the given ID. A unique name will automatically be assigned to the visual. If the given ID is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new particle emitter
- Returns
- The created particle emitter
◆ CreateParticleEmitter() [4/4]
|
pure virtual |
Create new particle emitter with the given name. If either the given ID or name is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new particle emitter [in] _name Name of the new particle emitter
- Returns
- The created particle emitter
◆ CreatePlane()
|
pure virtual |
Create new plane geometry.
- Returns
- The created plane
◆ CreatePointLight() [1/4]
|
pure virtual |
Create new point light. A unique ID and name will automatically be assigned to the light.
- Returns
- The created light
◆ CreatePointLight() [2/4]
|
pure virtual |
Create new point light with the given name. A unique ID will automatically be assigned to the light. If the given name is already in use, NULL will be returned.
- Parameters
-
[in] _name Name of the new light
- Returns
- The created light
◆ CreatePointLight() [3/4]
|
pure virtual |
Create new point light with the given ID. A unique name will automatically be assigned to the light. If the given ID is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new light
- Returns
- The created light
◆ CreatePointLight() [4/4]
|
pure virtual |
Create new point light with the given name. If either the given ID or name is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new light [in] _name Name of the new light
- Returns
- The created light
◆ CreateProjector() [1/4]
|
pure virtual |
Create new projector. A unique ID and name will automatically be assigned to the visual.
- Returns
- The created projector
◆ CreateProjector() [2/4]
|
pure virtual |
Create new projector with the given name. A unique ID will automatically be assigned to the visual. If the given name is already in use, NULL will be returned.
- Parameters
-
[in] _name Name of the new projector
◆ CreateProjector() [3/4]
|
pure virtual |
Create new projector with the given ID. A unique name will automatically be assigned to the visual. If the given ID is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new projector
- Returns
- The created projector
◆ CreateProjector() [4/4]
|
pure virtual |
Create new projector with the given name. If either the given ID or name is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new projector [in] _name Name of the new projector
- Returns
- The created projector
◆ CreateRayQuery()
|
pure virtual |
Create new ray query.
- Returns
- The created ray query
◆ CreateRenderTexture()
|
pure virtual |
Create new render texture.
- Returns
- The created render texture
◆ CreateRenderWindow()
|
pure virtual |
Create new render window. This feature is render engine dependent. If the engine does not support attaching to a windowing system then it should behave as a a render texture.
- Returns
- The created render window
◆ CreateSegmentationCamera() [1/4]
|
pure virtual |
Create new segmentation camera. A unique ID and name will automatically be assigned to the camera.
- Returns
- The created camera
◆ CreateSegmentationCamera() [2/4]
|
pure virtual |
Create new segmentation camera with the given name. A unique ID will automatically be assigned to the camera. If the given name is already in use, NULL will be returned.
- Parameters
-
[in] _name Name of the new camera
- Returns
- The created camera
◆ CreateSegmentationCamera() [3/4]
|
pure virtual |
Create new segmentation camera with the given ID. A unique name will automatically be assigned to the camera. If the given ID is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new camera
- Returns
- The created camera
◆ CreateSegmentationCamera() [4/4]
|
pure virtual |
Create new segmentation camera with the given name and ID. If either the given ID or name is already in use, will return NULL.
- Parameters
-
[in] _id ID of the new camera [in] _name Name of the new camera
- Returns
- The created camera
◆ CreateSphere()
|
pure virtual |
Create new sphere or ellipsoid geometry This method allow to create ellipsoid too, because it can be scaled in 3 dimensions.
- Returns
- The created sphere
◆ CreateSpotLight() [1/4]
|
pure virtual |
Create new spotlight. A unique ID and name will automatically be assigned to the light.
- Returns
- The created light
◆ CreateSpotLight() [2/4]
|
pure virtual |
Create new spotlight with the given name. A unique ID will automatically be assigned to the light. If the given name is already in use, NULL will be returned.
- Parameters
-
[in] _name Name of the new light
- Returns
- The created light
◆ CreateSpotLight() [3/4]
|
pure virtual |
Create new spotlight with the given ID. A unique name will automatically be assigned to the light. If the given ID is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new light
- Returns
- The created light
◆ CreateSpotLight() [4/4]
|
pure virtual |
Create new spotlight with the given name. If either the given ID or name is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new light [in] _name Name of the new light
- Returns
- The created light
◆ CreateText()
|
pure virtual |
Create new text geometry.
- Returns
- The created text
◆ CreateThermalCamera() [1/4]
|
pure virtual |
Create new thermal camera. A unique ID and name will automatically be assigned to the camera.
- Returns
- The created camera
◆ CreateThermalCamera() [2/4]
|
pure virtual |
Create new thermal camera with the given name. A unique ID will automatically be assigned to the camera. If the given name is already in use, NULL will be returned.
- Parameters
-
[in] _name Name of the new camera
- Returns
- The created camera
◆ CreateThermalCamera() [3/4]
|
pure virtual |
Create new thermal camera with the given ID. A unique name will automatically be assigned to the camera. If the given ID is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new camera
- Returns
- The created camera
◆ CreateThermalCamera() [4/4]
|
pure virtual |
Create new thermal camera with the given name. If either the given ID or name is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new camera [in] _name Name of the new camera
- Returns
- The created camera
◆ CreateVisual() [1/4]
|
pure virtual |
Create new visual. A unique ID and name will automatically be assigned to the visual.
- Returns
- The created visual
Referenced by BaseGizmoVisual< T >::CreateRotationVisual(), BaseGizmoVisual< T >::CreateScaleVisual(), BaseGizmoVisual< T >::CreateTranslationVisual(), and BaseArrowVisual< T >::Init().
◆ CreateVisual() [2/4]
|
pure virtual |
Create new visual with the given name. A unique ID will automatically be assigned to the visual. If the given name is already in use, NULL will be returned.
- Parameters
-
[in] _name Name of the new visual
- Returns
- The created visual
◆ CreateVisual() [3/4]
|
pure virtual |
Create new visual with the given ID. A unique name will automatically be assigned to the visual. If the given ID is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new visual
- Returns
- The created visual
◆ CreateVisual() [4/4]
|
pure virtual |
Create new visual with the given name. If either the given ID or name is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new visual [in] _name Name of the new visual
- Returns
- The created visual
◆ CreateWideAngleCamera() [1/4]
|
pure virtual |
Create new wide angle camera. A unique ID and name will automatically be assigned to the camera.
- Returns
- The created camera
◆ CreateWideAngleCamera() [2/4]
|
pure virtual |
Create new wide angle camera with the given name. A unique ID will automatically be assigned to the camera. If the given name is already in use, NULL will be returned.
- Parameters
-
[in] _name Name of the new camera
- Returns
- The created camera
◆ CreateWideAngleCamera() [3/4]
|
pure virtual |
Create wide angle camera with the given ID. A unique name will automatically be assigned to the camera. If the given ID is already in use, NULL will be returned.
- Parameters
-
[in] _id ID of the new camera
- Returns
- The created camera
◆ CreateWideAngleCamera() [4/4]
|
pure virtual |
Create new wide angle camera with the given name and ID. If either the given ID or name is already in use, will return NULL.
- Parameters
-
[in] _id ID of the new camera [in] _name Name of the new camera
- Returns
- The created camera
◆ CreateWireBox()
|
pure virtual |
Create new wire box geometry.
- Returns
- The created wire box
◆ Destroy()
|
pure virtual |
Completely destroy the scene an all its resources. Continued use of this scene after its destruction will result in undefined behavior.
◆ DestroyLight()
|
pure virtual |
Destroy given light. If the given light is not managed by this scene, no work will be done. Depending on the _recursive argument, this function will either detach all child nodes from the scene graph or recursively destroy them.
- Parameters
-
[in] _light Light pointer to destroy [in] _recursive True to recursively destroy the node and its children, false to destroy only this node and detach the children
◆ DestroyLightById()
|
pure virtual |
Destroy light with the given id. If no light exists with the given id, no work will be done. All children of the light will consequently be detached from the scene graph, but not destroyed.
- Parameters
-
[in] _id ID of the light to destroy
◆ DestroyLightByIndex()
|
pure virtual |
Destroy light at the given index. If no light exists at the given index, no work will be done. All children of the light will consequently be detached from the scene graph, but not destroyed.
- Parameters
-
[in] _index Index of the light to destroy
◆ DestroyLightByName()
|
pure virtual |
Destroy light with the given name. If no light exists with the given name, no work will be done. All children of the light will consequently be detached from the scene graph, but not destroyed.
- Parameters
-
[in] _name Name of the light to destroy
◆ DestroyLights()
|
pure virtual |
Destroy all lights manages by this scene.
◆ DestroyMaterial()
|
pure virtual |
Unregister and destroy a material.
- Parameters
-
[in] _material Material to be unregistered and destroyed
Referenced by BaseMesh< T >::Destroy(), BaseSubMesh< T >::Destroy(), BaseMesh< T >::SetMaterial(), and BaseSubMesh< T >::SetMaterial().
◆ DestroyMaterials()
|
pure virtual |
Unregister and destroys all registered materials.
◆ DestroyNode()
|
pure virtual |
Destroy given node. If the given node is not managed by this scene, no work will be done. Depending on the _recursive argument, this function will either detach all child nodes from the scene graph or recursively destroy them.
- Parameters
-
[in] _node Node pointer to destroy [in] _recursive True to recursively destroy the node and its children, false to destroy only this node and detach the children
◆ DestroyNodeById()
|
pure virtual |
Destroy node with the given id. If no node exists with the given id, no work will be done. All children of the node will consequently be detached from the scene graph, but not destroyed.
- Parameters
-
[in] _id ID of the node to destroy
◆ DestroyNodeByIndex()
|
pure virtual |
Destroy node at the given index. If no node exists at the given index, no work will be done. All children of the node will consequently be detached from the scene graph, but not destroyed.
- Parameters
-
[in] _index Index of the node to destroy
◆ DestroyNodeByName()
|
pure virtual |
Destroy node with the given name. If no node exists with the given name, no work will be done. All children of the node will consequently be detached from the scene graph, but not destroyed.
- Parameters
-
[in] _name Name of the node to destroy
◆ DestroyNodes()
|
pure virtual |
Destroy all nodes manages by this scene.
◆ DestroySensor()
|
pure virtual |
Destroy given sensor. If the given sensor is not managed by this scene, no work will be done. Depending on the _recursive argument, this function will either detach all child nodes from the scene graph or recursively destroy them.
- Parameters
-
[in] _sensor Sensor pointer to destroy [in] _recursive True to recursively destroy the node and its children, false to destroy only this node and detach the children
◆ DestroySensorById()
|
pure virtual |
Destroy sensor with the given id. If no sensor exists with the given id, no work will be done. All children of the sensor will consequently be detached from the scene graph, but not destroyed.
- Parameters
-
[in] _id ID of the sensor to destroy
◆ DestroySensorByIndex()
|
pure virtual |
Destroy sensor at the given index. If no sensor exists at the given index, no work will be done. All children of the sensor will consequently be detached from the scene graph, but not destroyed.
- Parameters
-
[in] _index Index of the sensor to destroy
◆ DestroySensorByName()
|
pure virtual |
Destroy sensor with the given name. If no sensor exists with the given name, no work will be done. All children of the sensor will consequently be detached from the scene graph, but not destroyed.
- Parameters
-
[in] _name Name of the sensor to destroy
◆ DestroySensors()
|
pure virtual |
Destroy all sensors manages by this scene.
◆ DestroyVisual()
|
pure virtual |
Destroy given node. If the given node is not managed by this scene, no work will be done. Depending on the _recursive argument, this function will either detach all child nodes from the scene graph or recursively destroy them. consequently be detached from the scene graph, but not destroyed.
- Parameters
-
[in] _node Visual pointer to destroy [in] _recursive True to recursively destroy the node and its children, false to destroy only this node and detach the children
◆ DestroyVisualById()
|
pure virtual |
Destroy node with the given id. If no node exists with the given id, no work will be done. All children of the node will consequently be detached from the scene graph, but not destroyed.
- Parameters
-
[in] _id ID of the node to destroy
◆ DestroyVisualByIndex()
|
pure virtual |
Destroy node at the given index. If no node exists at the given index, no work will be done. All children of the node will consequently be detached from the scene graph, but not destroyed.
- Parameters
-
[in] _index Index of the node to destroy
◆ DestroyVisualByName()
|
pure virtual |
Destroy node with the given name. If no node exists with the given name, no work will be done. All children of the node will consequently be detached from the scene graph, but not destroyed.
- Parameters
-
[in] _name Name of the node to destroy
◆ DestroyVisuals()
|
pure virtual |
Destroy all nodes manages by this scene.
◆ Engine()
|
pure virtual |
Get the creating render-engine of the scene.
- Returns
- The creating render-engine
Referenced by BaseCamera< T >::CreateRenderWindow(), BaseWideAngleCamera< T >::Project3d(), BaseMesh< T >::SetSkeletonWeights(), BaseVisual< T >::SetStatic(), BaseVisual< T >::SetVisible(), and BaseVisual< T >::SetWireframe().
◆ Extension()
SceneExt * Extension | ( | ) | const |
Get scene extention APIs This provides new Scene APIs that are experimental.
◆ Fini()
|
pure virtual |
◆ GradientBackgroundColor()
|
pure virtual |
Get the scene gradient background color.
- Returns
- The scene gradient background color
- See also
- bool IsGradientBackgroundColor() const
◆ HasLight()
|
pure virtual |
◆ HasLightId()
|
pure virtual |
Determine if a given light with the given id is managed by this Scene.
- Parameters
-
[in] _id ID of the light in question
- Returns
- True if a light is managed by this scene
◆ HasLightName()
|
pure virtual |
Determine if a given light with the given name is managed by this Scene.
- Parameters
-
[in] _name Name of the light in question
- Returns
- True if a light is managed by this scene
◆ HasNode()
|
pure virtual |
◆ HasNodeId()
|
pure virtual |
Determine if a given node with the given id is managed by this Scene.
- Parameters
-
[in] _id ID of the node in question
- Returns
- True if a node is managed by this scene
◆ HasNodeName()
|
pure virtual |
Determine if a given node with the given name is managed by this Scene.
- Parameters
-
[in] _name Name of the node in question
- Returns
- True if a node is managed by this scene
◆ HasSensor()
|
pure virtual |
◆ HasSensorId()
|
pure virtual |
Determine if a given sensor with the given id is managed by this Scene.
- Parameters
-
[in] _id ID of the sensor in question
- Returns
- True if a sensor is managed by this scene
◆ HasSensorName()
|
pure virtual |
Determine if a given sensor with the given name is managed by this Scene.
- Parameters
-
[in] _name Name of the sensor in question
- Returns
- True if a sensor is managed by this scene
◆ HasVisual()
|
pure virtual |
◆ HasVisualId()
|
pure virtual |
Determine if a given node with the given id is managed by this Scene.
- Parameters
-
[in] _id ID of the node in question
- Returns
- True if a node is managed by this scene
◆ HasVisualName()
|
pure virtual |
Determine if a given node with the given name is managed by this Scene.
- Parameters
-
[in] _name Name of the node in question
- Returns
- True if a node is managed by this scene
◆ Id()
|
pure virtual |
Get the ID of the scene.
- Returns
- The scene ID
◆ Init()
|
pure virtual |
Initialize the scene.
◆ IsGradientBackgroundColor()
|
pure virtual |
Whether the scene has a gradient background or not (solid)
- Returns
- True if the scene has a gradient background or false otherwise
◆ IsInitialized()
|
pure virtual |
Determine if the scene is initialized.
- Returns
- True if the scene is initialized
◆ LegacyAutoGpuFlush()
|
pure virtual |
Checks if SetCameraPassCountPerGpuFlush is 0.
- Returns
- True if Gazebo is using the old method (i.e. 0). ALWAYS returns true for plugins that ignore SetCameraPassCountPerGpuFlush
◆ LightById()
|
pure virtual |
Get light with the given id. If no light exists with the given id, NULL will be returned.
- Parameters
-
[in] _id ID of the desired light
- Returns
- The desired light
◆ LightByIndex()
|
pure virtual |
Get light at the given index. If no light exists at the given index, NULL will be returned.
- Parameters
-
[in] _index Index of the desired light
- Returns
- The desired light
◆ LightByName()
|
pure virtual |
Get light with the given name. If no light exists with the given name, NULL will be returned.
- Parameters
-
[in] _name Name of the desired light
- Returns
- The desired light
◆ LightCount()
|
pure virtual |
Get the number of lights managed by this scene. Note these lights may not be directly or indirectly attached to the root light.
- Returns
- The number of lights managed by this scene
◆ Load()
|
pure virtual |
Load scene-specific resources.
◆ Material()
|
pure virtual |
Get material registered under the given name. If no material is registered under the given name, NULL will be returned.
- Parameters
-
[in] _name Name of the desired material
- Returns
- The specified material
Referenced by BaseGizmoVisual< T >::CreateMaterials(), BaseGeometry< T >::SetMaterial(), BaseMesh< T >::SetMaterial(), BaseSubMesh< T >::SetMaterial(), and BaseVisual< T >::SetMaterial().
◆ MaterialRegistered()
|
pure virtual |
Determine if a material is registered under the given name.
- Parameters
-
[in] _name Name of the material in question
- Returns
- True if a material is registered under the given name
◆ Name()
|
pure virtual |
Get the name of the scene.
- Returns
- The scene name
◆ NodeById()
|
pure virtual |
Get node with the given id. If no node exists with the given id, NULL will be returned.
- Parameters
-
[in] _id ID of the desired node
- Returns
- The desired node
◆ NodeByIndex()
|
pure virtual |
Get node at the given index. If no node exists at the given index, NULL will be returned.
- Parameters
-
[in] _index Index of the desired node
- Returns
- The desired node
◆ NodeByName()
|
pure virtual |
Get node with the given name. If no node exists with the given name, NULL will be returned.
- Parameters
-
[in] _name Name of the desired node
- Returns
- The desired node
Referenced by BaseJointVisual< T >::CreateParentAxis().
◆ NodeCount()
|
pure virtual |
Get the number of nodes managed by this scene. Note these nodes may not be directly or indirectly attached to the root node.
- Returns
- The number of nodes managed by this scene
◆ PostRender()
|
pure virtual |
Call this function after you're done updating ALL cameras.
- Remarks
- Each PreRender must have a correspondent PostRender
- Particle FX simulation is moved forward after this call
Referenced by BaseCamera< T >::Update().
◆ PreRender()
|
pure virtual |
Prepare scene for rendering. The scene will flushing any scene changes by traversing scene-graph, calling PreRender on all objects.
Referenced by BaseCamera< T >::Update().
◆ RegisterMaterial()
|
pure virtual |
Register a new material under the given name. If the name is already in use, no work will be done.
- Parameters
-
[in] _name Name which the material will be registered under [in] _material Material to register
◆ RemoveGradientBackgroundColor()
|
pure virtual |
Remove the scene gradient background color.
◆ RootVisual()
|
pure virtual |
◆ SensorById()
|
pure virtual |
Get sensor with the given id. If no sensor exists with the given id, NULL will be returned.
- Parameters
-
[in] _id ID of the desired sensor
- Returns
- The desired sensor
◆ SensorByIndex()
|
pure virtual |
Get sensor at the given index. If no sensor exists at the given index, NULL will be returned.
- Parameters
-
[in] _index Index of the desired sensor
- Returns
- The desired sensor
◆ SensorByName()
|
pure virtual |
Get sensor with the given name. If no sensor exists with the given name, NULL will be returned.
- Parameters
-
[in] _name Name of the desired sensor
- Returns
- The desired sensor
◆ SensorCount()
|
pure virtual |
Get the number of sensors managed by this scene. Note these sensors may not be directly or indirectly attached to the root sensor.
- Returns
- The number of sensors managed by this scene
◆ SetActiveGlobalIllumination()
|
pure virtual |
Sets the given GI as the current new active GI solution.
- Parameters
-
[in] _gi GI solution that should be active. Nullptr to disable
◆ SetAmbientLight() [1/2]
|
pure virtual |
Set the scene ambient light color.
- Parameters
-
[in] _color The scene ambient light color
◆ SetAmbientLight() [2/2]
|
pure virtual |
Set the scene ambient light color.
- Parameters
-
[in] _r Red color [in] _g Green color [in] _b Blue color [in] _a Alpha color
◆ SetBackgroundColor() [1/2]
|
pure virtual |
Set the scene background color.
- Parameters
-
[in] _color The scene background color
◆ SetBackgroundColor() [2/2]
|
pure virtual |
Set the scene background color.
- Parameters
-
[in] _r Red color [in] _g Green color [in] _b Blue color [in] _a Alpha color
◆ SetBackgroundMaterial()
|
pure virtual |
Set the scene background material e.g. a material with skybox cubemap texture.
- Parameters
-
[in] _material Material to set the background to
◆ SetCameraPassCountPerGpuFlush()
|
pure virtual |
The ideal render loop is as follows:
Now... Camera Render calls MUST happen between Scene::PreRender and Scene::PostRender.
The scene must not be modified (e.g. add/remove objects, lights, etc) while inside Scene PreRender/PostRender
Legacy mode: Set this value to 0.
Old projects migrating to newer gz versions may break these rules (e.g. not calling Render between Scene's Pre/PostRender).
Setting this value to 0 forces Gazebo to flush commands for every camera; thus avoiding the need to call PostRender at all
This is much slower but will ease porting, specially if it's not easy to adapt your code to call PostRender for some reason (in non-legacy mode each call must correspond to a previous PreRender call)
Legacy mode forces Particle FX simulations to move forward after each camera render, which can cause inconsistencies when Cameras are supposed to be rendering the same frame from different angles
New mode i.e. values greater than 0:
The CPU normally queues up of rendering commands from each Camera and then waits for the GPU to finish up.
- If we flush too often, the CPU will often have to wait for the GPU to finish.
- If we flush infrequently, RAM consumption will rise due to queueing up too much unsubmitted work.
Larger values values queue up more work; lower values flush more frequently.
Note that work may be submitted earlier if required by a specific operation (e.g. reading GPU -> CPU)
A sensible value in the range of [2; 6] is probably the best ratio between parallel performance / RAM cost.
Actual value depends on scene complexity and number of shadow casting lights
If you're too tight on RAM consumption, try setting this value to 1.
Example:
Cubemap rendering w/ 3 probes and 5 shadowmaps can cause a blow up of passes:
(5 shadow maps per face + 1 regular render) x 6 faces x 3 probes = 108 render_scene passes. 108 is way too much, causing out of memory situations;
so setting the value to 6 (1 cubemap face = 1 pass) will force one flush per cubemap face, flushing a total of 3 times (one per cubemap).
Upper bound
Once Scene::PostRender is called, a flush is always forced.
If you set a value of e.g. 6, but you have a single camera, it will be flushed after Scene::PostRender, thus having a value of 1 or 6 won't matter as the result will be exactly the same (in every term: performance, memory consumption)
A value of 6 is like an upper bound. We may queue up to 6 render passes or less; but never more.
- Remarks
- Not all rendering engines care about this. ogre2 plugin does.
- Parameters
-
[in] _numPass 0 for old projects who can't or don't know when to call PostRender and prefer to penalize rendering performance Value in range [1; 255]
◆ SetExtension()
|
protected |
Set the scene extention API This is called by underlying render engines.
◆ SetGradientBackgroundColor()
|
pure virtual |
Set a custom gradient background color on top of the regular background. Default should be black.
Important note: Keep in mind that this object will always be rendered on top of any existing scene or camera background.
- Parameters
-
[in] _colors The scene gradient background color. Next is the description of how to interpret each value of the array: 0: Top left corner color. 1: Bottom left corner color. 2: Top right corner color. 3: Bottom right corner color.
- See also
- void RemoveGradientBackgroundColor()
◆ SetShadowTextureSize()
|
pure virtual |
Set the shadow texture size for the given light type.
- Parameters
-
_lightType Light type that creates the shadow _textureSize Shadow texture size
◆ SetSkyEnabled()
|
pure virtual |
Enable sky in the scene.
- Parameters
-
[in] _enabled True to enable sky
◆ SetTime()
|
pure virtual |
Set the last simulation update time.
- Parameters
-
[in] _time Latest simulation update time
◆ ShadowTextureSize()
|
pure virtual |
Get the shadow texture size for the given light type.
- Parameters
-
_lightType Light type that creates the shadow
◆ SkyEnabled()
|
pure virtual |
Get whether the sky is enabled in the scene.
- Returns
- true to sky is enabled, false otherwise
◆ Time()
|
pure virtual |
Get the last simulation update time.
- Returns
- The last simulation update time
◆ UnregisterMaterial()
|
pure virtual |
Unregister material registered under the given name. If no material is registered under this name, no work will be done.
- Parameters
-
[in] _name Name of the material to unregistered
◆ UnregisterMaterials()
|
pure virtual |
Unregister all registered materials.
◆ VisualAt()
|
pure virtual |
Get a visual at a mouse position.
- Parameters
-
[in] _camera Camera pointer being used [in] _mousePos position of the mouse in pixels
- Returns
- Pointer to the visual, NULL if none found.
◆ VisualById()
|
pure virtual |
Get node with the given id. If no node exists with the given id, NULL will be returned.
- Parameters
-
[in] _id ID of the desired node
- Returns
- The desired node
◆ VisualByIndex()
|
pure virtual |
Get node at the given index. If no node exists at the given index, NULL will be returned.
- Parameters
-
[in] _index Index of the desired node
- Returns
- The desired node
◆ VisualByName()
|
pure virtual |
Get node with the given name. If no node exists with the given name, NULL will be returned.
- Parameters
-
[in] _name Name of the desired node
- Returns
- The desired node
◆ VisualCount()
|
pure virtual |
Get the number of nodes managed by this scene. Note these nodes may not be directly or indirectly attached to the root node.
- Returns
- The number of nodes managed by this scene
The documentation for this class was generated from the following file: