Scene3D.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
std::string poseTopic
Scene pose topic. If not empty, a node will subcribe to this topic to get pose updates of objects in ...
Definition: Scene3D.hh:224
std::string sceneService
Scene service. If not empty, a request will be made to get the scene information using this service a...
Definition: Scene3D.hh:220
std::string sceneTopic
Ign-transport scene topic name New scene messages will be published to this topic when an entities ar...
Definition: Scene3D.hh:232
void HandleKeyPress(QKeyEvent *_e)
Handle key press event for snapping.
void HandleKeyRelease(QKeyEvent *_e)
Handle key release event for snapping.
void Destroy()
Destroy camera associated with this renderer.
void NewMouseEvent(const common::MouseEvent &_e, const math::Vector2d &_drag=math::Vector2d::Zero)
New mouse event triggered.
void NewHoverEvent(const math::Vector2i &_hoverPos)
New hover event triggered.
std::string Initialize()
Initialize the render engine.
std::string deletionTopic
Ign-transport deletion topic name.
Definition: Scene3D.hh:227
void TextureReady(int _id, const QSize &_size)
Signal to indicate that a frame has been rendered and ready to be displayed.
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.
void SizeChanged()
Slot called to update render texture size.
A QQUickItem that manages the render window.
Definition: MinimalScene.hh:305
virtual void mouseReleaseEvent(QMouseEvent *_e) override
void Ready()
Slot called when thread is ready to be started.
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 ...
virtual void wheelEvent(QWheelEvent *_e) override
void SetDeletionTopic(const std::string &_topic)
Set deletion topic to use for deleting objects from the scene The renderer will subscribe to this top...
virtual void keyPressEvent(QKeyEvent *_event) override
void SetSceneName(const std::string &_name)
Set name of scene created inside the render window.
void HandleKeyPress(QKeyEvent *_e)
Handle key press event for snapping.
void HandleKeyRelease(QKeyEvent *_e)
Handle key release event for snapping.
virtual void mouseMoveEvent(QMouseEvent *_e) override
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...
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.
virtual void mousePressEvent(QMouseEvent *_e) override
virtual void keyReleaseEvent(QKeyEvent *_event) override
RenderWindowItem(QQuickItem *_parent=nullptr)
Constructor.
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 SetSceneTopic(const std::string &_topic)
Set the scene topic to use for updating objects in the scene The renderer will subscribe to this topi...
void OnHovered(const gz::math::Vector2i &_hoverPos)
Called when the mouse hovers to a new position.
Creates an ignition rendering scene and user camera. It is possible to orbit the camera around the sc...
Definition: Scene3D.hh:67
QString loadingError
Loading error message.
Definition: Scene3D.hh:76
bool eventFilter(QObject *_obj, QEvent *_event) override
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.
Texture node for displaying the render texture from gz-renderer.
Definition: MinimalScene.hh:421
void PendingNewTexture()
Signal emitted when a new texture is ready to trigger window update.
void TextureInUse()
Signal emitted when the texture is being rendered and renderer can start rendering next frame.
void PrepareNode()
Before the scene graph starts to render, we update to the pending texture.
void NewTexture(int _id, const QSize &_size)
This function gets called on the FBO rendering thread and will store the texture id and size and sche...
static const Color Black
static const Vector2< T > Zero
Pose3< double > Pose3d
STL namespace.
Definition: gz/gui/Application.hh:36