16#ifndef QGSSUNLIGHTSETTINGS_H
17#define QGSSUNLIGHTSETTINGS_H
55 QDateTime
sunTime()
const {
return mSunTime; }
62 void setSunTime(
const QDateTime &time ) { mSunTime = time; }
69 QColor
color()
const {
return mColor; }
137 QDateTime mSunTime = QDateTime::currentDateTimeUtc();
139 QColor mColor = Qt::white;
140 double mIntensity = 1.0;
142 double mAtmosphericPressure = 1013.25;
143 double mTemperature = 15.0;
145 double mReferenceElevation = 0.0;
LightSourceType
Light source types for 3D scenes.
virtual Qgis::LightSourceType type() const =0
Returns the light source type.
virtual QgsLightSource * clone() const =0
Returns a copy of the light source.
A container for the context for various read/write operations on objects.
Definition of a sun light in a 3D map scene.
double referenceElevation() const
Returns the reference elevation (in meters above sea level) used for the solar position calculation.
void setColor(const QColor &color)
Sets the base color of the sunlight.
QDomElement writeXml(QDomDocument &doc, const QgsReadWriteContext &context=QgsReadWriteContext()) const override
Writes the light source's configuration to a new DOM element and returns it.
double intensity() const
Returns the base intensity of the sunlight.
QDateTime sunTime() const
Returns the configured date and time for the sun position calculation.
double atmosphericPressure() const
Returns the atmospheric pressure (in millibars/hPa) used for the solar refraction calculation.
void setIntensity(double intensity)
Sets the base intensity of the sunlight.
void setReferenceElevation(double elevation)
Sets the reference elevation (in meters above sea level) for the solar position calculation.
QgsSunLightSettings()=default
void setSunTime(const QDateTime &time)
Sets the date and time for the sun position calculation.
QColor color() const
Returns the base color of the sunlight.
void setTemperature(double temperature)
Sets the ambient temperature (in Celsius) for the solar refraction calculation.
void setAtmosphericPressure(double pressure)
Sets the atmospheric pressure (in millibars/hPa) for the solar refraction calculation.
void readXml(const QDomElement &elem, const QgsReadWriteContext &context=QgsReadWriteContext()) override
Reads configuration from a DOM element previously written using writeXml().
QgsVector3D direction(const Qgs3DMapSettings &map) const
Returns the calculated direction of the light.
Qt3DCore::QEntity * createEntity(const Qgs3DMapSettings &map, Qt3DCore::QEntity *parent) const override
Creates an entity representing the light source.
double temperature() const
Returns the ambient temperature (in Celsius) used for the solar refraction calculation.
A 3D vector (similar to QVector3D) with the difference that it uses double precision instead of singl...
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)