Gazebo Rendering

API Reference

3.7.2

#include <OgreScene.hh>

Public Member Functions

virtual ~OgreScene ()
 
virtual math::Color AmbientLight () const
 
virtual void Clear ()
 
virtual void Destroy ()
 
virtual RenderEngineEngine () const
 
virtual void Fini ()
 
virtual Ogre::SceneManager * OgreSceneManager () const
 
virtual void PreRender ()
 
virtual void RemoveGradientBackgroundColor ()
 
virtual VisualPtr RootVisual () const
 
virtual void SetAmbientLight (const math::Color &_color)
 
virtual void SetBackgroundColor (const math::Color &_color)
 
virtual void SetGradientBackgroundColor (const std::array< math::Color, 4 > &_colors)
 
- Public Member Functions inherited from BaseScene
virtual ~BaseScene ()
 
virtual math::Color BackgroundColor () const override
 
virtual ArrowVisualPtr CreateArrowVisual () override
 
virtual ArrowVisualPtr CreateArrowVisual (const std::string &_name) override
 
virtual ArrowVisualPtr CreateArrowVisual (unsigned int _id) override
 
virtual ArrowVisualPtr CreateArrowVisual (unsigned int _id, const std::string &_name) override
 
virtual AxisVisualPtr CreateAxisVisual () override
 
virtual AxisVisualPtr CreateAxisVisual (const std::string &_name) override
 
virtual AxisVisualPtr CreateAxisVisual (unsigned int _id) override
 
virtual AxisVisualPtr CreateAxisVisual (unsigned int _id, const std::string &_name) override
 
virtual GeometryPtr CreateBox () override
 
virtual CameraPtr CreateCamera () override
 
virtual CameraPtr CreateCamera (const std::string &_name) override
 
virtual CameraPtr CreateCamera (unsigned int _id) override
 
virtual CameraPtr CreateCamera (unsigned int _id, const std::string &_name) override
 
virtual GeometryPtr CreateCone () override
 
virtual GeometryPtr CreateCylinder () override
 
virtual DepthCameraPtr CreateDepthCamera () override
 
virtual DepthCameraPtr CreateDepthCamera (const std::string &_name) override
 
virtual DepthCameraPtr CreateDepthCamera (const unsigned int _id) override
 
virtual DepthCameraPtr CreateDepthCamera (const unsigned int _id, const std::string &_name) override
 
virtual DirectionalLightPtr CreateDirectionalLight () override
 
virtual DirectionalLightPtr CreateDirectionalLight (const std::string &_name) override
 
virtual DirectionalLightPtr CreateDirectionalLight (unsigned int _id) override
 
virtual DirectionalLightPtr CreateDirectionalLight (unsigned int _id, const std::string &_name) override
 
virtual GizmoVisualPtr CreateGizmoVisual () override
 
virtual GizmoVisualPtr CreateGizmoVisual (const std::string &_name) override
 
virtual GizmoVisualPtr CreateGizmoVisual (unsigned int _id) override
 
virtual GizmoVisualPtr CreateGizmoVisual (unsigned int _id, const std::string &_name) override
 
virtual GpuRaysPtr CreateGpuRays () override
 
virtual GpuRaysPtr CreateGpuRays (const std::string &_name) override
 
virtual GpuRaysPtr CreateGpuRays (const unsigned int _id) override
 
virtual GpuRaysPtr CreateGpuRays (const unsigned int _id, const std::string &_name) override
 
virtual GridPtr CreateGrid () override
 
virtual MarkerPtr CreateMarker () override
 
virtual MaterialPtr CreateMaterial (const common::Material &_material) override
 
virtual MaterialPtr CreateMaterial (const std::string &_name="") override
 
virtual MeshPtr CreateMesh (const common::Mesh *_mesh) override
 
virtual MeshPtr CreateMesh (const MeshDescriptor &_desc) override
 
virtual MeshPtr CreateMesh (const std::string &_meshName) override
 
