QGIS API Documentation
4.3.0-Master (52aa6503bed)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
3d
qgscolorramptexture.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgscolorramptexture.h
3
-------------------------
4
begin : january 2020
5
copyright : (C) 2020 by Vincent Cloarec
6
email : vcloarec at gmail dot com
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
18
#ifndef QGSCOLORRAMPTEXTURE_H
19
#define QGSCOLORRAMPTEXTURE_H
20
22
23
#include "
qgscolorrampshader.h
"
24
25
#include <QByteArray>
26
#include <QUrl>
27
#include <QVector2D>
28
#include <QVector3D>
29
#include <QVector4D>
30
#include <Qt3DRender/QEffect>
31
#include <Qt3DRender/QGraphicsApiFilter>
32
#include <Qt3DRender/QParameter>
33
#include <Qt3DRender/QTexture>
34
35
#define SIP_NO_FILE
36
37
class
QgsColorRampTextureGenerator :
public
Qt3DRender::QTextureImageDataGenerator
38
{
39
public
:
40
QgsColorRampTextureGenerator(
const
QgsColorRampShader &colorRampShader,
double
verticalScale = 1 );
41
42
public
:
43
Qt3DRender::QTextureImageDataPtr operator()()
override
;
44
45
qintptr id()
const override
{
return
reinterpret_cast<
qintptr
>
( &Qt3DCore::FunctorType<QgsColorRampTextureGenerator>::id ); }
46
47
bool
operator==
(
const
Qt3DRender::QTextureImageDataGenerator &other )
const override
;
48
49
private
:
50
QgsColorRampShader mColorRampShader;
51
double
mVerticalScale = 1;
52
};
53
54
55
class
QgsColorRampTexture :
public
Qt3DRender::QAbstractTextureImage
56
{
57
Q_OBJECT
58
59
public
:
60
QgsColorRampTexture(
const
QgsColorRampShader &colorRampShader,
double
verticalScale = 1, Qt3DCore::QNode *parent =
nullptr
);
61
// QAbstractTextureImage interface
62
protected
:
63
Qt3DRender::QTextureImageDataGeneratorPtr dataGenerator()
const override
;
64
65
private
:
66
QgsColorRampShader mColorRampShader;
67
double
mVerticalScale = 1;
68
};
69
71
72
#endif
// QGSCOLORRAMPTEXTURE_H
qgscolorrampshader.h
operator==
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
Definition
qgsfeatureiterator.h:427
Generated on
for QGIS API Documentation by
1.17.0