QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
18 #include <Qt3DRender/QRenderCapture>
19 #include <Qt3DExtras/Qt3DWindow>
20 #include <Qt3DExtras/QForwardRenderer>
21 #include <Qt3DRender/QRenderSettings>
28 mWindow3D =
new Qt3DExtras::Qt3DWindow;
30 mRoot =
new Qt3DCore::QEntity;
31 mWindow3D->setRootEntity( mRoot );
35 mWindow3D->setActiveFrameGraph( mShadowRenderingFrameGraph->
getFrameGraphRoot() );
48 Qt3DRender::QRenderCaptureReply *captureReply;
49 captureReply = mShadowRenderingFrameGraph->
renderCapture()->requestCapture();
50 connect( captureReply, &Qt3DRender::QRenderCaptureReply::completed,
this, [ = ]
53 captureReply->deleteLater();
59 mShadowRenderingEnabled = enabled;
77 mSceneRoot->setParent( mRoot );
84 return mWindow3D->renderSettings();
89 return mWindow3D->camera();
94 return mWindow3D->size();
QgsWindow3DEngine(QObject *parent=nullptr)
Constructor for QgsWindow3DEngine with the specified parent object.
Qt3DRender::QLayer * castShadowsLayer()
Returns a layer object used to indicate that an entity will cast shadows.
void setFrustumCullingEnabled(bool enabled) override
Sets whether frustum culling is enabled (this should make rendering faster by not rendering entities ...
void requestCaptureImage() override
Starts a request for an image rendered by the engine.
QWindow * window()
Returns the internal 3D window where all the rendered output is displayed.
void imageCaptured(const QImage &image)
Emitted after a call to requestCaptureImage() to return the captured image.
Qt3DRender::QRenderSettings * renderSettings() override
Returns access to the engine's render settings (the frame graph can be accessed from here)
3 Container class that holds different objects related to shadow rendering
void setRootEntity(Qt3DCore::QEntity *root) override
Sets root entity of the 3D scene.
Qt3DRender::QLayer * forwardRenderLayer()
Returns a layer object used to indicate that an entity will be rendered during the forward rendering ...
Qt3DRender::QRenderCapture * renderCapture()
Returns the render capture object used to take an image of the scene.
3 Base class for 3D engine implementation.
QSurface * surface() const override
Returns the surface of the engine.
QSize size() const override
Returns size of the engine's rendering area in pixels.
void setFrustumCullingEnabled(bool enabled)
Sets whether frustum culling is enabled.
Qt3DRender::QCamera * camera() override
Returns pointer to the engine's camera entity.
Qt3DRender::QFrameGraphNode * getFrameGraphRoot()
Returns the root of the frame graph object.
void setShadowRenderingEnabled(bool enabled)
Sets whether shadow rendering is enabled.
void setClearColor(const QColor &clearColor)
Sets the clear color of the scene (background color)
void setShadowRenderingEnabled(bool enabled)
Sets whether the shadow rendering is enabled.
void setClearColor(const QColor &color) override
Sets background color of the scene.