Ign-rendering renderer. All ign-rendering calls should be performed inside this class as it makes sure that opengl calls in the underlying render engine do not interfere with QtQuick's opengl render operations. The main Render function will render to an offscreen texture and notify via signal and slots when it's ready to be displayed. More...
#include <Scene3D.hh>
Public Member Functions | |
| IgnRenderer () | |
| Constructor. More... | |
| ~IgnRenderer () | |
| Destructor. More... | |
| void | Destroy () |
| Destroy camera associated with this renderer. More... | |
| void | HandleKeyPress (QKeyEvent *_e) |
| Handle key press event for snapping. More... | |
| void | HandleKeyRelease (QKeyEvent *_e) |
| Handle key release event for snapping. More... | |
| std::string | Initialize () |
| Initialize the render engine. More... | |
| void | NewHoverEvent (const math::Vector2i &_hoverPos) |
| New hover event triggered. More... | |
| void | NewMouseEvent (const common::MouseEvent &_e, const math::Vector2d &_drag=math::Vector2d::Zero) |
| New mouse event triggered. More... | |
| void | Render () |
| Main render function. More... | |
Public Attributes | |
| math::Color | ambientLight = math::Color(0.3f, 0.3f, 0.3f, 1.0f) |
| Ambient color. More... | |
| math::Color | backgroundColor = math::Color::Black |
| Scene background color. More... | |
| math::Pose3d | cameraPose = math::Pose3d(0, 0, 2, 0, 0.4, 0) |
| Initial Camera pose. More... | |
| std::string | deletionTopic |
| Ign-transport deletion topic name. More... | |
| std::string | engineName = "ogre" |
| Render engine to use. More... | |
| bool | initialized = false |
| True if engine has been initialized;. More... | |
| std::string | poseTopic |
| Scene pose topic. If not empty, a node will subcribe to this topic to get pose updates of objects in the scene. More... | |
| std::string | sceneName = "scene" |
| Unique scene name. More... | |
| std::string | sceneService |
| Scene service. If not empty, a request will be made to get the scene information using this service and the renderer will populate the scene based on the response data. More... | |
| std::string | sceneTopic |
| Ign-transport scene topic name New scene messages will be published to this topic when an entities are added. More... | |
| bool | textureDirty = false |
| Flag to indicate texture size has changed. More... | |
| GLuint | textureId = 0u |
| Render texture id. More... | |
| QSize | textureSize = QSize(1024, 1024) |
| Render texture size. More... | |
Detailed Description
Ign-rendering renderer. All ign-rendering calls should be performed inside this class as it makes sure that opengl calls in the underlying render engine do not interfere with QtQuick's opengl render operations. The main Render function will render to an offscreen texture and notify via signal and slots when it's ready to be displayed.
Constructor & Destructor Documentation
◆ IgnRenderer()
| IgnRenderer | ( | ) |
Constructor.
◆ ~IgnRenderer()
| ~IgnRenderer | ( | ) |
Destructor.
Member Function Documentation
◆ Destroy()
| void Destroy | ( | ) |
Destroy camera associated with this renderer.
◆ 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.
◆ Initialize()
| std::string Initialize | ( | ) |
Initialize the render engine.
- Returns
- Error message if initialization failed. If empty, no errors occurred.
◆ NewHoverEvent()
| void NewHoverEvent | ( | const math::Vector2i & | _hoverPos | ) |
New hover event triggered.
- Parameters
-
[in] _hoverPos Mouse hover screen position
◆ NewMouseEvent()
| void NewMouseEvent | ( | const common::MouseEvent & | _e, |
| const math::Vector2d & | _drag = math::Vector2d::Zero |
||
| ) |
New mouse event triggered.
- Parameters
-
[in] _e New mouse event [in] _drag Mouse move distance
◆ Render()
| void Render | ( | ) |
Main render function.
Member Data Documentation
◆ ambientLight
| math::Color ambientLight = math::Color(0.3f, 0.3f, 0.3f, 1.0f) |
Ambient color.
◆ backgroundColor
| math::Color backgroundColor = math::Color::Black |
Scene background color.
◆ cameraPose
| math::Pose3d cameraPose = math::Pose3d(0, 0, 2, 0, 0.4, 0) |
Initial Camera pose.
◆ deletionTopic
| std::string deletionTopic |
Ign-transport deletion topic name.
◆ engineName
| std::string engineName = "ogre" |
Render engine to use.
◆ initialized
| bool initialized = false |
True if engine has been initialized;.
◆ poseTopic
| std::string poseTopic |
Scene pose topic. If not empty, a node will subcribe to this topic to get pose updates of objects in the scene.
◆ sceneName
| std::string sceneName = "scene" |
Unique scene name.
◆ sceneService
| std::string sceneService |
Scene service. If not empty, a request will be made to get the scene information using this service and the renderer will populate the scene based on the response data.
◆ sceneTopic
| std::string sceneTopic |
Ign-transport scene topic name New scene messages will be published to this topic when an entities are added.
◆ textureDirty
| bool textureDirty = false |
Flag to indicate texture size has changed.
◆ textureId
| GLuint textureId = 0u |
Render texture id.
◆ textureSize
The documentation for this class was generated from the following file: