16 #ifndef QGSPOINTLIGHTSETTINGS_H 17 #define QGSPOINTLIGHTSETTINGS_H 48 QColor
color()
const {
return mColor; }
73 QDomElement
writeXml( QDomDocument &doc )
const;
75 void readXml(
const QDomElement &elem );
81 QColor mColor = Qt::white;
82 float mIntensity = 0.5;
83 float mConstantAttenuation = 1.0f;
84 float mLinearAttenuation = 0.0f;
85 float mQuadraticAttenuation = 0.0f;
88 #endif // QGSPOINTLIGHTSETTINGS_H 3 Class for storage of 3D vectors similar to QVector3D, with the difference that it uses double preci...
float quadraticAttenuation() const
Returns quadratic attenuation (A_2)
void setLinearAttenuation(float value)
Sets linear attenuation (A_1)
QColor color() const
Returns color of the light.
QgsVector3D position() const
Returns position of the light (in 3D world coordinates)
float constantAttenuation() const
Returns constant attenuation (A_0)
QgsPointLightSettings()=default
Construct a point light with default values.
3 Definition of a point light in a 3D map scene
void setConstantAttenuation(float value)
Sets constant attenuation (A_0)
QDomElement writeXml(QDomDocument &doc) const
Writes configuration to a new DOM element and returns it.
void setQuadraticAttenuation(float value)
Sets quadratic attenuation (A_2)
float intensity() const
Returns intensity of the light.
void setPosition(const QgsVector3D &pos)
Sets position of the light (in 3D world coordinates)
bool operator==(const QgsPointLightSettings &other)
void setColor(const QColor &color)
Sets color of the light.
float linearAttenuation() const
Returns linear attenuation (A_1)
void setIntensity(float intensity)
Sets intensity of the light.
void readXml(const QDomElement &elem)
Reads configuration from a DOM element previously written using writeXml()