virtual GeometryPtr CreatePlane () override
 
virtual PointLightPtr CreatePointLight () override
 
virtual PointLightPtr CreatePointLight (const std::string &_name) override
 
virtual PointLightPtr CreatePointLight (unsigned int _id) override
 
virtual PointLightPtr CreatePointLight (unsigned int _id, const std::string &_name) override
 
virtual RayQueryPtr CreateRayQuery () override
 
virtual RenderTexturePtr CreateRenderTexture () override
 
virtual RenderWindowPtr CreateRenderWindow () override
 
virtual GeometryPtr CreateSphere () override
 
virtual SpotLightPtr CreateSpotLight () override
 
virtual SpotLightPtr CreateSpotLight (const std::string &_name) override
 
virtual SpotLightPtr CreateSpotLight (unsigned int _id) override
 
virtual SpotLightPtr CreateSpotLight (unsigned int _id, const std::string &_name) override
 
virtual TextPtr CreateText () override
 
virtual ThermalCameraPtr CreateThermalCamera () override
 
virtual ThermalCameraPtr CreateThermalCamera (const std::string &_name) override
 
virtual ThermalCameraPtr CreateThermalCamera (const unsigned int _id) override
 
virtual ThermalCameraPtr CreateThermalCamera (const unsigned int _id, const std::string &_name) override
 
virtual VisualPtr CreateVisual () override
 
virtual VisualPtr CreateVisual (const std::string &_name) override
 
virtual VisualPtr CreateVisual (unsigned int _id) override
 
virtual VisualPtr CreateVisual (unsigned int _id, const std::string &_name) override
 
virtual void DestroyLight (LightPtr _light, bool _recursive=false) override
 
virtual void DestroyLightById (unsigned int _id) override
 
virtual void DestroyLightByIndex (unsigned int _index) override
 
virtual void DestroyLightByName (const std::string &_name) override
 
virtual void DestroyLights () override
 
virtual void DestroyMaterial (MaterialPtr _material) override
 
virtual void DestroyMaterials () override
 
virtual void DestroyNode (NodePtr _node, bool _recursive=false) override
 
virtual void DestroyNodeById (unsigned int _id) override
 
virtual void DestroyNodeByIndex (unsigned int _index) override
 
virtual void DestroyNodeByName (const std::string &_name) override
 
virtual void DestroyNodes () override
 
virtual void DestroySensor (SensorPtr _sensor, bool _recursive=false) override
 
virtual void DestroySensorById (unsigned int _id) override
 
virtual void DestroySensorByIndex (unsigned int _index) override
 
virtual void DestroySensorByName (const std::string &_name) override
 
virtual void DestroySensors () override
 
virtual void DestroyVisual (VisualPtr _visual, bool _recursive=false) override
 
virtual void DestroyVisualById (unsigned int _id) override
 
virtual void DestroyVisualByIndex (unsigned int _index) override
 
virtual void DestroyVisualByName (const std::string &_name) override
 
virtual void DestroyVisuals () override
 
virtual std::array< math::Color, 4 > GradientBackgroundColor () const override
 
virtual bool HasLight (ConstLightPtr _light) const override
 
virtual bool HasLightId (unsigned int _id) const override
 
virtual bool HasLightName (const std::string &_name) const override
 
virtual bool HasNode (ConstNodePtr _node) const override
 
virtual bool HasNodeId (unsigned int _id) const override
 
virtual bool HasNodeName (const std::string &_name) const override
 
virtual bool HasSensor (ConstSensorPtr _sensor) const override
 
virtual bool HasSensorId (unsigned int _id) const override
 
virtual bool HasSensorName (const std::string &_name) const override
 
virtual bool HasVisual (ConstVisualPtr _visual) const override
 
virtual bool HasVisualId (unsigned int _id) const override
 
virtual bool HasVisualName (const std::string &_name) const override
 
virtual unsigned int Id () const override
 
