Gazebo Gazebo

API Reference

6.16.0

Creates an ignition rendering scene and user camera. It is possible to orbit the camera around the scene with the mouse. Use other plugins to manage objects in the scene. More...

#include <Scene3D.hh>

Public Slots

void OnDropped (const QString &_drop, int _mouseX, int _mouseY)
 Callback when receives a drop event. More...
 
void OnFocusWindow ()
 Callback when the mouse enters the render window to focus the window for mouse/key events. More...
 
void OnHovered (int _mouseX, int _mouseY)
 Callback when the mouse hovers to a new position. More...
 

Signals

void ErrorPopupTextChanged ()
 Notify the popup error text has changed. More...
 
void LoadingErrorChanged ()
 Notify that loading error has changed. More...
 
void popupError ()
 Notify that an error has occurred (opens popup) Note that the function name needs to start with lowercase in order for the connection to work on the QML side. More...
 

Public Member Functions

 Scene3D ()
 Constructor. More...
 
 ~Scene3D () override
 Destructor. More...
 
Q_INVOKABLE QString ErrorPopupText () const
 Get the text for the popup error message. More...
 
void LoadConfig (const tinyxml2::XMLElement *_pluginElem) override
 
Q_INVOKABLE QString LoadingError () const
 Get the loading error string. More...
 
Q_INVOKABLE void SetErrorPopupText (const QString &_errorTxt)
 Set the text for the popup error message. More...
 
Q_INVOKABLE void SetLoadingError (const QString &_loadingError)
 Set the loading error message. More...
 
void Update (const UpdateInfo &_info, EntityComponentManager &_ecm) override
 Update callback called every time the system is stepped. This is called at an Ignition transport thread, so any interaction with Qt should be done through signals and slots. More...
 

Protected Member Functions

bool eventFilter (QObject *_obj, QEvent *_event) override
 

Properties

QString errorPopupText
 Text for popup error. More...
 
QString loadingError
 Loading error message. More...
 

Detailed Description

Creates an ignition rendering scene and user camera. It is possible to orbit the camera around the scene with the mouse. Use other plugins to manage objects in the scene.

Only one plugin displaying an Ignition Rendering scene can be used at a time.

Configuration

  • <engine> : Optional render engine name, defaults to 'ogre'.
  • <scene> : Optional scene name, defaults to 'scene'. The plugin will create a scene with this name if there isn't one yet. If there is already one, a new camera is added to it.
  • <ambient_light> : Optional color for ambient light, defaults to (0.3, 0.3, 0.3, 1.0)
  • <background_color> : Optional background color, defaults to (0.3, 0.3, 0.3, 1.0)
  • <camera_pose> : Optional starting pose for the camera, defaults to (0, 0, 5, 0, 0, 0)
  • <camera_follow> :
    • <p_gain> : Camera follow movement p gain.
    • <target> : Target to follow.
  • <fullscreen> : Optional starting the window in fullscreen.

Constructor & Destructor Documentation

◆ Scene3D()

Scene3D ( )

Constructor.

◆ ~Scene3D()

~Scene3D ( )
override

Destructor.

Member Function Documentation

◆ ErrorPopupText()

Q_INVOKABLE QString ErrorPopupText ( ) const

Get the text for the popup error message.

Returns
The error text

◆ ErrorPopupTextChanged

void ErrorPopupTextChanged ( )
signal

Notify the popup error text has changed.

◆ eventFilter()

bool eventFilter ( QObject *  _obj,
QEvent *  _event 
)
overrideprotected

◆ LoadConfig()

void LoadConfig ( const tinyxml2::XMLElement *  _pluginElem)
override

◆ LoadingError()

Q_INVOKABLE QString LoadingError ( ) const

Get the loading error string.

Returns
String explaining the loading error. If empty, there's no error.

◆ LoadingErrorChanged

void LoadingErrorChanged ( )
signal

Notify that loading error has changed.

◆ OnDropped

void OnDropped ( const QString &  _drop,
int  _mouseX,
int  _mouseY 
)
slot

Callback when receives a drop event.

Parameters
[in]_dropDropped string.
[in]_mouseXx coordinate of mouse position.
[in]_mouseYy coordinate of mouse position.

◆ OnFocusWindow

void OnFocusWindow ( )
slot

Callback when the mouse enters the render window to focus the window for mouse/key events.

◆ OnHovered

void OnHovered ( int  _mouseX,
int  _mouseY 
)
slot

Callback when the mouse hovers to a new position.

Parameters
[in]_mouseXx coordinate of the hovered mouse position.
[in]_mouseYy coordinate of the hovered mouse position.

◆ popupError

void popupError ( )
signal

Notify that an error has occurred (opens popup) Note that the function name needs to start with lowercase in order for the connection to work on the QML side.

◆ SetErrorPopupText()

Q_INVOKABLE void SetErrorPopupText ( const QString &  _errorTxt)

Set the text for the popup error message.

Parameters
[in]_errorTxtThe error text

◆ SetLoadingError()

Q_INVOKABLE void SetLoadingError ( const QString &  _loadingError)

Set the loading error message.

Parameters
[in]_loadingErrorError message.

◆ Update()

void Update ( const UpdateInfo _info,
EntityComponentManager _ecm 
)
overridevirtual

Update callback called every time the system is stepped. This is called at an Ignition transport thread, so any interaction with Qt should be done through signals and slots.

Parameters
[in]_infoCurrent simulation information, such as time.
[in]_ecmMutable reference to the ECM, so the system can read and write entities and their components.

Reimplemented from GuiSystem.

Property Documentation

◆ errorPopupText

QString errorPopupText
readwrite

Text for popup error.

◆ loadingError

QString loadingError
readwrite

Loading error message.


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