QGIS API Documentation 4.1.0-Master (3fcefe620d1)
Loading...
Searching...
No Matches
qgshighlightmaterial.h
Go to the documentation of this file.
1/***************************************************************************
2 qgshighlightmaterial.h
3 ---------------------
4 begin : December 2025
5 copyright : (C) 2025 by Stefanos Natsis
6 email : uclaros 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 QGSHIGHLIGHTMATERIAL_H
17#define QGSHIGHLIGHTMATERIAL_H
18
19#include "qgis.h"
20#include "qgis_3d.h"
21#include "qgsmaterial.h"
22
23#define SIP_NO_FILE
24
25class QMatrix4x4;
26
27
28namespace Qt3DRender
29{
30 class QParameter;
31 class QShaderProgram;
32} // namespace Qt3DRender
33
34
36
43class _3D_EXPORT QgsHighlightMaterial : public QgsMaterial
44{
45 Q_OBJECT
46
47 public:
51 explicit QgsHighlightMaterial( Qt3DCore::QNode *parent = nullptr );
52 ~QgsHighlightMaterial() override;
53
54 void setInstancingEnabled( bool enabled, Qgis::InstancedMaterialFlags flags );
55
60 void setInstancingMeshTransform( const QMatrix4x4 &transform );
61
62 private:
63 void init();
64 void updateShaders();
65
66 Qt3DRender::QShaderProgram *mShaderProgram = nullptr;
67 Qgis::MaterialRenderingTechnique mRenderingTechnique;
68 bool mInstanced = false;
69 Qgis::InstancedMaterialFlags mInstanceFlags;
70 Qt3DRender::QParameter *mTransformParameter = nullptr;
71 Qt3DRender::QParameter *mNormalTransformParameter = nullptr;
72};
73
75
76#endif // QGSHIGHLIGHTMATERIAL_H
MaterialRenderingTechnique
Material rendering techniques.
Definition qgis.h:4375
QFlags< InstancedMaterialFlag > InstancedMaterialFlags
Definition qgis.h:4398
Base class for all materials used within QGIS 3D views.
Definition qgsmaterial.h:40