QGIS API Documentation 4.1.0-Master (9af12b5a203)
Loading...
Searching...
No Matches
QgsMaterial Class Reference

Base class for all materials used within QGIS 3D views. More...

#include <qgsmaterial.h>

Inheritance diagram for QgsMaterial:

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

Detailed Description

Base class for all materials used within QGIS 3D views.

It provides common functionality (such as clipping) that all materials should support (where applicable).

Since
QGIS 3.40

Definition at line 39 of file qgsmaterial.h.

Constructor & Destructor Documentation

◆ QgsMaterial()

QgsMaterial::QgsMaterial ( Qt3DCore::QNode * parent = nullptr)
explicit

Constructor for QgsMaterial, with the specified parent node.

Definition at line 35 of file qgsmaterial.cpp.

◆ ~QgsMaterial()

QgsMaterial::~QgsMaterial ( )
overridedefault

Member Function Documentation

◆ castsShadows()

bool QgsMaterial::castsShadows ( ) const

Returns true if the material should cast shadows.

By default QgsMaterials casts shadows.

See also
setCastsShadows()
Since
QGIS 4.2

Definition at line 41 of file qgsmaterial.cpp.

◆ disableClipping()

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.

Since
QGIS 3.40

Definition at line 102 of file qgsmaterial.cpp.

◆ enableClipping()

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.

Since
QGIS 3.40

Definition at line 51 of file qgsmaterial.cpp.

◆ setCastsShadows()

void QgsMaterial::setCastsShadows ( bool enabled)

Sets whether the material should cast shadows.

See also
castsShadows()
Since
QGIS 4.2

Definition at line 46 of file qgsmaterial.cpp.

◆ TestQgs3DMaterial

friend class TestQgs3DMaterial
friend

Definition at line 95 of file qgsmaterial.h.


The documentation for this class was generated from the following files: