QGIS API Documentation 3.99.0-Master (a8f284845db)
Loading...
Searching...
No Matches
qgsdepthrenderview.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsdepthrenderview.h
3 --------------------------------------
4 Date : June 2024
5 Copyright : (C) 2024 by Benoit De Mezzo and (C) 2020 by Belgacem Nedjima
6 Email : benoit dot de dot mezzo at oslandia dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSDEPTHRENDERVIEW_H
17#define QGSDEPTHRENDERVIEW_H
18
20
21#define SIP_NO_FILE
22
23namespace Qt3DRender
24{
25 class QCamera;
26 class QCameraSelector;
27 class QLayer;
28 class QRenderCapture;
29 class QRenderTarget;
30 class QTexture2D;
31} //namespace Qt3DRender
32
33namespace Qt3DCore
34{
35 class QEntity;
36} //namespace Qt3DCore
37
38
52{
53 public:
55 QgsDepthRenderView( const QString &viewName, QSize size, Qt3DRender::QTexture2D *forwardDepthTexture, Qt3DCore::QEntity *rootSceneEntity );
56
58 Qt3DRender::QRenderCapture *renderCapture() { return mDepthRenderCapture; }
59
60 void updateWindowResize( int width, int height ) override;
61
62 private:
63 Qt3DRender::QRenderCapture *mDepthRenderCapture = nullptr;
64 Qt3DRender::QLayer *mLayer = nullptr;
65 Qt3DRender::QTexture2D *mColorTexture = nullptr;
66
67 Qt3DRender::QRenderTarget *buildTextures( QSize size );
68 void buildRenderPass( QSize size, Qt3DRender::QTexture2D *forwardDepthTexture, Qt3DCore::QEntity *rootSceneEntity );
69};
70
71#endif // QGSDEPTHRENDERVIEW_H
QgsAbstractRenderView(const QString &viewName)
Constructor for QgsAbstractRenderView with the specified parent object.
void updateWindowResize(int width, int height) override
Called when 3D window is resized.
Qt3DRender::QRenderCapture * renderCapture()
Returns the render capture object used to take an image of the depth buffer of the scene.
QgsDepthRenderView(const QString &viewName, QSize size, Qt3DRender::QTexture2D *forwardDepthTexture, Qt3DCore::QEntity *rootSceneEntity)
Constructor.