QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
#include <qgspointlightsettings.h>
Public Member Functions | |
QgsPointLightSettings ()=default | |
Construct a point light with default values. More... | |
QColor | color () const |
Returns color of the light. More... | |
float | constantAttenuation () const |
Returns constant attenuation (A_0) 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) |
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... | |
QDomElement | writeXml (QDomDocument &doc) const |
Writes configuration to a new DOM element and returns it. 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 38 of file qgspointlightsettings.h.
|
default |
Construct a point light with default values.
|
inline |
Returns color of the light.
Definition at line 50 of file qgspointlightsettings.h.
|
inline |
Returns constant attenuation (A_0)
Definition at line 60 of file qgspointlightsettings.h.
|
inline |
Returns intensity of the light.
Definition at line 55 of file qgspointlightsettings.h.
|
inline |
Returns linear attenuation (A_1)
Definition at line 65 of file qgspointlightsettings.h.
bool QgsPointLightSettings::operator== | ( | const QgsPointLightSettings & | other | ) |
Definition at line 49 of file qgspointlightsettings.cpp.
|
inline |
Returns position of the light (in 3D world coordinates)
Definition at line 45 of file qgspointlightsettings.h.
|
inline |
Returns quadratic attenuation (A_2)
Definition at line 70 of file qgspointlightsettings.h.
void QgsPointLightSettings::readXml | ( | const QDomElement & | elem | ) |
Reads configuration from a DOM element previously written using writeXml()
Definition at line 37 of file qgspointlightsettings.cpp.
|
inline |
Sets color of the light.
Definition at line 52 of file qgspointlightsettings.h.
|
inline |
Sets constant attenuation (A_0)
Definition at line 62 of file qgspointlightsettings.h.
|
inline |
Sets intensity of the light.
Definition at line 57 of file qgspointlightsettings.h.
|
inline |
Sets linear attenuation (A_1)
Definition at line 67 of file qgspointlightsettings.h.
|
inline |
Sets position of the light (in 3D world coordinates)
Definition at line 47 of file qgspointlightsettings.h.
|
inline |
Sets quadratic attenuation (A_2)
Definition at line 72 of file qgspointlightsettings.h.
QDomElement QgsPointLightSettings::writeXml | ( | QDomDocument & | doc | ) | const |
Writes configuration to a new DOM element and returns it.
Definition at line 23 of file qgspointlightsettings.cpp.