QgsWindow3DEngine class

3 On-screen 3D engine: it creates OpenGL window (QWindow) and displays rendered 3D scene there.

Contents

The window can be embedded into a QWidget-based application with QWidget::createWindowContainer().

Base classes

class QgsAbstract3DEngine
3 Base class for 3D engine implementation.

Public functions

auto camera() -> Qt3DRender::QCamera* override
Returns pointer to the engine's camera entity.
auto renderSettings() -> Qt3DRender::QRenderSettings* override
Returns access to the engine's render settings (the frame graph can be accessed from here)
void requestCaptureImage() override
Starts a request for an image rendered by the engine.
void setClearColor(const QColor& color) override
Sets background color of the scene.
void setFrustumCullingEnabled(bool enabled) override
Sets whether frustum culling is enabled (this should make rendering faster by not rendering entities outside of camera's view)
void setRootEntity(Qt3DCore::QEntity* root) override
Sets root entity of the 3D scene.
auto size() const -> QSize override
Returns size of the engine's rendering area in pixels.
auto window() -> QWindow*
Returns the internal 3D window where all the rendered output is displayed.

Function documentation

void QgsWindow3DEngine::requestCaptureImage() override

Starts a request for an image rendered by the engine.

The function does not block - when the rendered image is captured, it is returned in imageCaptured() signal. Only one image request can be active at a time.