|
QGIS API Documentation 4.1.0-Master (9af12b5a203)
|
Base class for all materials used within QGIS 3D views. More...
#include <qgsmaterial.h>

Public Member Functions | |
| QgsMaterial (Qt3DCore::QNode *parent=nullptr) | |
| Constructor for QgsMaterial, with the specified parent node. | |
| ~QgsMaterial () override | |
| bool | castsShadows () const |
Returns true if the material should cast shadows. | |
| void | disableClipping () |
| Removes the uniform parameters used to define OpenGL clipping. | |
| void | enableClipping (const QList< QVector4D > &clipPlanesEquations) |
| Adds two uniform parameters to define OpenGL clipping from clipPlanesEquations. | |
| void | setCastsShadows (bool enabled) |
| Sets whether the material should cast shadows. | |
Friends | |
| class | TestQgs3DMaterial |
Base class for all materials used within QGIS 3D views.
It provides common functionality (such as clipping) that all materials should support (where applicable).
Definition at line 39 of file qgsmaterial.h.
|
explicit |
Constructor for QgsMaterial, with the specified parent node.
Definition at line 35 of file qgsmaterial.cpp.
|
overridedefault |
| bool QgsMaterial::castsShadows | ( | ) | const |
Returns true if the material should cast shadows.
By default QgsMaterials casts shadows.
Definition at line 41 of file qgsmaterial.cpp.
| void QgsMaterial::disableClipping | ( | ) |
Removes the uniform parameters used to define OpenGL clipping.
It also removes the define macro used for clipping from vertex/geometry shaders. If clipping was not enabled, nothing happens.
Definition at line 102 of file qgsmaterial.cpp.
| void QgsMaterial::enableClipping | ( | const QList< QVector4D > & | clipPlanesEquations | ) |
Adds two uniform parameters to define OpenGL clipping from clipPlanesEquations.
It also adds a define macro appropriate to vertex/geometry shaders.
Definition at line 51 of file qgsmaterial.cpp.
| void QgsMaterial::setCastsShadows | ( | bool | enabled | ) |
Sets whether the material should cast shadows.
Definition at line 46 of file qgsmaterial.cpp.
|
friend |
Definition at line 95 of file qgsmaterial.h.