QGIS API Documentation 4.1.0-Master (ca2ac17535b)
Loading...
Searching...
No Matches
QgsSunLightSettings Class Reference

Definition of a sun light in a 3D map scene. More...

#include <qgssunlightsettings.h>

Inheritance diagram for QgsSunLightSettings:

Public Member Functions

 QgsSunLightSettings ()=default
double atmosphericPressure () const
 Returns the atmospheric pressure (in millibars/hPa) used for the solar refraction calculation.
QgsSunLightSettingsclone () const override
 Returns a copy of the light source.
QColor color () const
 Returns the base color of the sunlight.
Qt3DCore::QEntity * createEntity (const Qgs3DMapSettings &map, Qt3DCore::QEntity *parent) const override
 Creates an entity representing the light source.
QgsVector3D direction (const Qgs3DMapSettings &map) const
 Returns the calculated direction of the light.
double intensity () const
 Returns the base intensity of the sunlight.
bool operator== (const QgsSunLightSettings &other) const
void readXml (const QDomElement &elem, const QgsReadWriteContext &context=QgsReadWriteContext()) override
 Reads configuration from a DOM element previously written using writeXml().
double referenceElevation () const
 Returns the reference elevation (in meters above sea level) used for the solar position calculation.
void setAtmosphericPressure (double pressure)
 Sets the atmospheric pressure (in millibars/hPa) for the solar refraction calculation.
void setColor (const QColor &color)
 Sets the base color of the sunlight.
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.
void setSunTime (const QDateTime &time)
 Sets the date and time for the sun position calculation.
void setTemperature (double temperature)
 Sets the ambient temperature (in Celsius) for the solar refraction calculation.
QDateTime sunTime () const
 Returns the configured date and time for the sun position calculation.
double temperature () const
 Returns the ambient temperature (in Celsius) used for the solar refraction calculation.
Qgis::LightSourceType type () const override
 Returns the light source type.
QDomElement writeXml (QDomDocument &doc, const QgsReadWriteContext &context=QgsReadWriteContext()) const override
 Writes the light source's configuration to a new DOM element and returns it.
Public Member Functions inherited from QgsLightSource
virtual ~QgsLightSource ()
QString id () const
 Returns the unique light ID string.
virtual void resolveReferences (const QgsProject &project)
 After reading from XML, resolve references to any layers that have been read as layer IDs.

Additional Inherited Members

Static Public Member Functions inherited from QgsLightSource
static QgsLightSourcecreateFromXml (const QDomElement &element, const QgsReadWriteContext &context)
 Creates a new light source from an XML element.
Protected Member Functions inherited from QgsLightSource
 QgsLightSource ()
Protected Attributes inherited from QgsLightSource
QString mId
 Unique light ID.

Detailed Description

Definition of a sun light in a 3D map scene.

A light source based on the real-world sun position.

Since
QGIS 4.2

Definition at line 36 of file qgssunlightsettings.h.

Constructor & Destructor Documentation

◆ QgsSunLightSettings()

QgsSunLightSettings::QgsSunLightSettings ( )
default

Member Function Documentation

◆ atmosphericPressure()

double QgsSunLightSettings::atmosphericPressure ( ) const
inline

Returns the atmospheric pressure (in millibars/hPa) used for the solar refraction calculation.

See also
setAtmosphericPressure()

Definition at line 97 of file qgssunlightsettings.h.

◆ clone()

QgsSunLightSettings * QgsSunLightSettings::clone ( ) const
overridevirtual

Returns a copy of the light source.

Implements QgsLightSource.

Definition at line 37 of file qgssunlightsettings.cpp.

◆ color()

QColor QgsSunLightSettings::color ( ) const
inline

Returns the base color of the sunlight.

See also
setColor()

Definition at line 69 of file qgssunlightsettings.h.

◆ createEntity()

Qt3DCore::QEntity * QgsSunLightSettings::createEntity ( const Qgs3DMapSettings & map,
Qt3DCore::QEntity * parent ) const
overridevirtual

