QgsOffscreen3DEngine class
3 Off-screen 3D engine implementation.
Contents
- Reference
It is useful for recording rendered 3D scenes of arbitrary size.
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.
- void setSize(QSize s)
- Sets the size of the rendering area (in pixels)
- auto size() const -> QSize override
- Returns size of the engine's rendering area in pixels.
Function documentation
void QgsOffscreen3DEngine:: 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.