QGIS API Documentation 3.39.0-Master (bca3cdb6021)
Loading...
Searching...
No Matches
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.
 
QgsDirectionalLightSettingsclone () const override
 Returns a copy of the light source.
 
QColor color () const
 Returns color of the light.
 
Qt3DCore::QEntity * createEntity (const Qgs3DMapSettings &map, Qt3DCore::QEntity *parent) const override
 Creates an entity representing the light source.
 
QgsVector3D direction () const
 Returns the direction of the light in degrees.
 
float intensity () const
 Returns intensity of the light.
 
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().
 
void setColor (const QColor &color)
 Sets color of the light.
 
void setDirection (const QgsVector3D &direction)
 Sets the direction of the light in degrees.
 
void setIntensity (float intensity)
 Sets intensity of the light.
 
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 ()
 
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.
 

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 29 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 34 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 71 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 62 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 24 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 51 of file qgsdirectionallightsettings.cpp.


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