MinimalScene.hh
Go to the documentation of this file.
Ign-rendering renderer. All ign-rendering calls should be performed inside this class as it makes sur...
Definition: MinimalScene.hh:134
void Render(RenderSync *_renderSync)
void HandleKeyRelease(const common::KeyEvent &_e)
Handle key release event for snapping.
GLuint textureId
Render texture id.
Definition: MinimalScene.hh:212
void NewDropEvent(const std::string &_dropText, const math::Vector2i &_dropPos)
New hover event triggered.
void NewMouseEvent(const common::MouseEvent &_e)
New mouse event triggered.
void Destroy()
Destroy camera associated with this renderer.
void NewHoverEvent(const math::Vector2i &_hoverPos)
New hover event triggered.
std::string Initialize()
Initialize the render engine.
void HandleKeyPress(const common::KeyEvent &_e)
Handle key press event for snapping.
Creates a Gazebo rendering scene and user camera. It is possible to orbit the camera around the scene...
Definition: MinimalScene.hh:72
QString loadingError
Loading error message.
Definition: MinimalScene.hh:81
void OnDropped(const QString &_drop, int _mouseX, int _mouseY)
Callback when receives a drop event.
void OnFocusWindow()
Callback when the mouse enters the render window to focus the window for mouse/key events.
Q_INVOKABLE void SetLoadingError(const QString &_loadingError)
Set the loading error message.
virtual void LoadConfig(const tinyxml2::XMLElement *_pluginElem) override
Load the plugin with a configuration file. Override this on custom plugins to handle custom configura...
Q_INVOKABLE QString LoadingError() const
Get the loading error string.
void OnHovered(int _mouseX, int _mouseY)
Callback when the mouse hovers to a new position.
void LoadingErrorChanged()
Notify that loading error has changed.
void TextureReady(uint _id, const QSize &_size)
Signal to indicate that a frame has been rendered and ready to be displayed.
std::function< void(const QString &)> errorCb
Function to be called if there are errors.
Definition: MinimalScene.hh:291
void ShutDown()
Shutdown the thread and the render engine.
void SetErrorCb(std::function< void(const QString &)> _cb)
Set a callback to be called in case there are errors.
IgnRenderer ignRenderer
Ign-rendering renderer.
Definition: MinimalScene.hh:300
void RenderNext(RenderSync *_renderSync)
Render when safe.
void SizeChanged()
Slot called to update render texture size.
A QQUickItem that manages the render window.
Definition: MinimalScene.hh:305
virtual void keyReleaseEvent(QKeyEvent *_e) override
virtual void mouseReleaseEvent(QMouseEvent *_e) override
void SetAntiAliasing(unsigned int _aa)
Set the render window camera's anti-aliasing level.
void OnDropped(const QString &_drop, const gz::math::Vector2i &_dropPos)
Callback when receives a drop event.
void Ready()
Slot called when thread is ready to be started.
virtual void wheelEvent(QWheelEvent *_e) override
void SetSkyEnabled(const bool &_sky)
Set if sky is enabled.
void SetSceneName(const std::string &_name)
Set name of scene created inside the render window.
void SetCameraViewController(const std::string &_view_controller)
Set the camera view controller.
virtual void mouseMoveEvent(QMouseEvent *_e) override
void HandleKeyRelease(const common::KeyEvent &_e)
Handle key release event for snapping.
void SetEngineName(const std::string &_name)
Set engine name used to create the render window.
void SetCameraHFOV(const math::Angle &_fov)
Set the Horizontal FOV of the camera.
~RenderWindowItem()
void SetErrorCb(std::function< void(const QString &)> _cb)
Set a callback to be called in case there are errors.
virtual void mousePressEvent(QMouseEvent *_e) override
RenderWindowItem(QQuickItem *_parent=nullptr)
Constructor.
void SetCameraNearClip(double _near)
Set the render window camera's near clipping plane distance.
void SetBackgroundColor(const math::Color &_color)
Set background color of render window.
void SetCameraPose(const math::Pose3d &_pose)
Set the initial pose the render window camera.
void SetAmbientLight(const math::Color &_ambient)
Set ambient light of render window.
void SetCameraFarClip(double _far)
Set the render window camera's far clipping plane distance.
virtual void keyPressEvent(QKeyEvent *_e) override
void StopRendering()
Stop rendering and shutdown resources.
void OnHovered(const gz::math::Vector2i &_hoverPos)
Called when the mouse hovers to a new position.
void HandleKeyPress(const common::KeyEvent &_e)
Handle key press event for snapping.
Texture node for displaying the render texture from gz-renderer.
Definition: MinimalScene.hh:421
RenderSync & renderSync
See RenderSync.
Definition: MinimalScene.hh:461
void NewTexture(uint _id, const QSize &_size)
This function gets called on the FBO rendering thread and will store the texture id and size and sche...
void PendingNewTexture()
Signal emitted when a new texture is ready to trigger window update.
TextureNode(QQuickWindow *_window, RenderSync &_renderSync)
Constructor.
void PrepareNode()
Before the scene graph starts to render, we update to the pending texture.
void TextureInUse(RenderSync *_renderSync)
QMutex mutex
Mutex to protect the texture variables.
Definition: MinimalScene.hh:458
static const Color Black
Pose3< double > Pose3d
Definition: gz/gui/Application.hh:36