virtual void Init () override
 
virtual bool IsGradientBackgroundColor () const override
 
virtual bool IsInitialized () const override
 
virtual bool IsLoaded () const
 
virtual LightPtr LightById (unsigned int _id) const override
 
virtual LightPtr LightByIndex (unsigned int _index) const override
 
virtual LightPtr LightByName (const std::string &_name) const override
 
virtual unsigned int LightCount () const override
 
virtual void Load () override
 
virtual MaterialPtr Material (const std::string &_name) const override
 
virtual bool MaterialRegistered (const std::string &_name) const override
 
virtual std::string Name () const override
 
virtual NodePtr NodeById (unsigned int _id) const override
 
virtual NodePtr NodeByIndex (unsigned int _index) const override
 
virtual NodePtr NodeByName (const std::string &_name) const override
 
virtual unsigned int NodeCount () const override
 
virtual void RegisterMaterial (const std::string &_name, MaterialPtr _material) override
 
virtual SensorPtr SensorById (unsigned int _id) const override
 
virtual SensorPtr SensorByIndex (unsigned int _index) const override
 
virtual SensorPtr SensorByName (const std::string &_name) const override
 
virtual unsigned int SensorCount () const override
 
virtual void SetAmbientLight (double _r, double _g, double _b, double _a=1.0) override
 
virtual void SetBackgroundColor (double _r, double _g, double _b, double _a=1.0) override
 
virtual void SetSimTime (const common::Time &_time) override
 
virtual common::Time SimTime () const override
 
virtual void UnregisterMaterial (const std::string &_name) override
 
virtual void UnregisterMaterials () override
 
virtual VisualPtr VisualAt (const CameraPtr &_camera, const gz::math::Vector2i &_mousePos) override
 
virtual VisualPtr VisualById (unsigned int _id) const override
 
virtual VisualPtr VisualByIndex (unsigned int _index) const override
 
virtual VisualPtr VisualByName (const std::string &_name) const override
 
virtual unsigned int VisualCount () const override
 

Protected Member Functions

 OgreScene (unsigned int _id, const std::string &_name)
 
virtual ArrowVisualPtr CreateArrowVisualImpl (unsigned int _id, const std::string &_name)
 
virtual AxisVisualPtr CreateAxisVisualImpl (unsigned int _id, const std::string &_name)
 
virtual GeometryPtr CreateBoxImpl (unsigned int _id, const std::string &_name)
 
virtual CameraPtr CreateCameraImpl (unsigned int _id, const std::string &_name)
 
virtual GeometryPtr CreateConeImpl (unsigned int _id, const std::string &_name)
 
virtual GeometryPtr CreateCylinderImpl (unsigned int _id, const std::string &_name)
 
virtual DepthCameraPtr CreateDepthCameraImpl (const unsigned int _id, const std::string &_name)
 
virtual DirectionalLightPtr CreateDirectionalLightImpl (unsigned int _id, const std::string &_name)
 
virtual GizmoVisualPtr CreateGizmoVisualImpl (unsigned int _id, const std::string &_name)
 Implementation for creating a GizmoVisual. More...
 
virtual GpuRaysPtr CreateGpuRaysImpl (const unsigned int _id, const std::string &_name)
 Implementation for creating GpuRays sensor. More...
 
virtual GridPtr CreateGridImpl (unsigned int _id, const std::string &_name)
 Implementation for creating a grid geometry object. More...
 
virtual MarkerPtr CreateMarkerImpl (unsigned int _id, const std::string &_name)
 Implementation for creating a marker geometry object. More...
 
virtual MaterialPtr CreateMaterialImpl (unsigned int _id, const std::string &_name)
 
virtual MeshPtr CreateMeshImpl (unsigned int _id, const std::string &_name, const MeshDescriptor &_desc)
 
virtual MeshPtr CreateMeshImpl (unsigned int _id, const std::string &_name, const std::string &_meshName)
 
