QGIS API Documentation 3.99.0-Master (26c88405ac0)
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
21namespace Qt3DRender
22{
23 class QCamera;
24 class QCameraSelector;
25 class QLayer;
26 class QRenderCapture;
27 class QRenderTarget;
28 class QTexture2D;
29} //namespace Qt3DRender
30
31namespace Qt3DCore
32{
33 class QEntity;
34} //namespace Qt3DCore
35
36#define SIP_NO_FILE
37
51{
52 public:
54 QgsDepthRenderView( const QString &viewName, QSize size, Qt3DRender::QTexture2D *forwardDepthTexture, Qt3DCore::QEntity *rootSceneEntity );
55
57 Qt3DRender::QRenderCapture *renderCapture() { return mDepthRenderCapture; }
58
59 void updateWindowResize( int width, int height ) override;
60
61 private:
62 Qt3DRender::QRenderCapture *mDepthRenderCapture = nullptr;
63 Qt3DRender::QLayer *mLayer = nullptr;
64 Qt3DRender::QTexture2D *mColorTexture = nullptr;
65
66 Qt3DRender::QRenderTarget *buildTextures( QSize size );
67 void buildRenderPass( QSize size, Qt3DRender::QTexture2D *forwardDepthTexture, Qt3DCore::QEntity *rootSceneEntity );
68};
69
70#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.