QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
16 #ifndef QGSPOINTLIGHTSETTINGS_H
17 #define QGSPOINTLIGHTSETTINGS_H
57 QColor
color()
const {
return mColor; }
59 void setColor(
const QColor &color ) { mColor = color; }
86 QColor mColor = Qt::white;
87 float mIntensity = 1.0;
88 float mConstantAttenuation = 1.0f;
89 float mLinearAttenuation = 0.0f;
90 float mQuadraticAttenuation = 0.0f;
93 #endif // QGSPOINTLIGHTSETTINGS_H
float constantAttenuation() const
Returns constant attenuation (A_0)
void setIntensity(float intensity)
Sets intensity of the light.
QgsVector3D position() const
Returns position of the light (in 3D world coordinates)
The class is used as a container of context for various read/write operations on other objects.
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
Class for storage of 3D vectors similar to QVector3D, with the difference that it uses double precisi...
void setPosition(const QgsVector3D &pos)
Sets position of the light (in 3D world coordinates)
QColor color() const
Returns color of the light.
virtual Qt3DCore::QEntity * createEntity(const Qgs3DMapSettings &map, Qt3DCore::QEntity *parent) const =0
Creates an entity representing the light source.
void setQuadraticAttenuation(float value)
Sets quadratic attenuation (A_2)
virtual void readXml(const QDomElement &elem, const QgsReadWriteContext &context=QgsReadWriteContext())=0
Reads configuration from a DOM element previously written using writeXml().
Base class for light sources in 3d scenes.
LightSourceType
Light source types for 3D scenes.
virtual Qgis::LightSourceType type() const =0
Returns the light source type.
void setColor(const QColor &color)
Sets color of the light.
Definition of a point light in a 3D map scene.
float quadraticAttenuation() const
Returns quadratic attenuation (A_2)
float intensity() const
Returns intensity of the light.
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.
void setConstantAttenuation(float value)
Sets constant attenuation (A_0)
float linearAttenuation() const
Returns linear attenuation (A_1)
virtual QgsLightSource * clone() const =0
Returns a copy of the light source.
void setLinearAttenuation(float value)
Sets linear attenuation (A_1)