QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
3d
qgsenvironmentlight.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsenvironmentlight.h
3
--------------------------------------
4
Date : May 2026
5
Copyright : (C) 2026 by Nyall Dawson
6
Email : nyall dot dawson 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 QGSENVIRONMENTLIGHT_H
17
#define QGSENVIRONMENTLIGHT_H
18
19
#include "
qgis.h
"
20
#include "qgis_3d.h"
21
22
#include <QMap>
23
#include <QString>
24
#include <QVector>
25
#include <Qt3DCore/QEntity>
26
27
#define SIP_NO_FILE
28
29
namespace
Qt3DRender
30
{
31
class
QParameter;
32
class
QTextureCubeMap;
33
class
QTexture2D;
34
}
//namespace Qt3DRender
35
36
class
QgsImageTexture
;
37
class
QgsFrameGraph
;
38
45
class
_3D_EXPORT
QgsEnvironmentLight
:
public
Qt3DCore::QEntity
46
{
47
Q_OBJECT
48
49
public
:
51
enum class
Mode
52
{
53
Disabled,
54
SpecularMapWithSphericalHarmonics,
55
};
56
58
QgsEnvironmentLight
(
QgsFrameGraph
*frameGraph, QNode *parent =
nullptr
);
59
63
void
setMode( Mode mode );
64
68
void
setStrength(
float
strength );
69
73
void
setSphericalHarmonics(
const
QVector<QVector3D> &harmonics );
74
78
void
setSpecularMap( Qt3DRender::QTextureCubeMap *specularTexture,
int
mipLevels );
79
80
private
:
81
Qt3DRender::QParameter *mEnvironmentLightModeParam =
nullptr
;
// whether environmental lighting is enabled
82
Qt3DRender::QParameter *mEnvironmentLightStrengthParam =
nullptr
;
// strength of environmental lighting effect
83
Qt3DRender::QParameter *mShParam =
nullptr
;
84
Qt3DRender::QParameter *mSpecularMapParam =
nullptr
;
85
Qt3DRender::QParameter *mMipLevelsParam =
nullptr
;
86
Qt3DRender::QTextureCubeMap *mDummyCubeMap =
nullptr
;
87
};
88
89
90
#endif
// QGSENVIRONMENTLIGHT_H
QgsEnvironmentLight
An environment light entity.
Definition
qgsenvironmentlight.h:46
QgsEnvironmentLight::QgsEnvironmentLight
QgsEnvironmentLight(QgsFrameGraph *frameGraph, QNode *parent=nullptr)
Constructor.
Definition
qgsenvironmentlight.cpp:29
QgsEnvironmentLight::Mode
Mode
Environmental lighting modes.
Definition
qgsenvironmentlight.h:52
QgsFrameGraph
Container class that holds different objects related to frame graphs of 3D scenes.
Definition
qgsframegraph.h:86
QgsImageTexture
Holds an image that can be used as a texture in the 3D view.
Definition
qgsimagetexture.h:37
Qt3DRender
Definition
qgs3d.h:45
qgis.h
Generated on
for QGIS API Documentation by
1.17.0