QGIS API Documentation
3.43.0-Master (c67cf405802)
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
f
g
h
i
l
m
n
o
p
q
r
s
t
w
Functions
a
b
c
d
f
g
h
i
l
m
n
o
p
r
s
t
w
Variables
Typedefs
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
2
3
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
2
3
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
o
p
r
s
t
u
v
w
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Related Symbols
3
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
Files
File List
File Members
All
3
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
Variables
a
b
c
e
f
g
h
i
l
n
o
p
q
r
s
t
w
Typedefs
3
a
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
Enumerator
Macros
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
w
y
Loading...
Searching...
No Matches
src
3d
lights
qgsdirectionallightsettings.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsdirectionallightsettings.h
3
--------------------------------------
4
Date : June 2020
5
Copyright : (C) 2020 by Belgacem Nedjima
6
Email : gb underscore nedjima at esi dot dz
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 QGSDIRECTIONALLIGHTSETTINGS_H
17
#define QGSDIRECTIONALLIGHTSETTINGS_H
18
#include "qgis_3d.h"
19
20
#include "
qgsvector3d.h
"
21
#include "
qgslightsource.h
"
22
#include <QColor>
23
24
class
QDomDocument;
25
class
QDomElement;
26
33
class
_3D_EXPORT
QgsDirectionalLightSettings
:
public
QgsLightSource
34
{
35
public
:
37
QgsDirectionalLightSettings
() =
default
;
38
39
Qgis::LightSourceType
type
()
const override
;
40
QgsDirectionalLightSettings
*
clone
() const override
SIP_FACTORY
;
41
Qt3DCore
::QEntity *createEntity( const
Qgs3DMapSettings
&map,
Qt3DCore
::QEntity *parent ) const override
SIP_SKIP
;
42
QDomElement writeXml( QDomDocument &doc, const
QgsReadWriteContext
&context =
QgsReadWriteContext
() ) const override;
43
void
readXml( const QDomElement &elem, const
QgsReadWriteContext
&context =
QgsReadWriteContext
() ) override;
44
46
QgsVector3D
direction()
const
{
return
mDirection; }
48
void
setDirection
(
const
QgsVector3D
&direction ) { mDirection = direction; }
49
51
QColor
color
()
const
{
return
mColor; }
53
void
setColor
(
const
QColor &color ) { mColor = color; }
54
56
float
intensity
()
const
{
return
mIntensity; }
58
void
setIntensity
(
float
intensity ) { mIntensity = intensity; }
59
60
// TODO c++20 - replace with = default
61
bool
operator==
(
const
QgsDirectionalLightSettings
&other );
62
63
private
:
64
QgsVector3D
mDirection { -0.32, 0.27, -0.91 };
65
QColor mColor = Qt::white;
66
float
mIntensity = 1.0;
67
};
33
class
_3D_EXPORT
QgsDirectionalLightSettings
:
public
QgsLightSource
{
…
};
68
69
#endif
// QGSDIRECTIONALLIGHTSETTINGS_H
Qgis::LightSourceType
LightSourceType
Light source types for 3D scenes.
Definition
qgis.h:3994
Qgs3DMapSettings
Definition of the world.
Definition
qgs3dmapsettings.h:56
QgsDirectionalLightSettings
Definition of a directional light in a 3D map scene.
Definition
qgsdirectionallightsettings.h:34
QgsDirectionalLightSettings::setColor
void setColor(const QColor &color)
Sets color of the light.
Definition
qgsdirectionallightsettings.h:53
QgsDirectionalLightSettings::intensity
float intensity() const
Returns intensity of the light.
Definition
qgsdirectionallightsettings.h:56
QgsDirectionalLightSettings::color
QColor color() const
Returns color of the light.
Definition
qgsdirectionallightsettings.h:51
QgsDirectionalLightSettings::setDirection
void setDirection(const QgsVector3D &direction)
Sets the direction of the light in degrees.
Definition
qgsdirectionallightsettings.h:48
QgsDirectionalLightSettings::QgsDirectionalLightSettings
QgsDirectionalLightSettings()=default
Construct a directional light with default values.
QgsDirectionalLightSettings::setIntensity
void setIntensity(float intensity)
Sets intensity of the light.
Definition
qgsdirectionallightsettings.h:58
QgsLightSource
Base class for light sources in 3d scenes.
Definition
qgslightsource.h:47
QgsLightSource::type
virtual Qgis::LightSourceType type() const =0
Returns the light source type.
QgsLightSource::clone
virtual QgsLightSource * clone() const =0
Returns a copy of the light source.
QgsReadWriteContext
A container for the context for various read/write operations on objects.
Definition
qgsreadwritecontext.h:34
QgsVector3D
A 3D vector (similar to QVector3D) with the difference that it uses double precision instead of singl...
Definition
qgsvector3d.h:30
Qt3DCore
Definition
qgsabstract3drenderer.h:31
SIP_SKIP
#define SIP_SKIP
Definition
qgis_sip.h:126
SIP_FACTORY
#define SIP_FACTORY
Definition
qgis_sip.h:76
operator==
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
Definition
qgsfeatureiterator.h:433
qgslightsource.h
qgsvector3d.h
Generated on Tue Apr 8 2025 15:57:40 for QGIS API Documentation by
1.9.8