QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
qgspreviewquad.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgspreviewquad.h
3  --------------------------------------
4  Date : August 2020
5  Copyright : (C) 2020 by Belgacem Nedjima
6  Email : gb underscore nedjima at esi dot dz
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 QGSPREVIEWQUAD_H
17 #define QGSPREVIEWQUAD_H
18 
19 #include <Qt3DCore/QEntity>
20 #include <Qt3DRender/QMaterial>
21 #include <Qt3DRender/QParameter>
22 #include <Qt3DRender/QEffect>
23 
24 #define SIP_NO_FILE
25 
33 class QgsPreviewQuadMaterial : public Qt3DRender::QMaterial
34 {
35  public:
37  QgsPreviewQuadMaterial( Qt3DRender::QAbstractTexture *texture, const QMatrix4x4 &modelMatrix, QVector<Qt3DRender::QParameter *> additionalShaderParameters = QVector<Qt3DRender::QParameter *>(), QNode *parent = nullptr );
38  private:
39  Qt3DRender::QEffect *mEffect = nullptr;
40  Qt3DRender::QParameter *mTextureParameter = nullptr;
41  Qt3DRender::QParameter *mTextureTransformParameter = nullptr;
42 };
43 
51 class QgsPreviewQuad : public Qt3DCore::QEntity
52 {
53  public:
54 
64  QgsPreviewQuad( Qt3DRender::QAbstractTexture *texture, const QPointF &centerNDC, const QSizeF &size, QVector<Qt3DRender::QParameter *> additionalShaderParameters = QVector<Qt3DRender::QParameter *>(), Qt3DCore::QEntity *parent = nullptr );
65  private:
66  QgsPreviewQuadMaterial *mMaterial = nullptr;
67 };
68 
69 #endif // QGSPREVIEWQUAD_H
QgsPreviewQuad::QgsPreviewQuad
QgsPreviewQuad(Qt3DRender::QAbstractTexture *texture, const QPointF &centerNDC, const QSizeF &size, QVector< Qt3DRender::QParameter * > additionalShaderParameters=QVector< Qt3DRender::QParameter * >(), Qt3DCore::QEntity *parent=nullptr)
Construct an object that displays a texture for debugging purposes (example: depth buffer)
Definition: qgspreviewquad.cpp:28
QgsPreviewQuadMaterial
3 Material component for QgsPreviewQuad object
Definition: qgspreviewquad.h:34
QgsPreviewQuadMaterial::QgsPreviewQuadMaterial
QgsPreviewQuadMaterial(Qt3DRender::QAbstractTexture *texture, const QMatrix4x4 &modelMatrix, QVector< Qt3DRender::QParameter * > additionalShaderParameters=QVector< Qt3DRender::QParameter * >(), QNode *parent=nullptr)
Constructor.
Definition: qgspreviewquad.cpp:74
QgsPreviewQuad
3 Rectangular quad entity used for debugging depth maps
Definition: qgspreviewquad.h:52