Manages background 3D offscreen rendering worker thread, LOD evaluation, and Slint image dispatch.
More...
#include <Structure3DRenderPipeline.hpp>
Manages background 3D offscreen rendering worker thread, LOD evaluation, and Slint image dispatch.
◆ FrameDispatchedCallback
◆ Structure3DRenderPipeline() [1/3]
Constructs pipeline and starts background rendering worker thread.
- Parameters
-
| [in] | callback | Callback invoked with rendered Slint image on Slint event loop. |
| [in] | alive | Liveness flag to avoid dispatching after parent controller destruction. |
| [in] | engine | Optional custom IRenderEngine instance (defaults to auto backend). |
◆ ~Structure3DRenderPipeline()
| correlation::app::Structure3DRenderPipeline::~Structure3DRenderPipeline |
( |
| ) |
|
Destructor. Signals stop condition and joins worker thread safely.
◆ Structure3DRenderPipeline() [2/3]
| correlation::app::Structure3DRenderPipeline::Structure3DRenderPipeline |
( |
const Structure3DRenderPipeline & | | ) |
|
|
delete |
◆ Structure3DRenderPipeline() [3/3]
| correlation::app::Structure3DRenderPipeline::Structure3DRenderPipeline |
( |
Structure3DRenderPipeline && | | ) |
|
|
delete |
◆ backendName()
| std::string correlation::app::Structure3DRenderPipeline::backendName |
( |
| ) |
const |
|
nodiscard |
Human-readable name of the active rendering backend.
- Returns
- Backend name string, or "None" if uninitialized.
◆ deviceName()
| std::string correlation::app::Structure3DRenderPipeline::deviceName |
( |
| ) |
const |
|
nodiscard |
Human-readable name of the active rendering device (GPU or CPU).
- Returns
- Device name string, or "None" if uninitialized.
◆ dimensions()
Current viewport pixel dimensions.
- Returns
- Viewport dimensions.
◆ dispatchFrame()
| void correlation::app::Structure3DRenderPipeline::dispatchFrame |
( |
const std::uint8_t * | pixel_data, |
|
|
std::uint32_t | width, |
|
|
std::uint32_t | height ) |
|
private |
◆ initialize()
Initializes the rendering engine and framebuffer with dimensions.
- Parameters
-
| [in] | dimensions | Viewport dimensions in pixels. |
◆ isActive()
| bool correlation::app::Structure3DRenderPipeline::isActive |
( |
| ) |
const |
|
nodiscardnoexcept |
Checks if the pipeline viewport is currently active.
- Returns
- True if active.
◆ isHardwareAccelerated()
| bool correlation::app::Structure3DRenderPipeline::isHardwareAccelerated |
( |
| ) |
const |
|
nodiscardnoexcept |
Checks whether the active rendering backend is GPU-accelerated.
- Returns
- True if hardware-accelerated (e.g. Vulkan GPU), false otherwise.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ renderLoop()
| void correlation::app::Structure3DRenderPipeline::renderLoop |
( |
| ) |
|
|
private |
◆ renderSnapshotOffscreen()
Renders a high-resolution offscreen snapshot without disturbing the live viewport.
- Parameters
-
| [in] | snapshot | Render configuration and scene snapshot. |
| [in] | dims | Target snapshot pixel dimensions. |
| [in] | bg_color | Clear/background color (use a=0 for transparent). |
- Returns
- Contiguous RGBA8 pixel buffer (empty on failure).
◆ requestRender()
| void correlation::app::Structure3DRenderPipeline::requestRender |
( |
bool | immediate = false | ) |
|
Schedules an asynchronous 3D frame redraw with currently stored parameters.
- Parameters
-
| [in] | immediate | If true, signals worker without debounce delay. |
◆ resize()
Resizes the underlying framebuffer and viewport.
- Parameters
-
| [in] | dimensions | New viewport dimensions. |
◆ setActive()
| void correlation::app::Structure3DRenderPipeline::setActive |
( |
bool | active | ) |
|
|
noexcept |
Sets viewport active status.
- Parameters
-
| [in] | active | True if viewport is visible and receiving updates. |
◆ updateSnapshot()
| void correlation::app::Structure3DRenderPipeline::updateSnapshot |
( |
const RenderPipelineSnapshot & | snapshot, |
|
|
bool | immediate = false ) |
Updates active render parameters and triggers an asynchronous frame redraw.
- Parameters
-
| [in] | snapshot | Snapshot bundle containing camera, scene, and feature toggles. |
| [in] | immediate | If true, signals worker without debounce delay. |
◆ alive_
| std::shared_ptr<std::atomic<bool> > correlation::app::Structure3DRenderPipeline::alive_ |
|
private |
◆ callback_
◆ current_snapshot_
◆ cv_
| std::condition_variable correlation::app::Structure3DRenderPipeline::cv_ |
|
private |
◆ engine_
◆ lod_controller_
◆ mutex_
| std::mutex correlation::app::Structure3DRenderPipeline::mutex_ |
|
mutableprivate |
◆ reinit_pending_
| bool correlation::app::Structure3DRenderPipeline::reinit_pending_ {false} |
|
private |
◆ render_pending_
| bool correlation::app::Structure3DRenderPipeline::render_pending_ {false} |
|
private |
◆ render_worker_
| std::jthread correlation::app::Structure3DRenderPipeline::render_worker_ |
|
private |
◆ stop_worker_
| std::atomic<bool> correlation::app::Structure3DRenderPipeline::stop_worker_ {false} |
|
private |
◆ viewport_dims_
The documentation for this class was generated from the following files: