![]() |
NDEVR
API Documentation
|
A Viewport for rendering 3D objects in the scene with the NDEVR Graphics Engine. More...
Public Member Functions | |
| VirtualCameraView (QTGraphicsWidget *widget, const DynamicPointer< Camera > &camera, QTModelManager *model_manager, QWidget *parent=nullptr) | |
| Constructs a camera view with a specific camera and model manager. | |
| VirtualCameraView (QTGraphicsWidget *widget, QWidget *parent=nullptr) | |
| Constructs a camera view without an initial camera. | |
| ~VirtualCameraView () | |
| Destructor. | |
| void | addContextCustomMenu (const UUID &id, ContextMenuCallback *callback) override |
| Adds a custom context menu callback for this view. | |
| virtual void | addWidget (const QPointer< QWidget > &widget) override |
| Adds an overlay widget to the view. | |
| virtual ConstPointer< Camera > | camera () const override |
| Returns the camera (const). | |
| virtual DynamicPointer< Camera > | camera () override |
| Returns the camera. | |
| QWidget * | cameraToolbar () override |
| Returns the camera toolbar widget. | |
| void | dragEnterEvent (QDragEnterEvent *event) override |
| Handles drag-enter events for file drop support. | |
| void | dropEvent (QDropEvent *event) override |
| Handles drop events for file import. | |
| bool | event (QEvent *e) override |
| Handles events for the view. | |
| String | getCursorID () const |
| Returns the current cursor identifier string. | |
| QTGraphicsWindow * | graphicsWindow () const |
| Returns the underlying graphics window. | |
| UUID | id () const override |
| Returns the UUID of this view. | |
| virtual void | removeWidget (const QPointer< QWidget > &widget) override |
| Removes an overlay widget from the view. | |
| void | requestShowInfoDisplay (bool should_show) override |
| Requests showing or hiding the info display overlay. | |
| void | resetToolRibbon () override |
| Resets the tool ribbon to its default state. | |
| QImage | screenshot () |
| Captures the current view as a QImage. | |
| void | screenshotToClipboard (bool include_background) |
| Copies a screenshot to the clipboard. | |
| void | screenshotToPrint (uint04 index=Constant< uint04 >::Invalid) |
| Sends a screenshot to the printer. | |
| void | setCamera (const DynamicPointer< Camera > &camera) |
| Sets the camera for this view. | |
| void | setModelManager (QTModelManager *manager) |
| Sets the model manager. | |
| void | setSwapMode (SwapMode mode) override |
| Sets the swap chain presentation mode. | |
| void | setTouchTheme (bool touch_theme) override |
| Switches the UI to touch-optimized or desktop theme. | |
| void | setupRulers () |
| Sets up the edge and top rulers. | |
| void | showToolRibbon (bool visible) override |
| Shows or hides the tool ribbon. | |
| void | toPDF (const File &pdf_file) |
| Exports the view to a PDF file. | |
| void | updateView () override |
| Updates the view state from the camera and scene. | |
Protected Member Functions | |
| void | editOverrideMaterial () |
| Opens the override material editor. | |
| void | init () |
| Initializes the view layout, toolbar, and signal connections. | |
| void | onMaterialDeleted (UUID material) |
| Handles deletion of the override material. | |
| void | removeOverrideMaterial () |
| Removes the current override material. | |
| void | requestCameraLink (bool selected) |
| Handles a camera link request from the toolbar. | |
| void | showContextMenu (const QPoint &pos) |
| Shows the right-click context menu. | |
| void | updateCursor () |
| Updates the mouse cursor from the current controller state. | |
Protected Attributes | |
| CameraToolbar * | m_camera_toolbar |
| The camera control toolbar. | |
| QTResourceListener * | m_cursor_listener |
| Listener for cursor changes. | |
| Dictionary< UUID, ContextMenuCallback * > | m_custom_context_callbacks |
| Custom context menu callbacks. | |
| QTGraphicsWidget * | m_graphics_widget |
| The graphics widget container. | |
| QTGraphicsWindow * | m_graphics_window |
| The underlying graphics window. | |
| QMenu * | m_menu = nullptr |
| The right-click context menu. | |
| QTModelManager * | m_model_manager |
| The model manager. | |
| QTResourceListener * | m_orientation_listener |
| Listener for orientation changes. | |
| QTResourceListener * | m_orthograhic_listener |
| Listener for orthographic mode changes. | |
| Button * | m_ruler_button |
| Button toggling ruler visibility. | |
| CameraRulerMenu * | m_ruler_combo |
| Ruler configuration menu. | |
| QTResourceListener * | m_selection_info_listener |
| Listener for selection info changes. | |
| bool | m_should_show_info = true |
| Whether the info display overlay is shown. | |
| bool | m_show_edge_ruler_ortho |
| Whether edge ruler is shown in orthographic mode. | |
| bool | m_show_edge_ruler_perspective |
| Whether edge ruler is shown in perspective mode. | |
| bool | m_show_toolbar |
| Whether the camera toolbar is visible. | |
| bool | m_show_top_ruler_ortho |
| Whether top ruler is shown in orthographic mode. | |
| bool | m_show_top_ruler_perspective |
| Whether top ruler is shown in perspective mode. | |
| Ruler * | m_side_ruler |
| Side (vertical) ruler widget. | |
| Ruler * | m_top_ruler |
| Top (horizontal) ruler widget. | |
| bool | m_touch_theme |
| Whether touch-optimized theme is active. | |
A Viewport for rendering 3D objects in the scene with the NDEVR Graphics Engine.
Users interact with this view via the ContextMenuCallback and MouseController. A QTGraphicsWindow renders the content.
Definition at line 65 of file VirtualCameraView.h.
| VirtualCameraView::VirtualCameraView | ( | QTGraphicsWidget * | widget, |
| const DynamicPointer< Camera > & | camera, | ||
| QTModelManager * | model_manager, | ||
| QWidget * | parent = nullptr ) |
| VirtualCameraView::VirtualCameraView | ( | QTGraphicsWidget * | widget, |
| QWidget * | parent = nullptr ) |
Constructs a camera view without an initial camera.
| [in] | widget | The graphics widget. |
| [in] | parent | Optional parent widget. |
|
override |
Adds a custom context menu callback for this view.
| [in] | id | The callback identifier. |
| [in] | callback | The context menu callback. |
|
overridevirtual |
Adds an overlay widget to the view.
| [in] | widget | The widget to add. |
|
overridevirtual |
Returns the camera (const).
Referenced by VirtualCameraView(), and setCamera().
|
overridevirtual |
Returns the camera.
|
override |
Returns the camera toolbar widget.
|
override |
|
override |
|
override |
Handles events for the view.
| [in] | e | The event. |
Referenced by dragEnterEvent(), and dropEvent().
| String VirtualCameraView::getCursorID | ( | ) | const |
Returns the current cursor identifier string.
|
inline |
Returns the underlying graphics window.
Definition at line 100 of file VirtualCameraView.h.
References m_graphics_window.
|
protected |
Handles deletion of the override material.
| [in] | material | The deleted material UUID. |
|
overridevirtual |
Removes an overlay widget from the view.
| [in] | widget | The widget to remove. |
|
protected |
Handles a camera link request from the toolbar.
| [in] | selected | Whether the link is selected. |
|
override |
Requests showing or hiding the info display overlay.
| [in] | should_show | Whether to show the display. |
| QImage VirtualCameraView::screenshot | ( | ) |
Captures the current view as a QImage.
| void VirtualCameraView::screenshotToClipboard | ( | bool | include_background | ) |
Copies a screenshot to the clipboard.
| [in] | include_background | Whether to include the background. |
Sends a screenshot to the printer.
| [in] | index | Optional printer index. |
| void VirtualCameraView::setCamera | ( | const DynamicPointer< Camera > & | camera | ) |
Sets the camera for this view.
| [in] | camera | The camera pointer. |
References camera().
Referenced by GLESCameraViewFactory::createView().
| void VirtualCameraView::setModelManager | ( | QTModelManager * | manager | ) |
Sets the model manager.
| [in] | manager | The model manager. |
Referenced by GLESCameraViewFactory::createView().
|
override |
Sets the swap chain presentation mode.
| [in] | mode | The swap mode. |
|
override |
Switches the UI to touch-optimized or desktop theme.
| [in] | touch_theme | Whether to use touch theme. |
|
protected |
Shows the right-click context menu.
| [in] | pos | The screen position. |
|
override |
Shows or hides the tool ribbon.
| [in] | visible | Whether to show the ribbon. |
| void VirtualCameraView::toPDF | ( | const File & | pdf_file | ) |
Exports the view to a PDF file.
| [in] | pdf_file | The output file path. |