virtual GeometryPtr CreatePlaneImpl (unsigned int _id, const std::string &_name)
 
virtual PointLightPtr CreatePointLightImpl (unsigned int _id, const std::string &_name)
 
virtual RayQueryPtr CreateRayQueryImpl (unsigned int _id, const std::string &_name)
 
virtual RenderTexturePtr CreateRenderTextureImpl (unsigned int _id, const std::string &_name)
 
virtual RenderWindowPtr CreateRenderWindowImpl (unsigned int _id, const std::string &_name)
 Render engine specific implementation for creating a render window. More...
 
virtual GeometryPtr CreateSphereImpl (unsigned int _id, const std::string &_name)
 
virtual SpotLightPtr CreateSpotLightImpl (unsigned int _id, const std::string &_name)
 
virtual TextPtr CreateTextImpl (unsigned int _id, const std::string &_name)
 Implementation for creating a text's geometry object. More...
 
virtual ThermalCameraPtr CreateThermalCameraImpl (const unsigned int _id, const std::string &_name)
 Implementation for creating a thermal camera. More...
 
virtual VisualPtr CreateVisualImpl (unsigned int _id, const std::string &_name)
 
virtual bool InitImpl ()
 
virtual bool InitObject (OgreObjectPtr _object, unsigned int _id, const std::string &_name)
 
virtual LightStorePtr Lights () const
 
virtual bool LoadImpl ()
 
virtual MaterialMapPtr Materials () const
 
virtual SensorStorePtr Sensors () const
 
virtual VisualStorePtr Visuals () const
 
- Protected Member Functions inherited from BaseScene
 BaseScene (unsigned int _id, const std::string &_name)
 
virtual unsigned int CreateObjectId ()
 
virtual std::string CreateObjectName (unsigned int _id, const std::string &_prefix)
 
virtual bool RegisterLight (LightPtr _light)
 
virtual bool RegisterSensor (SensorPtr _vensor)
 
virtual bool RegisterVisual (VisualPtr _visual)
 

Protected Attributes

OgreLightStorePtr lights
 
OgreMaterialMapPtr materials
 
OgreMeshFactoryPtr meshFactory
 
Ogre::Root * ogreRoot
 
Ogre::SceneManager * ogreSceneManager
 
OgreVisualPtr rootVisual
 
OgreSensorStorePtr sensors
 
OgreVisualStorePtr visuals
 
- Protected Attributes inherited from BaseScene
math::Color backgroundColor
 Scene background color. Default should be black. More...
 
std::array< math::Color, 4 > gradientBackgroundColor
 The four corners of the 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. Default should be black. More...
 
unsigned int id
 
bool initialized
 
bool isGradientBackgroundColor = false
 Whether the scene has a gradient background. More...
 
bool loaded
 
std::string name
 
common::Time simTime
 

Constructor & Destructor Documentation

◆ OgreScene()

OgreScene ( unsigned int  _id,
const std::string _name 
)
protected

◆ ~OgreScene()

virtual ~OgreScene ( )
virtual

Member Function Documentation

◆ AmbientLight()

virtual math::Color AmbientLight ( ) const
virtual

◆ Clear()

virtual void Clear ( )
virtual

Reimplemented from BaseScene.

◆ CreateArrowVisualImpl()

virtual ArrowVisualPtr CreateArrowVisualImpl ( unsigned int  _id,
const std::string _name 
)
protectedvirtual

Implements BaseScene.

◆ CreateAxisVisualImpl()

virtual AxisVisualPtr CreateAxisVisualImpl ( unsigned int  _id,
const std::string _name 
)
protectedvirtual

Implements BaseScene.

◆ CreateBoxImpl()

virtual GeometryPtr CreateBoxImpl ( unsigned int  _id,
const std::string _name 
)
protectedvirtual

Implements BaseScene.

◆ CreateCameraImpl()

