QGIS API Documentation  3.20.0-Odense (decaadbb31)
Public Member Functions | List of all members
QgsShadowSettings Class Reference

class containing the configuration of shadows rendering 3 More...

#include <qgsshadowsettings.h>

Public Member Functions

 QgsShadowSettings ()=default
 Default constructor. More...
 
 QgsShadowSettings (const QgsShadowSettings &other)
 Copy constructor. More...
 
double maximumShadowRenderingDistance () const
 Returns the maximum shadow rendering distance accounted for when rendering shadows Objects further away from the camera than the specified distance won't cast shadows This helps with producing a reasonable shadow resolution when looking at a large area or up to the sky. More...
 
QgsShadowSettingsoperator= (QgsShadowSettings const &rhs)
 delete assignment operator More...
 
void readXml (const QDomElement &element, const QgsReadWriteContext &context)
 Reads settings from a DOM element. More...
 
bool renderShadows () const
 Returns whether shadow rendering is enabled. More...
 
int selectedDirectionalLight () const
 Returns the selected direcctional light used to cast shadows. More...
 
void setMaximumShadowRenderingDistance (double distance)
 Sets the maximum shadow rendering distance accounted for when rendering shadows Objects further away from the camera than the specified distance won't cast shadows This helps with producing a reasonable shadow resolution when looking at a large area or up to the sky. More...
 
void setRenderShadows (bool enabled)
 Sets whether shadow rendering is enabled. More...
 
void setSelectedDirectionalLight (int selectedLight)
 Sets which directional light is used to generate shadows. More...
 
void setShadowBias (double shadowBias)
 Sets the shadow bias value Tweak this to reduce artifacts like self shadowing A reasonable range of values can be between a very small positive value like 0.00000001 and 0.1. More...
 
void setShadowMapResolution (int resolution)
 Sets the resolution of the shadow map texture (this can be used to generate higher quality shadows) More...
 
double shadowBias () const
 Returns the shadow bias used to correct the numerical imprecision of shadows (for the depth test) This helps with reducing the self shadowing artifact. More...
 
int shadowMapResolution () const
 Returns the resolution of the shadow map texture used to generate the shadows. More...
 
void writeXml (QDomElement &element, const QgsReadWriteContext &context) const
 Writes settings to a DOM element. More...
 

Detailed Description

class containing the configuration of shadows rendering 3

Since
QGIS 3.16

Definition at line 34 of file qgsshadowsettings.h.

Constructor & Destructor Documentation

◆ QgsShadowSettings() [1/2]

QgsShadowSettings::QgsShadowSettings ( )
default

Default constructor.

◆ QgsShadowSettings() [2/2]

QgsShadowSettings::QgsShadowSettings ( const QgsShadowSettings other)

Copy constructor.

Definition at line 23 of file qgsshadowsettings.cpp.

Member Function Documentation

◆ maximumShadowRenderingDistance()

double QgsShadowSettings::maximumShadowRenderingDistance ( ) const
inline

Returns the maximum shadow rendering distance accounted for when rendering shadows Objects further away from the camera than the specified distance won't cast shadows This helps with producing a reasonable shadow resolution when looking at a large area or up to the sky.

Since
QGIS 3.16

Definition at line 60 of file qgsshadowsettings.h.

◆ operator=()

QgsShadowSettings & QgsShadowSettings::operator= ( QgsShadowSettings const &  rhs)

delete assignment operator

Definition at line 33 of file qgsshadowsettings.cpp.

◆ readXml()

void QgsShadowSettings::readXml ( const QDomElement &  element,
const QgsReadWriteContext context 
)

Reads settings from a DOM element.

Definition at line 43 of file qgsshadowsettings.cpp.

◆ renderShadows()

bool QgsShadowSettings::renderShadows ( ) const
inline

Returns whether shadow rendering is enabled.

Definition at line 50 of file qgsshadowsettings.h.

◆ selectedDirectionalLight()

int QgsShadowSettings::selectedDirectionalLight ( ) const
inline

Returns the selected direcctional light used to cast shadows.

Definition at line 52 of file qgsshadowsettings.h.

◆ setMaximumShadowRenderingDistance()

void QgsShadowSettings::setMaximumShadowRenderingDistance ( double  distance)
inline

Sets the maximum shadow rendering distance accounted for when rendering shadows Objects further away from the camera than the specified distance won't cast shadows This helps with producing a reasonable shadow resolution when looking at a large area or up to the sky.

Since
QGIS 3.16

Definition at line 86 of file qgsshadowsettings.h.

◆ setRenderShadows()

void QgsShadowSettings::setRenderShadows ( bool  enabled)
inline

Sets whether shadow rendering is enabled.

Definition at line 76 of file qgsshadowsettings.h.

◆ setSelectedDirectionalLight()

void QgsShadowSettings::setSelectedDirectionalLight ( int  selectedLight)
inline

Sets which directional light is used to generate shadows.

Definition at line 78 of file qgsshadowsettings.h.

◆ setShadowBias()

void QgsShadowSettings::setShadowBias ( double  shadowBias)
inline

Sets the shadow bias value Tweak this to reduce artifacts like self shadowing A reasonable range of values can be between a very small positive value like 0.00000001 and 0.1.

Since
QGIS 3.16

Definition at line 94 of file qgsshadowsettings.h.

◆ setShadowMapResolution()

void QgsShadowSettings::setShadowMapResolution ( int  resolution)
inline

Sets the resolution of the shadow map texture (this can be used to generate higher quality shadows)

Since
QGIS 3.16

Definition at line 100 of file qgsshadowsettings.h.

◆ shadowBias()

double QgsShadowSettings::shadowBias ( ) const
inline

Returns the shadow bias used to correct the numerical imprecision of shadows (for the depth test) This helps with reducing the self shadowing artifact.

Since
QGIS 3.16

Definition at line 67 of file qgsshadowsettings.h.

◆ shadowMapResolution()

int QgsShadowSettings::shadowMapResolution ( ) const
inline

Returns the resolution of the shadow map texture used to generate the shadows.

Since
QGIS 3.16

Definition at line 73 of file qgsshadowsettings.h.

◆ writeXml()

void QgsShadowSettings::writeXml ( QDomElement &  element,
const QgsReadWriteContext context 
) const

Writes settings to a DOM element.

Definition at line 53 of file qgsshadowsettings.cpp.


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