QGIS API Documentation 3.99.0-Master (a8f284845db)
Loading...
Searching...
No Matches
qgsmaterial.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsmaterial.h
3 --------------------------------------
4 Date : July 2024
5 Copyright : (C) 2024 by Jean Felder
6 Email : jean dot felder at oslandia 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 QGSMATERIAL_H
17#define QGSMATERIAL_H
18
19
20#include "qgis_3d.h"
21
22#include <QList>
23#include <QVector4D>
24#include <Qt3DRender/QMaterial>
25
26#define SIP_NO_FILE
27
28namespace Qt3DRender
29{
30 class QEffect;
31}
32
39class _3D_EXPORT QgsMaterial : public Qt3DRender::QMaterial
40{
41 Q_OBJECT
42 public:
46 explicit QgsMaterial( Qt3DCore::QNode *parent = nullptr );
47 ~QgsMaterial() override;
48
55 void enableClipping( const QList<QVector4D> &clipPlanesEquations );
56
64 void disableClipping();
65
66 private:
68 static const QString CLIP_PLANE_ARRAY_PARAMETER_NAME;
70 static const QString CLIP_PLANE_MAX_PLANE_PARAMETER_NAME;
72 static const QString CLIP_PLANE_DEFINE;
73
74 bool mClippingEnabled = false;
75
76 friend class TestQgs3DMaterial;
77};
78
79#endif // QGSMATERIAL_H
void enableClipping(const QList< QVector4D > &clipPlanesEquations)
Adds two uniform parameters to define OpenGL clipping from clipPlanesEquations.
void disableClipping()
Removes the uniform parameters used to define OpenGL clipping.
friend class TestQgs3DMaterial
Definition qgsmaterial.h:76
QgsMaterial(Qt3DCore::QNode *parent=nullptr)
Constructor for QgsMaterial, with the specified parent node.
~QgsMaterial() override