|
QGIS API Documentation 4.0.0-Norrköping (1ddcee3d0e4)
|
Renders elevation shading on an image with different methods (eye dome lighting, hillshading, ...). More...
#include <qgselevationshadingrenderer.h>
Public Member Functions | |
| QgsElevationShadingRenderer () | |
| Qgis::ElevationMapCombineMethod | combinedElevationMethod () const |
| Returns the method used when conbining different elevation sources. | |
| double | eyeDomeLightingDistance () const |
| Returns the distance of the eye dome lighting method, that is the distance where the effect is apply from the source elevation. | |
| Qgis::RenderUnit | eyeDomeLightingDistanceUnit () const |
| Returns the unit of the distance of the eye dome lighting method returned by eyeDomeLightingDistance(). | |
| double | eyeDomeLightingStrength () const |
| Returns the strength of the eye dome lighting method. | |
| double | hillshadingZFactor () const |
| Returns the z factor used by the hill shading method. | |
| bool | isActive () const |
| Returns whether this shading renderer is active. | |
| bool | isActiveEyeDomeLighting () const |
| Returns whether eye-dome lighting shading method is active. | |
| bool | isActiveHillshading () const |
| Returns whether the hillshading is active. | |
| bool | isHillshadingMultidirectional () const |
| Returns whether the hill shading method is multidirectional. | |
| double | lightAltitude () const |
| Returns the altitude of the light (degree) that can be used by some methods (e.g. | |
| double | lightAzimuth () const |
| Returns the azimuth of the light (degree) that can be used by some methods (e.g. | |
| void | readXml (const QDomElement &element, const QgsReadWriteContext &context) |
| Reads configuration from a DOM element. | |
| void | renderShading (const QgsElevationMap &elevation, QImage &image, const QgsRenderContext &context) const |
| Render shading on image condidering the elevation map elevation and the renderer context context If elevation map and the image don't have same sizes, nothing happens. | |
| void | setActive (bool active) |
| Sets whether this shading renderer is active. | |
| void | setActiveEyeDomeLighting (bool active) |
| Sets active the eye-dome lighting shading method. | |
| void | setActiveHillshading (bool active) |
| Sets active the hillshading. | |
| void | setCombinedElevationMethod (Qgis::ElevationMapCombineMethod method) |
| Sets the method used when conbining different elevation sources. | |
| void | setEyeDomeLightingDistance (double distance) |
| Sets the distance of the eye dome lighting method, that is the distance where the effect is apply from the source elevation. | |
| void | setEyeDomeLightingDistanceUnit (Qgis::RenderUnit unit) |
| Sets the unit of the distance of the eye dome lighting method set by setEyeDomeLightingDistance(). | |
| void | setEyeDomeLightingStrength (double strength) |
| Sets the strength of the eye dome lighting method. | |
| void | setHillshadingMultidirectional (bool multiDirectional) |
| Sets whether the hill shading method is multidirectional. | |
| void | setHillshadingZFactor (double zFactor) |
| Sets the z factor used by the hill shading method. | |
| void | setLightAltitude (double lightAltitude) |
| Sets the altitude of the light (degree) that can be used by some methods (e.g. | |
| void | setLightAzimuth (double lightAzimuth) |
| Sets the azimuth of the light (degree) that can be used by some methods (e.g. | |
| void | writeXml (QDomElement &elem, const QgsReadWriteContext &context) const |
| Writes configuration on a DOM element. | |
Renders elevation shading on an image with different methods (eye dome lighting, hillshading, ...).
An instance of this class supports the following settings:
To render shading on image the caller call renderShading() with the image and an elevation map (see QgsElevationMap()) as parameters. The shading is applied on the image in place. Elevation map and image must have same sizes.
Definition at line 47 of file qgselevationshadingrenderer.h.
| QgsElevationShadingRenderer::QgsElevationShadingRenderer | ( | ) |
Definition at line 27 of file qgselevationshadingrenderer.cpp.
| Qgis::ElevationMapCombineMethod QgsElevationShadingRenderer::combinedElevationMethod | ( | ) | const |
Returns the method used when conbining different elevation sources.
Definition at line 167 of file qgselevationshadingrenderer.cpp.
| double QgsElevationShadingRenderer::eyeDomeLightingDistance | ( | ) | const |
Returns the distance of the eye dome lighting method, that is the distance where the effect is apply from the source elevation.
Definition at line 187 of file qgselevationshadingrenderer.cpp.
| Qgis::RenderUnit QgsElevationShadingRenderer::eyeDomeLightingDistanceUnit | ( | ) | const |
Returns the unit of the distance of the eye dome lighting method returned by eyeDomeLightingDistance().
Definition at line 177 of file qgselevationshadingrenderer.cpp.
| double QgsElevationShadingRenderer::eyeDomeLightingStrength | ( | ) | const |
Returns the strength of the eye dome lighting method.
Definition at line 197 of file qgselevationshadingrenderer.cpp.
| double QgsElevationShadingRenderer::hillshadingZFactor | ( | ) | const |
Returns the z factor used by the hill shading method.
Definition at line 72 of file qgselevationshadingrenderer.cpp.
| bool QgsElevationShadingRenderer::isActive | ( | ) | const |
Returns whether this shading renderer is active.
Definition at line 47 of file qgselevationshadingrenderer.cpp.
| bool QgsElevationShadingRenderer::isActiveEyeDomeLighting | ( | ) | const |
Returns whether eye-dome lighting shading method is active.
Definition at line 57 of file qgselevationshadingrenderer.cpp.
| bool QgsElevationShadingRenderer::isActiveHillshading | ( | ) | const |
Returns whether the hillshading is active.
Definition at line 67 of file qgselevationshadingrenderer.cpp.
| bool QgsElevationShadingRenderer::isHillshadingMultidirectional | ( | ) | const |
Returns whether the hill shading method is multidirectional.
Definition at line 82 of file qgselevationshadingrenderer.cpp.
| double QgsElevationShadingRenderer::lightAltitude | ( | ) | const |
Returns the altitude of the light (degree) that can be used by some methods (e.g.
hill shading).
Definition at line 92 of file qgselevationshadingrenderer.cpp.
| double QgsElevationShadingRenderer::lightAzimuth | ( | ) | const |
Returns the azimuth of the light (degree) that can be used by some methods (e.g.
hill shading).
Definition at line 102 of file qgselevationshadingrenderer.cpp.
| void QgsElevationShadingRenderer::readXml | ( | const QDomElement & | element, |
| const QgsReadWriteContext & | context ) |
Reads configuration from a DOM element.
Definition at line 131 of file qgselevationshadingrenderer.cpp.
| void QgsElevationShadingRenderer::renderShading | ( | const QgsElevationMap & | elevation, |
| QImage & | image, | ||
| const QgsRenderContext & | context ) const |
Render shading on image condidering the elevation map elevation and the renderer context context If elevation map and the image don't have same sizes, nothing happens.
Definition at line 30 of file qgselevationshadingrenderer.cpp.
| void QgsElevationShadingRenderer::setActive | ( | bool | active | ) |
Sets whether this shading renderer is active.
Definition at line 42 of file qgselevationshadingrenderer.cpp.
| void QgsElevationShadingRenderer::setActiveEyeDomeLighting | ( | bool | active | ) |
Sets active the eye-dome lighting shading method.
Definition at line 52 of file qgselevationshadingrenderer.cpp.
| void QgsElevationShadingRenderer::setActiveHillshading | ( | bool | active | ) |
Sets active the hillshading.
Definition at line 62 of file qgselevationshadingrenderer.cpp.
| void QgsElevationShadingRenderer::setCombinedElevationMethod | ( | Qgis::ElevationMapCombineMethod | method | ) |
Sets the method used when conbining different elevation sources.
Definition at line 172 of file qgselevationshadingrenderer.cpp.
| void QgsElevationShadingRenderer::setEyeDomeLightingDistance | ( | double | distance | ) |
Sets the distance of the eye dome lighting method, that is the distance where the effect is apply from the source elevation.
Definition at line 192 of file qgselevationshadingrenderer.cpp.
| void QgsElevationShadingRenderer::setEyeDomeLightingDistanceUnit | ( | Qgis::RenderUnit | unit | ) |
Sets the unit of the distance of the eye dome lighting method set by setEyeDomeLightingDistance().
Definition at line 182 of file qgselevationshadingrenderer.cpp.
| void QgsElevationShadingRenderer::setEyeDomeLightingStrength | ( | double | strength | ) |
Sets the strength of the eye dome lighting method.
Definition at line 202 of file qgselevationshadingrenderer.cpp.
| void QgsElevationShadingRenderer::setHillshadingMultidirectional | ( | bool | multiDirectional | ) |
Sets whether the hill shading method is multidirectional.
Definition at line 87 of file qgselevationshadingrenderer.cpp.
| void QgsElevationShadingRenderer::setHillshadingZFactor | ( | double | zFactor | ) |
Sets the z factor used by the hill shading method.
Definition at line 77 of file qgselevationshadingrenderer.cpp.
| void QgsElevationShadingRenderer::setLightAltitude | ( | double | lightAltitude | ) |
Sets the altitude of the light (degree) that can be used by some methods (e.g.
hill shading).
Definition at line 97 of file qgselevationshadingrenderer.cpp.
| void QgsElevationShadingRenderer::setLightAzimuth | ( | double | lightAzimuth | ) |
Sets the azimuth of the light (degree) that can be used by some methods (e.g.
hill shading).
Definition at line 107 of file qgselevationshadingrenderer.cpp.
| void QgsElevationShadingRenderer::writeXml | ( | QDomElement & | elem, |
| const QgsReadWriteContext & | context ) const |
Writes configuration on a DOM element.
Definition at line 112 of file qgselevationshadingrenderer.cpp.