virtual CameraPtr CreateCameraImpl ( unsigned int  _id,
const std::string _name 
)
protectedvirtual

Implements BaseScene.

◆ CreateConeImpl()

virtual GeometryPtr CreateConeImpl ( unsigned int  _id,
const std::string _name 
)
protectedvirtual

Implements BaseScene.

◆ CreateCylinderImpl()

virtual GeometryPtr CreateCylinderImpl ( unsigned int  _id,
const std::string _name 
)
protectedvirtual

Implements BaseScene.

◆ CreateDepthCameraImpl()

virtual DepthCameraPtr CreateDepthCameraImpl ( const unsigned int  _id,
const std::string _name 
)
protectedvirtual

Implements BaseScene.

◆ CreateDirectionalLightImpl()

virtual DirectionalLightPtr CreateDirectionalLightImpl ( unsigned int  _id,
const std::string _name 
)
protectedvirtual

Implements BaseScene.

◆ CreateGizmoVisualImpl()

virtual GizmoVisualPtr CreateGizmoVisualImpl ( unsigned int  _id,
const std::string _name 
)
protectedvirtual

Implementation for creating a GizmoVisual.

Parameters
[in]_idUnique id
[in]_nameName of GizmoVisual

Reimplemented from BaseScene.

◆ CreateGpuRaysImpl()

virtual GpuRaysPtr CreateGpuRaysImpl ( const unsigned int  _id,
const std::string _name 
)
protectedvirtual

Implementation for creating GpuRays sensor.

Parameters
[in]_idUnique id
[in]_nameName of GpuRays sensor

Reimplemented from BaseScene.

◆ CreateGridImpl()

virtual GridPtr CreateGridImpl ( unsigned int  _id,
const std::string _name 
)
protectedvirtual

Implementation for creating a grid geometry object.

Parameters
[in]_idunique object id.
[in]_nameunique object name.
Returns
Pointer to a grid geometry object

Implements BaseScene.

◆ CreateMarkerImpl()

virtual MarkerPtr CreateMarkerImpl ( unsigned int  _id,
const std::string _name 
)
protectedvirtual

Implementation for creating a marker geometry object.

Parameters
[in]_idunique object id.
[in]_nameunique object name.
Returns
Pointer to a marker geometry object

Implements BaseScene.

◆ CreateMaterialImpl()

virtual MaterialPtr CreateMaterialImpl ( unsigned int  _id,
const std::string _name 
)
protectedvirtual

Implements BaseScene.

◆ CreateMeshImpl() [1/2]

virtual MeshPtr CreateMeshImpl ( unsigned int  _id,
const std::string _name,
const MeshDescriptor _desc 
)
protectedvirtual

Implements BaseScene.

◆ CreateMeshImpl() [2/2]

virtual MeshPtr CreateMeshImpl ( unsigned int  _id,
const std::string _name,
const std::string _meshName 
)
protectedvirtual

◆ CreatePlaneImpl()

virtual GeometryPtr CreatePlaneImpl ( unsigned int  _id,
const std::string _name 
)
protectedvirtual

Implements BaseScene.

◆ CreatePointLightImpl()

virtual PointLightPtr CreatePointLightImpl ( unsigned int  _id,
const std::string _name 
)
protectedvirtual

Implements BaseScene.

◆ CreateRayQueryImpl()

virtual RayQueryPtr CreateRayQueryImpl ( unsigned int  _id,
const std::string _name 
)
protectedvirtual

Implements BaseScene.

◆ CreateRenderTextureImpl()

virtual RenderTexturePtr CreateRenderTextureImpl ( unsigned int  _id,
const std::string _name 
)
protectedvirtual

Implements BaseScene.

◆ CreateRenderWindowImpl()

virtual RenderWindowPtr CreateRenderWindowImpl ( unsigned int  _id,
const std::string _name 
)
protectedvirtual

Render engine specific implementation for creating a render window.

Parameters
[in]_idunique object id
[in]_nameobject name
Returns
Pointer to the created render window.

