QGIS API Documentation
4.3.0-Master (52aa6503bed)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
3d
materials
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
28
namespace
Qt3DRender
29
{
30
class
QEffect;
31
}
32
39
class
_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
74
bool
castsShadows
()
const
;
75
82
void
setCastsShadows
(
bool
enabled );
83
84
private
:
86
static
const
QString CLIP_PLANE_ARRAY_PARAMETER_NAME;
88
static
const
QString CLIP_PLANE_MAX_PLANE_PARAMETER_NAME;
90
static
const
QString CLIP_PLANE_DEFINE;
91
92
bool
mClippingEnabled =
false
;
93
bool
mCastsShadows =
true
;
94
95
friend
class
TestQgs3DMaterial
;
96
};
97
98
#endif
// QGSMATERIAL_H
QgsMaterial::enableClipping
void enableClipping(const QList< QVector4D > &clipPlanesEquations)
Adds two uniform parameters to define OpenGL clipping from clipPlanesEquations.
Definition
qgsmaterial.cpp:51
QgsMaterial::disableClipping
void disableClipping()
Removes the uniform parameters used to define OpenGL clipping.
Definition
qgsmaterial.cpp:102
QgsMaterial::castsShadows
bool castsShadows() const
Returns true if the material should cast shadows.
Definition
qgsmaterial.cpp:41
QgsMaterial::setCastsShadows
void setCastsShadows(bool enabled)
Sets whether the material should cast shadows.
Definition
qgsmaterial.cpp:46
QgsMaterial::TestQgs3DMaterial
friend class TestQgs3DMaterial
Definition
qgsmaterial.h:95
QgsMaterial::QgsMaterial
QgsMaterial(Qt3DCore::QNode *parent=nullptr)
Constructor for QgsMaterial, with the specified parent node.
Definition
qgsmaterial.cpp:35
QgsMaterial::~QgsMaterial
~QgsMaterial() override
Qt3DRender
Definition
qgs3d.h:45
Generated on
for QGIS API Documentation by
1.17.0