QGIS API Documentation
3.28.0-Firenze (ed3ad0430f)
src
3d
qgsambientocclusionsettings.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsambientocclusionsettings.h
3
--------------------------------------
4
Date : June 2022
5
Copyright : (C) 2022 by Belgacem Nedjima
6
Email : belgacem dot nedjima 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 QGSAMBIENTOCCLUSIONSETTINGS_H
17
#define QGSAMBIENTOCCLUSIONSETTINGS_H
18
19
#include <QString>
20
#include <QMap>
21
22
#include "qgis_3d.h"
23
24
class
QgsReadWriteContext
;
25
class
QDomElement;
26
27
#define SIP_NO_FILE
28
35
class
_3D_EXPORT
QgsAmbientOcclusionSettings
36
{
37
public
:
39
QgsAmbientOcclusionSettings
() =
default
;
41
QgsAmbientOcclusionSettings
(
const
QgsAmbientOcclusionSettings
&other );
43
QgsAmbientOcclusionSettings
&operator=(
QgsAmbientOcclusionSettings
const
&rhs );
44
46
void
readXml(
const
QDomElement &element,
const
QgsReadWriteContext
&context );
48
void
writeXml( QDomElement &element,
const
QgsReadWriteContext
&context )
const
;
49
51
void
setEnabled
(
bool
enabled ) { mEnabled = enabled; }
52
54
bool
isEnabled
()
const
{
return
mEnabled; }
55
57
void
setIntensity
(
float
factor ) { mIntensity = factor; }
58
60
float
intensity
()
const
{
return
mIntensity; }
61
63
void
setRadius
(
float
radius ) { mRadius = radius; }
64
66
float
radius
()
const
{
return
mRadius; }
67
69
void
setThreshold
(
float
threshold ) { mThreshold = threshold; }
70
72
float
threshold
()
const
{
return
mThreshold; }
73
74
private
:
75
bool
mEnabled =
false
;
76
float
mIntensity = 0.5f;
77
float
mRadius = 25.0f;
78
float
mThreshold = 0.5f;
79
};
80
81
#endif
// QGSAMBIENTOCCLUSIONSETTINGS_H
QgsAmbientOcclusionSettings
class containing the configuration of ambient occlusion rendering 3
Definition:
qgsambientocclusionsettings.h:36
QgsAmbientOcclusionSettings::radius
float radius() const
Returns the radius parameter of the ambient occlusion effect.
Definition:
qgsambientocclusionsettings.h:66
QgsAmbientOcclusionSettings::setRadius
void setRadius(float radius)
Sets the radius parameter of the ambient occlusion effect.
Definition:
qgsambientocclusionsettings.h:63
QgsAmbientOcclusionSettings::isEnabled
bool isEnabled() const
Returns whether ambient occlusion effect is enabled.
Definition:
qgsambientocclusionsettings.h:54
QgsAmbientOcclusionSettings::intensity
float intensity() const
Returns the shading factor of the ambient occlusion effect.
Definition:
qgsambientocclusionsettings.h:60
QgsAmbientOcclusionSettings::setEnabled
void setEnabled(bool enabled)
Sets whether ambient occlusion effect is enabled.
Definition:
qgsambientocclusionsettings.h:51
QgsAmbientOcclusionSettings::setIntensity
void setIntensity(float factor)
Sets the shading factor of the ambient occlusion effect.
Definition:
qgsambientocclusionsettings.h:57
QgsAmbientOcclusionSettings::setThreshold
void setThreshold(float threshold)
Sets at what amount of occlusion the effect will kick in.
Definition:
qgsambientocclusionsettings.h:69
QgsAmbientOcclusionSettings::threshold
float threshold() const
Returns at what amount of occlusion the effect will kick in.
Definition:
qgsambientocclusionsettings.h:72
QgsAmbientOcclusionSettings::QgsAmbientOcclusionSettings
QgsAmbientOcclusionSettings()=default
Default constructor.
QgsReadWriteContext
The class is used as a container of context for various read/write operations on other objects.
Definition:
qgsreadwritecontext.h:35
Generated on Sat Oct 22 2022 16:10:47 for QGIS API Documentation by
1.9.4