QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
|
3 More...
#include <qgspointlightsettings.h>
Public Member Functions | |
QgsPointLightSettings ()=default | |
Construct a point light with default values. More... | |
QgsPointLightSettings * | clone () const override |
Returns a copy of the light source. More... | |
QColor | color () const |
Returns color of the light. More... | |
float | constantAttenuation () const |
Returns constant attenuation (A_0) More... | |
Qt3DCore::QEntity * | createEntity (const Qgs3DMapSettings &map, Qt3DCore::QEntity *parent) const override |
Creates an entity representing the light source. More... | |
float | intensity () const |
Returns intensity of the light. More... | |
float | linearAttenuation () const |
Returns linear attenuation (A_1) More... | |
bool | operator== (const QgsPointLightSettings &other) |
QgsVector3D | position () const |
Returns position of the light (in 3D world coordinates) More... | |
float | quadraticAttenuation () const |
Returns quadratic attenuation (A_2) More... | |
void | readXml (const QDomElement &elem, const QgsReadWriteContext &context=QgsReadWriteContext()) override |
Reads configuration from a DOM element previously written using writeXml(). More... | |
void | setColor (const QColor &color) |
Sets color of the light. More... | |
void | setConstantAttenuation (float value) |
Sets constant attenuation (A_0) More... | |
void | setIntensity (float intensity) |
Sets intensity of the light. More... | |
void | setLinearAttenuation (float value) |
Sets linear attenuation (A_1) More... | |
void | setPosition (const QgsVector3D &pos) |
Sets position of the light (in 3D world coordinates) More... | |
void | setQuadraticAttenuation (float value) |
Sets quadratic attenuation (A_2) More... | |
Qgis::LightSourceType | type () const override |
Returns the light source type. More... | |
QDomElement | writeXml (QDomDocument &doc, const QgsReadWriteContext &context=QgsReadWriteContext()) const override |
Writes the light source's configuration to a new DOM element and returns it. More... | |
Public Member Functions inherited from QgsLightSource | |
virtual | ~QgsLightSource () |
virtual QgsLightSource * | clone () const =0 |
Returns a copy of the light source. More... | |
virtual Qt3DCore::QEntity * | createEntity (const Qgs3DMapSettings &map, Qt3DCore::QEntity *parent) const =0 |
Creates an entity representing the light source. More... | |
virtual void | readXml (const QDomElement &elem, const QgsReadWriteContext &context=QgsReadWriteContext())=0 |
Reads configuration from a DOM element previously written using writeXml(). More... | |
virtual void | resolveReferences (const QgsProject &project) |
After reading from XML, resolve references to any layers that have been read as layer IDs. More... | |
virtual Qgis::LightSourceType | type () const =0 |
Returns the light source type. More... | |
virtual QDomElement | writeXml (QDomDocument &doc, const QgsReadWriteContext &context=QgsReadWriteContext()) const =0 |
Writes the light source's configuration to a new DOM element and returns it. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from QgsLightSource | |
static QgsLightSource * | createFromXml (const QDomElement &element, const QgsReadWriteContext &context) |
Creates a new light source from an XML element. More... | |
3
Definition of a point light in a 3D map scene
Total light at the distance D from a point light with intensity I is (I / TA) where TA is total attenuation which is calculated as (A_0 + A_1 * D + A_2 * D^2). The terms A_0, A_1 and A_2 stand for constant, linear and quadratic attenuation.
Definition at line 39 of file qgspointlightsettings.h.
|
default |
Construct a point light with default values.
|
overridevirtual |
Returns a copy of the light source.
Implements QgsLightSource.
Definition at line 32 of file qgspointlightsettings.cpp.
|
inline |
Returns color of the light.
Definition at line 57 of file qgspointlightsettings.h.
|
inline |
Returns constant attenuation (A_0)
Definition at line 67 of file qgspointlightsettings.h.
|
overridevirtual |
Creates an entity representing the light source.
Implements QgsLightSource.
Definition at line 37 of file qgspointlightsettings.cpp.
|
inline |
Returns intensity of the light.
Definition at line 62 of file qgspointlightsettings.h.
|
inline |
Returns linear attenuation (A_1)
Definition at line 72 of file qgspointlightsettings.h.
bool QgsPointLightSettings::operator== | ( | const QgsPointLightSettings & | other | ) |
Definition at line 113 of file qgspointlightsettings.cpp.
|
inline |
Returns position of the light (in 3D world coordinates)
Definition at line 52 of file qgspointlightsettings.h.
|
inline |
Returns quadratic attenuation (A_2)
Definition at line 77 of file qgspointlightsettings.h.
|
overridevirtual |
Reads configuration from a DOM element previously written using writeXml().
Implements QgsLightSource.
Definition at line 101 of file qgspointlightsettings.cpp.
|
inline |
Sets color of the light.
Definition at line 59 of file qgspointlightsettings.h.
|
inline |
Sets constant attenuation (A_0)
Definition at line 69 of file qgspointlightsettings.h.
|
inline |
Sets intensity of the light.
Definition at line 64 of file qgspointlightsettings.h.
|
inline |
Sets linear attenuation (A_1)
Definition at line 74 of file qgspointlightsettings.h.
|
inline |
Sets position of the light (in 3D world coordinates)
Definition at line 54 of file qgspointlightsettings.h.
|
inline |
Sets quadratic attenuation (A_2)
Definition at line 79 of file qgspointlightsettings.h.
|
overridevirtual |
Returns the light source type.
Implements QgsLightSource.
Definition at line 27 of file qgspointlightsettings.cpp.
|
overridevirtual |
Writes the light source's configuration to a new DOM element and returns it.
Implements QgsLightSource.
Definition at line 87 of file qgspointlightsettings.cpp.