A QQUickItem that manages the render window. More...
#include <Scene3D.hh>
Public Slots | |
void | Ready () |
Slot called when thread is ready to be started. More... | |
Public Member Functions | |
RenderWindowItem (QQuickItem *_parent=nullptr) | |
Constructor. More... | |
virtual | ~RenderWindowItem () |
Destructor. More... | |
void | HandleKeyPress (QKeyEvent *_e) |
Handle key press event for snapping. More... | |
void | HandleKeyRelease (QKeyEvent *_e) |
Handle key release event for snapping. More... | |
void | OnHovered (const gz::math::Vector2i &_hoverPos) |
Called when the mouse hovers to a new position. More... | |
void | SetAmbientLight (const math::Color &_ambient) |
Set ambient light of render window. More... | |
void | SetBackgroundColor (const math::Color &_color) |
Set background color of render window. More... | |
void | SetCameraPose (const math::Pose3d &_pose) |
Set the initial pose the render window camera. More... | |
void | SetDeletionTopic (const std::string &_topic) |
Set deletion topic to use for deleting objects from the scene The renderer will subscribe to this topic to get notified when entities in the scene get deleted. More... | |
void | SetEngineName (const std::string &_name) |
Set engine name used to create the render window. More... | |
void | SetErrorCb (std::function< void(const QString &)> _cb) |
Set a callback to be called in case there are errors. More... | |
void | SetPoseTopic (const std::string &_topic) |
Set pose topic to use for updating objects in the scene The renderer will subscribe to this topic to get pose messages of visuals in the scene. More... | |
void | SetSceneName (const std::string &_name) |
Set name of scene created inside the render window. More... | |
void | SetSceneService (const std::string &_service) |
Set scene service to use in this render window A service call will be made using ign-transport to get scene data using this service. More... | |
void | SetSceneTopic (const std::string &_topic) |
Set the scene topic to use for updating objects in the scene The renderer will subscribe to this topic to get updates scene messages. More... | |
Protected Member Functions | |
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()
|
explicit |
Constructor.
- Parameters
-
[in] _parent Parent item
◆ ~RenderWindowItem()
|
virtual |
Destructor.
Member Function Documentation
◆ HandleKeyPress()
void HandleKeyPress | ( | QKeyEvent * | _e | ) |
Handle key press event for snapping.
- Parameters
-
[in] _e The key event to process.
◆ HandleKeyRelease()
void HandleKeyRelease | ( | QKeyEvent * | _e | ) |
Handle key release event for snapping.
- Parameters
-
[in] _e The key event to process.
◆ mouseMoveEvent()
|
overrideprotectedvirtual |
◆ mousePressEvent()
|
overrideprotectedvirtual |
◆ mouseReleaseEvent()
|
overrideprotectedvirtual |
◆ OnHovered()
void OnHovered | ( | const gz::math::Vector2i & | _hoverPos | ) |
Called when the mouse hovers to a new position.
- Parameters
-
[in] _hoverPos 2D coordinates of the hovered mouse position on the render window.
◆ 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] _ambient Color of ambient light
◆ SetBackgroundColor()
void SetBackgroundColor | ( | const math::Color & | _color | ) |
Set background color of render window.
- Parameters
-
[in] _color Color of render window background
◆ SetCameraPose()
void SetCameraPose | ( | const math::Pose3d & | _pose | ) |
Set the initial pose the render window camera.
- Parameters
-
[in] _pose Initical camera pose
◆ SetDeletionTopic()
void SetDeletionTopic | ( | const std::string & | _topic | ) |
Set deletion topic to use for deleting objects from the scene The renderer will subscribe to this topic to get notified when entities in the scene get deleted.
- Parameters
-
[in] _topic Deletion topic
◆ SetEngineName()
void SetEngineName | ( | const std::string & | _name | ) |
Set engine name used to create the render window.
- Parameters
-
[in] _name Name 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] _cb Error callback
◆ SetPoseTopic()
void SetPoseTopic | ( | const std::string & | _topic | ) |
Set pose topic to use for updating objects in the scene The renderer will subscribe to this topic to get pose messages of visuals in the scene.
- Parameters
-
[in] _topic Pose topic
◆ SetSceneName()
void SetSceneName | ( | const std::string & | _name | ) |
Set name of scene created inside the render window.
- Parameters
-
[in] _name Name of scene
◆ SetSceneService()
void SetSceneService | ( | const std::string & | _service | ) |
Set scene service to use in this render window A service call will be made using ign-transport to get scene data using this service.
- Parameters
-
[in] _service Scene service name
◆ SetSceneTopic()
void SetSceneTopic | ( | const std::string & | _topic | ) |
Set the scene topic to use for updating objects in the scene The renderer will subscribe to this topic to get updates scene messages.
- Parameters
-
[in] _topic Scene topic
◆ wheelEvent()
|
overrideprotectedvirtual |
The documentation for this class was generated from the following file: