Gazebo Gui

API Reference

9.0.0

A QQUickItem that manages the render window. More...

#include <MinimalScene.hh>

Public Slots

void Ready ()
 Slot called when thread is ready to be started.
 

Public Member Functions

 RenderWindowItem (QQuickItem *_parent=nullptr)
 Constructor.
 
 ~RenderWindowItem ()
 
void HandleKeyPress (const common::KeyEvent &_e)
 Handle key press event for snapping.
 
void HandleKeyRelease (const common::KeyEvent &_e)
 Handle key release event for snapping.
 
void OnDropped (const QString &_drop, const gz::math::Vector2i &_dropPos)
 Callback when receives a drop event.
 
void OnHovered (const gz::math::Vector2i &_hoverPos)
 Called when the mouse hovers to a new position.
 
void SetAmbientLight (const math::Color &_ambient)
 Set ambient light of render window.
 
void SetBackgroundColor (const math::Color &_color)
 Set background color of render window.
 
void SetCameraFarClip (double _far)
 Set the render window camera's far clipping plane distance.
 
void SetCameraHFOV (const math::Angle &_fov)
 Set the Horizontal FOV of the camera.
 
void SetCameraNearClip (double _near)
 Set the render window camera's near clipping plane distance.
 
void SetCameraPose (const math::Pose3d &_pose)
 Set the initial pose the render window camera.
 
void SetCameraViewController (const std::string &_view_controller)
 Set the camera view controller.
 
void SetEngineName (const std::string &_name)
 Set engine name used to create the render window.
 
void SetErrorCb (std::function< void(const QString &)> _cb)
 Set a callback to be called in case there are errors.
 
void SetGraphicsAPI (const rendering::GraphicsAPI &_graphicsAPI)
 Set the graphics API.
 
void SetSceneName (const std::string &_name)
 Set name of scene created inside the render window.
 
bool SetShadowTextureSize (rendering::LightType _lightType, unsigned int _textureSize)
 Set the shadow texture size for the given light type.
 
void SetSkyEnabled (const bool &_sky)
 Set if sky is enabled.
 
void StopRendering ()
 Stop rendering and shutdown resources.
 

Protected Member Functions

virtual void keyPressEvent (QKeyEvent *_e) override
 
virtual void keyReleaseEvent (QKeyEvent *_e) override
 
virtual void mouseMoveEvent (QMouseEvent *_e) override
 
virtual void mousePressEvent (QMouseEvent *_e) override
 
virtual void mouseReleaseEvent (QMouseEvent *_e) override
 
virtual void wheelEvent (QWheelEvent *_e) override
 

Detailed Description

A QQUickItem that manages the render window.

Constructor & Destructor Documentation

◆ RenderWindowItem()

RenderWindowItem ( QQuickItem *  _parent = nullptr)
explicit

Constructor.

Parameters
[in]_parentParent item

◆ ~RenderWindowItem()

Member Function Documentation

◆ HandleKeyPress()

void HandleKeyPress ( const common::KeyEvent &  _e)

Handle key press event for snapping.

Parameters
[in]_eThe key event to process.

◆ HandleKeyRelease()

void HandleKeyRelease ( const common::KeyEvent &  _e)

Handle key release event for snapping.

Parameters
[in]_eThe key event to process.

◆ keyPressEvent()

virtual void keyPressEvent ( QKeyEvent _e)
overrideprotectedvirtual

◆ keyReleaseEvent()

virtual void keyReleaseEvent ( QKeyEvent _e)
overrideprotectedvirtual

◆ mouseMoveEvent()

virtual void mouseMoveEvent ( QMouseEvent _e)
overrideprotectedvirtual

◆ mousePressEvent()

virtual void mousePressEvent ( QMouseEvent _e)
overrideprotectedvirtual

◆ mouseReleaseEvent()

virtual void mouseReleaseEvent ( QMouseEvent _e)
overrideprotectedvirtual

◆ OnDropped()

void OnDropped ( const QString _drop,
const gz::math::Vector2i _dropPos 
)

Callback when receives a drop event.

Parameters
[in]_dropDropped string.
[in]_dropPosx coordinate of mouse position.

◆ OnHovered()

void OnHovered ( const gz::math::Vector2i _hoverPos)

Called when the mouse hovers to a new position.

Parameters
[in]_hoverPos2D coordinates of the hovered mouse position on the render window.

◆ Ready

void Ready ( )
slot

Slot called when thread is ready to be started.

◆ SetAmbientLight()

void SetAmbientLight ( const math::Color &  _ambient)

Set ambient light of render window.

Parameters
[in]_ambientColor of ambient light

◆ SetBackgroundColor()

void SetBackgroundColor ( const math::Color &  _color)

Set background color of render window.

Parameters
[in]_colorColor of render window background

◆ SetCameraFarClip()

void SetCameraFarClip ( double  _far)

Set the render window camera's far clipping plane distance.

Parameters
[in]_farFar clipping plane distance

◆ SetCameraHFOV()

void SetCameraHFOV ( const math::Angle &  _fov)

Set the Horizontal FOV of the camera.

Parameters
[in]_fovFOV of the camera in degree

◆ SetCameraNearClip()

void SetCameraNearClip ( double  _near)

Set the render window camera's near clipping plane distance.

Parameters
[in]_nearNear clipping plane distance

◆ SetCameraPose()

void SetCameraPose ( const math::Pose3d &  _pose)

Set the initial pose the render window camera.

Parameters
[in]_poseInitial camera pose

◆ SetCameraViewController()

void SetCameraViewController ( const std::string _view_controller)

Set the camera view controller.

Parameters
[in]_view_controllerThe camera view controller type to set

◆ SetEngineName()

void SetEngineName ( const std::string _name)

Set engine name used to create the render window.

Parameters
[in]_nameName of render engine

◆ SetErrorCb()

void SetErrorCb ( std::function< void(const QString &)>  _cb)

Set a callback to be called in case there are errors.

Parameters
[in]_cbError callback

◆ SetGraphicsAPI()

void SetGraphicsAPI ( const rendering::GraphicsAPI &  _graphicsAPI)

Set the graphics API.

Parameters
[in]_graphicsAPIThe type of graphics API

◆ SetSceneName()

void SetSceneName ( const std::string _name)

Set name of scene created inside the render window.

Parameters
[in]_nameName of scene

◆ SetShadowTextureSize()

bool SetShadowTextureSize ( rendering::LightType  _lightType,
unsigned int  _textureSize 
)

Set the shadow texture size for the given light type.

Parameters
_lightTypeLight type that creates the shadow
_textureSizeShadow texture size

◆ SetSkyEnabled()

void SetSkyEnabled ( const bool &  _sky)

Set if sky is enabled.

Parameters
[in]_skyTrue to enable the sky, false otherwise.

◆ StopRendering()

void StopRendering ( )

Stop rendering and shutdown resources.

◆ wheelEvent()

virtual void wheelEvent ( QWheelEvent _e)
overrideprotectedvirtual

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