QGIS API Documentation
4.3.0-Master (8c22baaae17)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
3d
materials
qgsunlitmaterial.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsunlitmaterial.h
3
---------------------
4
begin : June 2026
5
copyright : (C) 2026 by Nyall Dawson
6
email : nyall dot dawson at gmail 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 QGSUNLITMATERIAL_H
17
#define QGSUNLITMATERIAL_H
18
19
#include "
qgis.h
"
20
#include "qgis_3d.h"
21
#include "
qgsmaterial.h
"
22
23
#define SIP_NO_FILE
24
25
class
QMatrix4x4;
26
27
28
namespace
Qt3DRender
29
{
30
class
QParameter;
31
class
QShaderProgram;
32
}
// namespace Qt3DRender
33
34
36
44
class
_3D_EXPORT QgsUnlitMaterial :
public
QgsMaterial
45
{
46
Q_OBJECT
47
48
public
:
52
explicit
QgsUnlitMaterial( Qt3DCore::QNode *parent =
nullptr
);
53
~QgsUnlitMaterial()
override
;
54
60
void
setColor(
const
QColor &color );
61
65
void
setInstancingEnabled(
bool
enabled,
Qgis::InstancedMaterialFlags
flags );
66
72
void
setInstancingMeshTransform(
const
QMatrix4x4 &transform );
73
77
void
setDataDefinedEnabled(
bool
enabled );
78
79
private
:
80
void
init();
81
void
updateShaders();
82
83
Qt3DRender::QShaderProgram *mShaderProgram =
nullptr
;
84
bool
mDataDefinedEnabled =
false
;
85
bool
mInstanced =
false
;
86
Qgis::InstancedMaterialFlags
mInstanceFlags;
87
Qt3DRender::QParameter *mTransformParameter =
nullptr
;
88
Qt3DRender::QParameter *mNormalTransformParameter =
nullptr
;
89
Qt3DRender::QParameter *mColorParameter =
nullptr
;
90
};
91
93
94
#endif
// QGSUNLITMATERIAL_H
Qgis::InstancedMaterialFlags
QFlags< InstancedMaterialFlag > InstancedMaterialFlags
Definition
qgis.h:4488
QgsMaterial
Base class for all materials used within QGIS 3D views.
Definition
qgsmaterial.h:40
Qt3DRender
Definition
qgs3d.h:45
qgis.h
qgsmaterial.h
Generated on
for QGIS API Documentation by
1.17.0