QGIS API Documentation
3.41.0-Master (fda2aa46e9a)
Loading...
Searching...
No Matches
src
3d
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
Q_OBJECT
36
37
public
:
39
QgsPreviewQuadMaterial
( Qt3DRender::QAbstractTexture *texture, QVector<Qt3DRender::QParameter *> additionalShaderParameters = QVector<Qt3DRender::QParameter *>(), QNode *parent =
nullptr
);
40
42
void
setViewPort
( QVector2D centerTexCoords, QVector2D sizeTexCoords );
43
private
:
44
Qt3DRender::QEffect *mEffect =
nullptr
;
45
Qt3DRender::QParameter *mTextureParameter =
nullptr
;
46
Qt3DRender::QParameter *mCenterTextureCoords =
nullptr
;
47
Qt3DRender::QParameter *mSizeTextureCoords =
nullptr
;
48
49
};
50
58
class
QgsPreviewQuad
:
public
Qt3DCore::QEntity
59
{
60
Q_OBJECT
61
62
public
:
63
73
QgsPreviewQuad
( Qt3DRender::QAbstractTexture *texture,
const
QPointF ¢erNDC,
const
QSizeF &size, QVector<Qt3DRender::QParameter *> additionalShaderParameters = QVector<Qt3DRender::QParameter *>(), Qt3DCore::QEntity *parent =
nullptr
);
74
76
void
setViewPort
(
const
QPointF ¢erNDC,
const
QSizeF &size );
77
private
:
78
QgsPreviewQuadMaterial
*mMaterial =
nullptr
;
79
};
80
81
#endif
// QGSPREVIEWQUAD_H
QgsPreviewQuadMaterial
3
Definition
qgspreviewquad.h:34
QgsPreviewQuadMaterial::setViewPort
void setViewPort(QVector2D centerTexCoords, QVector2D sizeTexCoords)
Sets the view port of the quad.
Definition
qgspreviewquad.cpp:121
QgsPreviewQuad
3
Definition
qgspreviewquad.h:59
QgsPreviewQuad::setViewPort
void setViewPort(const QPointF ¢erNDC, const QSizeF &size)
Sets where the quad will be located on the scene.
Definition
qgspreviewquad.cpp:82
Generated on Sun Nov 10 2024 14:15:43 for QGIS API Documentation by
1.9.8