Creates an entity representing the light source.

Implements QgsLightSource.

Definition at line 68 of file qgssunlightsettings.cpp.

◆ direction()

QgsVector3D QgsSunLightSettings::direction ( const Qgs3DMapSettings & map) const

Returns the calculated direction of the light.

Definition at line 44 of file qgssunlightsettings.cpp.

◆ intensity()

double QgsSunLightSettings::intensity ( ) const
inline

Returns the base intensity of the sunlight.

See also
setIntensity()

Definition at line 83 of file qgssunlightsettings.h.

◆ operator==()

bool QgsSunLightSettings::operator== ( const QgsSunLightSettings & other) const

Definition at line 112 of file qgssunlightsettings.cpp.

◆ readXml()

void QgsSunLightSettings::readXml ( const QDomElement & elem,
const QgsReadWriteContext & context = QgsReadWriteContext() )
overridevirtual

Reads configuration from a DOM element previously written using writeXml().

See also
writeXml()

Implements QgsLightSource.

Definition at line 96 of file qgssunlightsettings.cpp.

◆ referenceElevation()

double QgsSunLightSettings::referenceElevation ( ) const
inline

Returns the reference elevation (in meters above sea level) used for the solar position calculation.

See also
setReferenceElevation()

Definition at line 125 of file qgssunlightsettings.h.

◆ setAtmosphericPressure()

void QgsSunLightSettings::setAtmosphericPressure ( double pressure)
inline

Sets the atmospheric pressure (in millibars/hPa) for the solar refraction calculation.

See also
atmosphericPressure()

Definition at line 104 of file qgssunlightsettings.h.

◆ setColor()

void QgsSunLightSettings::setColor ( const QColor & color)
inline

Sets the base color of the sunlight.

See also
color()

Definition at line 76 of file qgssunlightsettings.h.

◆ setIntensity()

void QgsSunLightSettings::setIntensity ( double intensity)
inline

Sets the base intensity of the sunlight.

See also
intensity()

Definition at line 90 of file qgssunlightsettings.h.

◆ setReferenceElevation()

void QgsSunLightSettings::setReferenceElevation ( double elevation)
inline

Sets the reference elevation (in meters above sea level) for the solar position calculation.

See also
referenceElevation()

Definition at line 132 of file qgssunlightsettings.h.

◆ setSunTime()

void QgsSunLightSettings::setSunTime ( const QDateTime & time)
inline

Sets the date and time for the sun position calculation.

See also
sunTime()

Definition at line 62 of file qgssunlightsettings.h.

◆ setTemperature()

void QgsSunLightSettings::setTemperature ( double temperature)
inline

Sets the ambient temperature (in Celsius) for the solar refraction calculation.

See also
temperature()

Definition at line 118 of file qgssunlightsettings.h.

◆ sunTime()

QDateTime QgsSunLightSettings::sunTime ( ) const
inline

Returns the configured date and time for the sun position calculation.

See also
setSunTime()

Definition at line 55 of file qgssunlightsettings.h.

◆ temperature()

double QgsSunLightSettings::temperature ( ) const
inline

Returns the ambient temperature (in Celsius) used for the solar refraction calculation.

See also
setTemperature()

Definition at line 111 of file qgssunlightsettings.h.

◆ type()

Qgis::LightSourceType QgsSunLightSettings::type ( ) const
overridevirtual

Returns the light source type.

Implements QgsLightSource.

Definition at line 32 of file qgssunlightsettings.cpp.

◆ writeXml()

QDomElement QgsSunLightSettings::writeXml ( QDomDocument & doc,
const QgsReadWriteContext & context = QgsReadWriteContext() ) const
overridevirtual

Writes the light source's configuration to a new DOM element and returns it.

See also
readXml()

Implements QgsLightSource.

Definition at line 82 of file qgssunlightsettings.cpp.


The documentation for this class was generated from the following files: