QGIS API Documentation  3.23.0-Master (dd0cd13a00)
Public Member Functions | List of all members
QgsPointLightSettings Class Reference

3 More...

#include <qgspointlightsettings.h>

Public Member Functions

 QgsPointLightSettings ()=default
 Construct a point light with default values. More...
 
QColor color () const
 Returns color of the light. More...
 
float constantAttenuation () const
 Returns constant attenuation (A_0) More...
 
float intensity () const
 Returns intensity of the light. More...
 
float linearAttenuation () const
 Returns linear attenuation (A_1) More...
 
bool operator== (const QgsPointLightSettings &other)
 
QgsVector3D position () const
 Returns position of the light (in 3D world coordinates) More...
 
float quadraticAttenuation () const
 Returns quadratic attenuation (A_2) More...
 
void readXml (const QDomElement &elem)
 Reads configuration from a DOM element previously written using writeXml() More...
 
void setColor (const QColor &color)
 Sets color of the light. More...
 
void setConstantAttenuation (float value)
 Sets constant attenuation (A_0) More...
 
void setIntensity (float intensity)
 Sets intensity of the light. More...
 
void setLinearAttenuation (float value)
 Sets linear attenuation (A_1) More...
 
void setPosition (const QgsVector3D &pos)
 Sets position of the light (in 3D world coordinates) More...
 
void setQuadraticAttenuation (float value)
 Sets quadratic attenuation (A_2) More...
 
QDomElement writeXml (QDomDocument &doc) const
 Writes configuration to a new DOM element and returns it. More...
 

Detailed Description

3

Definition of a point light in a 3D map scene

Total light at the distance D from a point light with intensity I is (I / TA) where TA is total attenuation which is calculated as (A_0 + A_1 * D + A_2 * D^2). The terms A_0, A_1 and A_2 stand for constant, linear and quadratic attenuation.

Since
QGIS 3.6

Definition at line 38 of file qgspointlightsettings.h.

Constructor & Destructor Documentation

◆ QgsPointLightSettings()

QgsPointLightSettings::QgsPointLightSettings ( )
default

Construct a point light with default values.

Member Function Documentation

◆ color()

QColor QgsPointLightSettings::color ( ) const
inline

Returns color of the light.

Definition at line 50 of file qgspointlightsettings.h.

◆ constantAttenuation()

float QgsPointLightSettings::constantAttenuation ( ) const
inline

Returns constant attenuation (A_0)

Definition at line 60 of file qgspointlightsettings.h.

◆ intensity()

float QgsPointLightSettings::intensity ( ) const
inline

Returns intensity of the light.

Definition at line 55 of file qgspointlightsettings.h.

◆ linearAttenuation()

float QgsPointLightSettings::linearAttenuation ( ) const
inline

Returns linear attenuation (A_1)

Definition at line 65 of file qgspointlightsettings.h.

◆ operator==()

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

Definition at line 49 of file qgspointlightsettings.cpp.

◆ position()

QgsVector3D QgsPointLightSettings::position ( ) const
inline

Returns position of the light (in 3D world coordinates)

Definition at line 45 of file qgspointlightsettings.h.

◆ quadraticAttenuation()

float QgsPointLightSettings::quadraticAttenuation ( ) const
inline

Returns quadratic attenuation (A_2)

Definition at line 70 of file qgspointlightsettings.h.

◆ readXml()

void QgsPointLightSettings::readXml ( const QDomElement &  elem)

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

Definition at line 37 of file qgspointlightsettings.cpp.

◆ setColor()

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

Sets color of the light.

Definition at line 52 of file qgspointlightsettings.h.

◆ setConstantAttenuation()

void QgsPointLightSettings::setConstantAttenuation ( float  value)
inline

Sets constant attenuation (A_0)

Definition at line 62 of file qgspointlightsettings.h.

◆ setIntensity()

void QgsPointLightSettings::setIntensity ( float  intensity)
inline

Sets intensity of the light.

Definition at line 57 of file qgspointlightsettings.h.

◆ setLinearAttenuation()

void QgsPointLightSettings::setLinearAttenuation ( float  value)
inline

Sets linear attenuation (A_1)

Definition at line 67 of file qgspointlightsettings.h.

◆ setPosition()

void QgsPointLightSettings::setPosition ( const QgsVector3D pos)
inline

Sets position of the light (in 3D world coordinates)

Definition at line 47 of file qgspointlightsettings.h.

◆ setQuadraticAttenuation()

void QgsPointLightSettings::setQuadraticAttenuation ( float  value)
inline

Sets quadratic attenuation (A_2)

Definition at line 72 of file qgspointlightsettings.h.

◆ writeXml()

QDomElement QgsPointLightSettings::writeXml ( QDomDocument &  doc) const

Writes configuration to a new DOM element and returns it.

Definition at line 23 of file qgspointlightsettings.cpp.


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