Implements BaseScene.

◆ CreateSphereImpl()

virtual GeometryPtr CreateSphereImpl ( unsigned int  _id,
const std::string _name 
)
protectedvirtual

Implements BaseScene.

◆ CreateSpotLightImpl()

virtual SpotLightPtr CreateSpotLightImpl ( unsigned int  _id,
const std::string _name 
)
protectedvirtual

Implements BaseScene.

◆ CreateTextImpl()

virtual TextPtr CreateTextImpl ( unsigned int  _id,
const std::string _name 
)
protectedvirtual

Implementation for creating a text's geometry object.

Parameters
[in]_idunique object id.
[in]_nameunique object name.
Returns
Pointer to a text geometry object

Reimplemented from BaseScene.

◆ CreateThermalCameraImpl()

virtual ThermalCameraPtr CreateThermalCameraImpl ( const unsigned int  _id,
const std::string _name 
)
protectedvirtual

Implementation for creating a thermal camera.

Parameters
[in]_idUnique id
[in]_nameName of thermal camera

Reimplemented from BaseScene.

◆ CreateVisualImpl()

virtual VisualPtr CreateVisualImpl ( unsigned int  _id,
const std::string _name 
)
protectedvirtual

Implements BaseScene.

◆ Destroy()

virtual void Destroy ( )
virtual

Reimplemented from BaseScene.

◆ Engine()

virtual RenderEngine* Engine ( ) const
virtual

◆ Fini()

virtual void Fini ( )
virtual

Reimplemented from BaseScene.

◆ InitImpl()

virtual bool InitImpl ( )
protectedvirtual

Implements BaseScene.

◆ InitObject()

virtual bool InitObject ( OgreObjectPtr  _object,
unsigned int  _id,
const std::string _name 
)
protectedvirtual

◆ Lights()

virtual LightStorePtr Lights ( ) const
protectedvirtual

Implements BaseScene.

◆ LoadImpl()

virtual bool LoadImpl ( )
protectedvirtual

Implements BaseScene.

◆ Materials()

virtual MaterialMapPtr Materials ( ) const
protectedvirtual

Implements BaseScene.

◆ OgreSceneManager()

virtual Ogre::SceneManager* OgreSceneManager ( ) const
virtual

◆ PreRender()

virtual void PreRender ( )
virtual

Reimplemented from BaseScene.

◆ RemoveGradientBackgroundColor()

virtual void RemoveGradientBackgroundColor ( )
virtual

Reimplemented from BaseScene.

◆ RootVisual()

virtual VisualPtr RootVisual ( ) const
virtual

◆ Sensors()

virtual SensorStorePtr Sensors ( ) const
protectedvirtual

Implements BaseScene.

◆ SetAmbientLight()

virtual void SetAmbientLight ( const math::Color _color)
virtual

Implements BaseScene.

◆ SetBackgroundColor()

virtual void SetBackgroundColor ( const math::Color _color)
virtual

Reimplemented from BaseScene.

◆ SetGradientBackgroundColor()

virtual void SetGradientBackgroundColor ( const std::array< math::Color, 4 > &  _colors)
virtual

Reimplemented from BaseScene.

◆ Visuals()

virtual VisualStorePtr Visuals ( ) const
protectedvirtual

Implements BaseScene.

Member Data Documentation

◆ lights

OgreLightStorePtr lights
protected

◆ materials

OgreMaterialMapPtr materials
protected

◆ meshFactory

OgreMeshFactoryPtr meshFactory
protected

◆ ogreRoot

Ogre::Root* ogreRoot
protected

◆ ogreSceneManager

Ogre::SceneManager* ogreSceneManager
protected

◆ rootVisual

OgreVisualPtr rootVisual
protected

◆ sensors

OgreSensorStorePtr sensors
protected

◆ visuals

OgreVisualStorePtr visuals
protected

The documentation for this class was generated from the following file: