18#include <Qt3DExtras/QForwardRenderer>
19#include <Qt3DRender/QRenderSettings>
28 mMapCanvas3D = parent;
30 mRoot =
new Qt3DCore::QEntity;
52 mShadowRenderingEnabled = enabled;
70 mSceneRoot->setParent( mRoot );
82 return mMapCanvas3D->
camera();
87 return mMapCanvas3D->size();
99 mMapCanvas3D->setWidth( mSize.width() );
100 mMapCanvas3D->setHeight( mSize.height() );
102 camera()->setAspectRatio(
float( mSize.width() ) /
float( mSize.height() ) );
Qt3DRender::QCamera * camera() const
Returns the default camera of the 3D Window.
void setRootEntity(Qt3DCore::QEntity *root)
Sets the specified root entity of the scene.
void setActiveFrameGraph(Qt3DRender::QFrameGraphNode *activeFrameGraph)
Activates the specified activeFrameGraph.
Qt3DRender::QRenderSettings * renderSettings() const
Returns the render settings of the 3D Window.
void sizeChanged()
Emitted after a call to setSize()
QgsFrameGraph * mFrameGraph
Qt3DRender::QLayer * forwardRenderLayer()
Returns a layer object used to indicate that an entity will be rendered during the forward rendering ...
Qt3DRender::QFrameGraphNode * frameGraphRoot()
Returns the root of the frame graph object.
void setClearColor(const QColor &clearColor)
Sets the clear color of the scene (background color)
void setFrustumCullingEnabled(bool enabled)
Sets whether frustum culling is enabled.
void setShadowRenderingEnabled(bool enabled)
Sets whether the shadow rendering is enabled.
Qt3DRender::QLayer * castShadowsLayer()
Returns a layer object used to indicate that an entity will cast shadows.
void setSize(QSize s)
Sets the size of the buffers used for rendering.
void setRootEntity(Qt3DCore::QEntity *root) override
Sets root entity of the 3D scene.
QgsWindow3DEngine(Qgs3DMapCanvas *parent)
Constructor for QgsWindow3DEngine with the specified parent Qgs3DMapCanvas.
Qt3DRender::QRenderSettings * renderSettings() override
Returns access to the engine's render settings (the frame graph can be accessed from here)
void setSize(QSize s) override
Sets the size of the rendering area (in pixels)
QSize size() const override
Returns size of the engine's rendering area in pixels.
Qt3DCore::QEntity * root() const
Returns the root entity.
Qt3DRender::QCamera * camera() override
Returns pointer to the engine's camera entity.
QSurface * surface() const override
Returns the surface of the engine.
void setShadowRenderingEnabled(bool enabled)
Sets whether shadow rendering is enabled.
void setClearColor(const QColor &color) override
Sets background color of the scene.
QWindow * window()
Returns the internal 3D window where all the rendered output is displayed.
void setFrustumCullingEnabled(bool enabled) override
Sets whether frustum culling is enabled (this should make rendering faster by not rendering entities ...