QGIS API Documentation 3.29.0-Master (8c80f25a4f)
Public Member Functions | List of all members
QgsDirectionalLightSettings Class Reference

3 More...

#include <qgsdirectionallightsettings.h>

Inheritance diagram for QgsDirectionalLightSettings:
Inheritance graph
[legend]

Public Member Functions

 QgsDirectionalLightSettings ()=default
 Construct a directional light with default values. More...
 
QgsDirectionalLightSettingsclone () const override
 Returns a copy of the light source. More...
 
QColor color () const
 Returns color of the light. More...
 
Qt3DCore::QEntity * createEntity (const Qgs3DMapSettings &map, Qt3DCore::QEntity *parent) const override
 Creates an entity representing the light source. More...
 
QgsVector3D direction () const
 Returns the direction of the light in degrees. More...
 
float intensity () const
 Returns intensity of the light. More...
 
bool operator== (const QgsDirectionalLightSettings &other)
 
void readXml (const QDomElement &elem, const QgsReadWriteContext &context=QgsReadWriteContext()) override
 Reads configuration from a DOM element previously written using writeXml(). More...
 
void setColor (const QColor &color)
 Sets color of the light. More...
 
void setDirection (const QgsVector3D &direction)
 Sets the direction of the light in degrees. More...
 
void setIntensity (float intensity)
 Sets intensity of the light. More...
 
Qgis::LightSourceType type () const override
 Returns the light source type. More...
 
QDomElement writeXml (QDomDocument &doc, const QgsReadWriteContext &context=QgsReadWriteContext()) const override
 Writes the light source's configuration to a new DOM element and returns it. More...
 
- Public Member Functions inherited from QgsLightSource
virtual ~QgsLightSource ()
 
virtual QgsLightSourceclone () const =0
 Returns a copy of the light source. More...
 
virtual Qt3DCore::QEntity * createEntity (const Qgs3DMapSettings &map, Qt3DCore::QEntity *parent) const =0
 Creates an entity representing the light source. More...
 
virtual void readXml (const QDomElement &elem, const QgsReadWriteContext &context=QgsReadWriteContext())=0
 Reads configuration from a DOM element previously written using writeXml(). More...
 
virtual void resolveReferences (const QgsProject &project)
 After reading from XML, resolve references to any layers that have been read as layer IDs. More...
 
virtual Qgis::LightSourceType type () const =0
 Returns the light source type. More...
 
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. More...
 

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. More...
 

Detailed Description

3

Definition of a directional light in a 3D map scene

Since
QGIS 3.16

Definition at line 33 of file qgsdirectionallightsettings.h.

Constructor & Destructor Documentation

◆ QgsDirectionalLightSettings()

QgsDirectionalLightSettings::QgsDirectionalLightSettings ( )
default

Construct a directional light with default values.

Member Function Documentation

◆ clone()

QgsDirectionalLightSettings * QgsDirectionalLightSettings::clone ( ) const
overridevirtual

Returns a copy of the light source.

Implements QgsLightSource.

Definition at line 28 of file qgsdirectionallightsettings.cpp.

◆ color()

QColor QgsDirectionalLightSettings::color ( ) const
inline

Returns color of the light.

Definition at line 51 of file qgsdirectionallightsettings.h.

◆ createEntity()

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

Creates an entity representing the light source.

Implements QgsLightSource.

Definition at line 33 of file qgsdirectionallightsettings.cpp.

◆ direction()

QgsVector3D QgsDirectionalLightSettings::direction ( ) const
inline

Returns the direction of the light in degrees.

Definition at line 46 of file qgsdirectionallightsettings.h.

◆ intensity()

float QgsDirectionalLightSettings::intensity ( ) const
inline

Returns intensity of the light.

Definition at line 56 of file qgsdirectionallightsettings.h.

◆ operator==()

bool QgsDirectionalLightSettings::operator== ( const QgsDirectionalLightSettings other)

Definition at line 70 of file qgsdirectionallightsettings.cpp.

◆ readXml()

void QgsDirectionalLightSettings::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 61 of file qgsdirectionallightsettings.cpp.

◆ setColor()

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

Sets color of the light.

Definition at line 53 of file qgsdirectionallightsettings.h.

◆ setDirection()

void QgsDirectionalLightSettings::setDirection ( const QgsVector3D direction)
inline

Sets the direction of the light in degrees.

Definition at line 48 of file qgsdirectionallightsettings.h.

◆ setIntensity()

void QgsDirectionalLightSettings::setIntensity ( float  intensity)
inline

Sets intensity of the light.

Definition at line 58 of file qgsdirectionallightsettings.h.

◆ type()

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

Returns the light source type.

Implements QgsLightSource.

Definition at line 23 of file qgsdirectionallightsettings.cpp.

◆ writeXml()

QDomElement QgsDirectionalLightSettings::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 50 of file qgsdirectionallightsettings.cpp.


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