QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
|
3 More...
#include <qgs3dmapsettings.h>
Signals | |
void | ambientOcclusionSettingsChanged () |
Emitted when ambient occlusion rendering settings are changed. | |
void | axisSettingsChanged () |
Emitted when 3d axis rendering settings are changed. | |
void | backgroundColorChanged () |
Emitted when the background color has changed. | |
void | cameraMovementSpeedChanged () |
Emitted when the camera movement speed was changed. | |
void | cameraNavigationModeChanged () |
Emitted when the camera navigation mode was changed. | |
void | debugDepthMapSettingsChanged () |
Emitted when depth map debugging has changed. | |
void | debugOverlayEnabledChanged (bool debugOverlayEnabled) |
Emitted when the debug overaly is enabled or disabled. | |
void | debugShadowMapSettingsChanged () |
Emitted when shadow map debugging has changed. | |
void | directionalLightsChanged () |
Emitted when the list of directional lights changes. | |
void | extentChanged () |
Emitted when the 3d view's 2d extent has changed. | |
void | eyeDomeLightingDistanceChanged () |
Emitted when the eye dome lighting distance has changed. | |
void | eyeDomeLightingEnabledChanged () |
Emitted when the flag whether eye dome lighting is used has changed. | |
void | eyeDomeLightingStrengthChanged () |
Emitted when the eye dome lighting strength has changed. | |
void | fieldOfViewChanged () |
Emitted when the camera lens field of view changes. | |
void | fpsCounterEnabledChanged (bool fpsCounterEnabled) |
Emitted when the FPS counter is enabled or disabled. | |
void | layersChanged () |
Emitted when the list of map layers for 3d rendering has changed. | |
void | lightSourcesChanged () |
Emitted when any of the light source settings in the map changes. | |
void | mapTileResolutionChanged () |
Emitted when the map tile resoulution has changed. | |
void | maxTerrainGroundErrorChanged () |
Emitted when the maximum terrain ground error has changed. | |
void | maxTerrainScreenErrorChanged () |
Emitted when the maximum terrain screen error has changed. | |
void | pointLightsChanged () |
Emitted when the list of point lights changes. | |
void | projectionTypeChanged () |
Emitted when the camera lens projection type changes. | |
void | renderersChanged () |
Emitted when the list of map's extra renderers have been modified. | |
void | selectionColorChanged () |
Emitted when the selection color has changed. | |
void | settingsChanged () |
Emitted when one of the configuration settings has changed. | |
void | shadowSettingsChanged () |
Emitted when shadow rendering settings are changed. | |
void | showCameraRotationCenterChanged () |
Emitted when the flag whether camera's rotation center is shown has changed. | |
void | showCameraViewCenterChanged () |
Emitted when the flag whether camera's view center is shown has changed. | |
void | showExtentIn2DViewChanged () |
Emitted when the parameter to display 3d view's extent in the 2D canvas has changed. | |
void | showLabelsChanged () |
Emitted when the flag whether labels are displayed on terrain tiles has changed. | |
void | showLightSourceOriginsChanged () |
Emitted when the flag whether light source origins are shown has changed. | |
void | showTerrainBoundingBoxesChanged () |
Emitted when the flag whether terrain's bounding boxes are shown has changed. | |
void | showTerrainTilesInfoChanged () |
Emitted when the flag whether terrain's tile info is shown has changed. | |
void | skyboxSettingsChanged () |
Emitted when skybox settings are changed. | |
void | terrainElevationOffsetChanged (float newElevation) |
Emitted when the terrain elevation offset is changed. | |
void | terrainGeneratorChanged () |
Emitted when the terrain generator has changed. | |
void | terrainMapThemeChanged () |
Emitted when terrain's map theme has changed. | |
void | terrainShadingChanged () |
Emitted when terrain shading enabled flag or terrain shading material has changed. | |
void | terrainVerticalScaleChanged () |
Emitted when the vertical scale of the terrain has changed. | |
void | viewFrustumVisualizationEnabledChanged () |
Emitted when the camera's view frustum visualization on the main 2D map canvas is enabled or disabled. | |
Public Member Functions | |
Qgs3DMapSettings () | |
Constructor for Qgs3DMapSettings. | |
Qgs3DMapSettings (const Qgs3DMapSettings &other) | |
Copy constructor. | |
~Qgs3DMapSettings () override | |
QgsAmbientOcclusionSettings | ambientOcclusionSettings () const |
Returns the current configuration of screen space ambient occlusion. | |
QColor | backgroundColor () const |
Returns background color of the 3D map view. | |
double | cameraMovementSpeed () const |
Returns the camera movement speed. | |
Qgis::NavigationMode | cameraNavigationMode () const |
Returns the navigation mode used by the camera. | |
void | configureTerrainFromProject (QgsProjectElevationProperties *properties, const QgsRectangle &fullExtent) |
Configures the map's terrain settings directly from a project's elevation properties. | |
QgsCoordinateReferenceSystem | crs () const |
Returns coordinate reference system used in the 3D scene. | |
Qt::Corner | debugDepthMapCorner () const |
Returns the corner where the shadow map preview is displayed. | |
bool | debugDepthMapEnabled () const |
Returns whether the shadow map debugging is enabled. | |
double | debugDepthMapSize () const |
Returns the size of the shadow map preview. | |
Qt::Corner | debugShadowMapCorner () const |
Returns the corner where the shadow map preview is displayed. | |
bool | debugShadowMapEnabled () const |
Returns whether the shadow map debugging is enabled. | |
double | debugShadowMapSize () const |
Returns the size of the shadow map preview. | |
QgsRectangle | extent () const |
Returns the 3D scene's 2D extent in project's CRS. | |
int | eyeDomeLightingDistance () const |
Returns the eye dome lighting distance value (contributes to the contrast of the image) | |
bool | eyeDomeLightingEnabled () const |
Returns whether eye dome lighting is used. | |
double | eyeDomeLightingStrength () const |
Returns the eye dome lighting strength value. | |
float | fieldOfView () const |
Returns the camera lens' field of view. | |
Qgs3DAxisSettings | get3DAxisSettings () const |
Returns the current configuration of 3d axis. | |
bool | isDebugOverlayEnabled () const |
Returns whether debug overlay is enabled. | |
bool | isFpsCounterEnabled () const |
Returns whether FPS counter label is enabled. | |
bool | isSkyboxEnabled () const |
Returns whether the skybox is enabled. | |
bool | isTerrainShadingEnabled () const |
Returns whether terrain shading is enabled. | |
QList< QgsMapLayer * > | layers () const |
Returns the list of 3D map layers to be rendered in the scene. | |
QList< QgsLightSource * > | lightSources () const |
Returns list of directional light sources defined in the scene. | |
QgsMapThemeCollection * | mapThemeCollection () const |
Returns pointer to the collection of map themes. | |
int | mapTileResolution () const |
Returns resolution (in pixels) of the texture of a terrain tile. | |
QgsVector3D | mapToWorldCoordinates (const QgsVector3D &mapCoords) const |
Converts map coordinates to 3D world coordinates (applies offset and turns (x,y,z) into (x,-z,y)) | |
float | maxTerrainGroundError () const |
Returns maximum ground error of terrain tiles in world units. | |
float | maxTerrainScreenError () const |
Returns maximum allowed screen error of terrain tiles in pixels. | |
Qgs3DMapSettings & | operator= (Qgs3DMapSettings const &)=delete |
QgsVector3D | origin () const |
Returns coordinates in map CRS at which 3D scene has origin (0,0,0) | |
double | outputDpi () const |
Returns DPI used for conversion between real world units (e.g. | |
const QgsPathResolver & | pathResolver () const |
Returns the path resolver for conversion between relative and absolute paths during rendering operations, e.g. | |
Qt3DRender::QCameraLens::ProjectionType | projectionType () const |
Returns the camera lens' projection type. | |
void | readXml (const QDomElement &elem, const QgsReadWriteContext &context) |
Reads configuration from a DOM element previously written by writeXml() | |
Qgis::RendererUsage | rendererUsage () const |
Returns the renderer usage. | |
void | resolveReferences (const QgsProject &project) |
Resolves references to other objects (map layers) after the call to readXml() | |
QColor | selectionColor () const |
Returns color used for selected features. | |
void | set3DAxisSettings (const Qgs3DAxisSettings &axisSettings, bool force=false) |
Sets the current configuration of 3d axis. | |
void | setAmbientOcclusionSettings (const QgsAmbientOcclusionSettings &ambientOcclusionSettings) |
Sets the current configuration of screen space ambient occlusion. | |
void | setBackgroundColor (const QColor &color) |
Sets background color of the 3D map view. | |
void | setCameraMovementSpeed (double movementSpeed) |
Sets the camera movement speed. | |
void | setCameraNavigationMode (Qgis::NavigationMode navigationMode) |
Sets the navigation mode for the camera. | |
void | setCrs (const QgsCoordinateReferenceSystem &crs) |
Sets coordinate reference system used in the 3D scene. | |
void | setDebugDepthMapSettings (bool enabled, Qt::Corner corner, double size) |
Sets the debugging settings of the depth map. | |
void | setDebugShadowMapSettings (bool enabled, Qt::Corner corner, double size) |
Sets the debugging settings of the shadow map. | |
void | setExtent (const QgsRectangle &extent) |
Sets the 3D scene's 2D extent in project's CRS, while also setting the scene's origin to the extent's center This needs to be called during initialization, as terrain will only be generated within this extent and layer 3D data will only be loaded within this extent too. | |
void | setEyeDomeLightingDistance (int distance) |
Sets the eye dome lighting distance value (contributes to the contrast of the image. | |
void | setEyeDomeLightingEnabled (bool enabled) |
Sets whether eye dome lighting will be used. | |
void | setEyeDomeLightingStrength (double strength) |
Sets the eye dome lighting strength value. | |
void | setFieldOfView (const float fieldOfView) |
Sets the camera lens' field of view. | |
void | setIsDebugOverlayEnabled (bool debugOverlayEnabled) |
Sets whether debug overlay is enabled The debug overlay displays some debugging and profiling information. | |
void | setIsFpsCounterEnabled (bool fpsCounterEnabled) |
Sets whether FPS counter label is enabled. | |
void | setIsSkyboxEnabled (bool enabled) |
Sets whether the skybox is enabled. | |
void | setLayers (const QList< QgsMapLayer * > &layers) |
Sets the list of 3D map layers to be rendered in the scene. | |
void | setLightSources (const QList< QgsLightSource * > &lights) |
Sets the list of light sources defined in the scene. | |
void | setMapThemeCollection (QgsMapThemeCollection *mapThemes) |
Sets pointer to the collection of map themes. | |
void | setMapTileResolution (int res) |
Sets resolution (in pixels) of the texture of a terrain tile. | |
void | setMaxTerrainGroundError (float error) |
Returns maximum ground error of terrain tiles in world units. | |
void | setMaxTerrainScreenError (float error) |
Sets maximum allowed screen error of terrain tiles in pixels. | |
void | setOrigin (const QgsVector3D &origin) |
Sets coordinates in map CRS at which our 3D world has origin (0,0,0) | |
void | setOutputDpi (const double dpi) |
Sets DPI used for conversion between real world units (e.g. | |
void | setPathResolver (const QgsPathResolver &resolver) |
Sets the path resolver for conversion between relative and absolute paths during rendering operations, e.g. | |
void | setProjectionType (const Qt3DRender::QCameraLens::ProjectionType projectionType) |
Sets the camera lens' projection type. | |
void | setRendererUsage (Qgis::RendererUsage rendererUsage) |
Sets the renderer usage. | |
void | setSelectionColor (const QColor &color) |
Sets color used for selected features. | |
void | setShadowSettings (const QgsShadowSettings &shadowSettings) |
Sets the current configuration of shadow rendering. | |
void | setShowCameraRotationCenter (bool enabled) |
Sets whether to show camera's rotation center as a sphere (for debugging) | |
void | setShowCameraViewCenter (bool enabled) |
Sets whether to show camera's view center as a sphere (for debugging) | |
void | setShowExtentIn2DView (bool show) |
Sets whether the extent is displayed on the main 2D map canvas. | |
void | setShowLabels (bool enabled) |
Sets whether to display labels on terrain tiles. | |
void | setShowLightSourceOrigins (bool enabled) |
Sets whether to show light source origins as a sphere (for debugging) | |
void | setShowTerrainBoundingBoxes (bool enabled) |
Sets whether to display bounding boxes of terrain tiles (for debugging) | |
void | setShowTerrainTilesInfo (bool enabled) |
Sets whether to display extra tile info on top of terrain tiles (for debugging) | |
void | setSkyboxSettings (const QgsSkyboxSettings &skyboxSettings) |
Sets the current configuration of the skybox. | |
void | setTerrainElevationOffset (float offset) |
Sets the terrain elevation offset (used to move the terrain up or down) | |
void | setTerrainGenerator (QgsTerrainGenerator *gen) |
Sets terrain generator and sets extent() as the generator's extent. | |
void | setTerrainMapTheme (const QString &theme) |
Sets name of the map theme. | |
void | setTerrainRenderingEnabled (bool terrainRenderingEnabled) |
Sets whether the 2D terrain surface will be rendered in. | |
void | setTerrainShadingEnabled (bool enabled) |
Sets whether terrain shading is enabled. | |
void | setTerrainShadingMaterial (const QgsPhongMaterialSettings &material) |
Sets terrain shading material. | |
void | setTerrainVerticalScale (double zScale) |
Sets vertical scale (exaggeration) of terrain (1 = true scale, > 1 = hills get more pronounced) | |
void | setTransformContext (const QgsCoordinateTransformContext &context) |
Sets the coordinate transform context, which stores various information regarding which datum transforms should be used when transforming points from a source to destination coordinate reference system. | |
void | setViewFrustumVisualizationEnabled (bool enabled) |
Sets whether the camera's view frustum is visualized on the 2D map canvas. | |
void | setViewSyncMode (Qgis::ViewSyncModeFlags mode) |
Sets the view sync mode (used to synchronize the 2D main map canvas and the 3D camera navigation) | |
QgsShadowSettings | shadowSettings () const |
Returns the current configuration of shadows. | |
bool | showCameraRotationCenter () const |
Returns whether to show camera's rotation center as a sphere (for debugging) | |
bool | showCameraViewCenter () const |
Returns whether to show camera's view center as a sphere (for debugging) | |
bool | showExtentIn2DView () const |
Returns whether the extent is displayed on the main 2D map canvas. | |
bool | showLabels () const |
Returns whether to display labels on terrain tiles. | |
bool | showLightSourceOrigins () const |
Returns whether to show light source origins as a sphere (for debugging) | |
bool | showTerrainBoundingBoxes () const |
Returns whether to display bounding boxes of terrain tiles (for debugging) | |
bool | showTerrainTilesInfo () const |
Returns whether to display extra tile info on top of terrain tiles (for debugging) | |
QgsSkyboxSettings | skyboxSettings () const |
Returns the current configuration of the skybox. | |
float | terrainElevationOffset () const |
Returns the elevation offset of the terrain (used to move the terrain up or down) | |
QgsTerrainGenerator * | terrainGenerator () const |
Returns the terrain generator. | |
QString | terrainMapTheme () const |
Returns name of the map theme (from the active project) that will be used for terrain's texture. | |
bool | terrainRenderingEnabled () const |
Returns whether the 2D terrain surface will be rendered. | |
QgsPhongMaterialSettings | terrainShadingMaterial () const |
Returns terrain shading material. | |
double | terrainVerticalScale () const |
Returns vertical scale (exaggeration) of terrain. | |
QgsCoordinateTransformContext | transformContext () const |
Returns the coordinate transform context, which stores various information regarding which datum transforms should be used when transforming points from a source to destination coordinate reference system. | |
bool | viewFrustumVisualizationEnabled () const |
Returns whether the camera's view frustum is visualized on the 2D map canvas. | |
Qgis::ViewSyncModeFlags | viewSyncMode () const |
Returns the view sync mode (used to synchronize the 2D main map canvas and the 3D camera navigation) | |
QgsVector3D | worldToMapCoordinates (const QgsVector3D &worldCoords) const |
Converts 3D world coordinates to map coordinates (applies offset and turns (x,y,z) into (x,-z,y)) | |
QDomElement | writeXml (QDomDocument &doc, const QgsReadWriteContext &context) const |
Writes configuration to a DOM element, to be used later with readXml() | |
Public Member Functions inherited from QgsTemporalRangeObject | |
QgsTemporalRangeObject (bool enabled=false) | |
Constructor QgsTemporalRangeObject. | |
virtual | ~QgsTemporalRangeObject ()=default |
bool | isTemporal () const |
Returns true if the object's temporal range is enabled, and the object will be filtered when rendering maps with a specific time range set. | |
void | setIsTemporal (bool enabled) |
Sets whether the temporal range is enabled (i.e. | |
void | setTemporalRange (const QgsDateTimeRange &range) |
Sets the temporal range for the object. | |
const QgsDateTimeRange & | temporalRange () const |
Returns the datetime range for the object. | |
Qgs3DMapSettings::Qgs3DMapSettings | ( | ) |
Constructor for Qgs3DMapSettings.
Definition at line 39 of file qgs3dmapsettings.cpp.
Qgs3DMapSettings::Qgs3DMapSettings | ( | const Qgs3DMapSettings & | other | ) |
Copy constructor.
Definition at line 49 of file qgs3dmapsettings.cpp.
|
override |
Definition at line 116 of file qgs3dmapsettings.cpp.
|
inline |
Returns the current configuration of screen space ambient occlusion.
Definition at line 544 of file qgs3dmapsettings.h.
|
signal |
Emitted when ambient occlusion rendering settings are changed.
|
signal |
Emitted when 3d axis rendering settings are changed.
QColor Qgs3DMapSettings::backgroundColor | ( | ) | const |
Returns background color of the 3D map view.
Definition at line 514 of file qgs3dmapsettings.cpp.
|
signal |
Emitted when the background color has changed.
|
inline |
Returns the camera movement speed.
Definition at line 505 of file qgs3dmapsettings.h.
|
signal |
Emitted when the camera movement speed was changed.
|
inline |
Returns the navigation mode used by the camera.
Definition at line 492 of file qgs3dmapsettings.h.
|
signal |
Emitted when the camera navigation mode was changed.
void Qgs3DMapSettings::configureTerrainFromProject | ( | QgsProjectElevationProperties * | properties, |
const QgsRectangle & | fullExtent | ||
) |
Configures the map's terrain settings directly from a project's elevation properties.
Definition at line 575 of file qgs3dmapsettings.cpp.
|
inline |
Returns coordinate reference system used in the 3D scene.
Definition at line 110 of file qgs3dmapsettings.h.
|
inline |
Returns the corner where the shadow map preview is displayed.
Definition at line 441 of file qgs3dmapsettings.h.
|
inline |
Returns whether the shadow map debugging is enabled.
Definition at line 439 of file qgs3dmapsettings.h.
|
signal |
Emitted when depth map debugging has changed.
|
inline |
Returns the size of the shadow map preview.
Definition at line 443 of file qgs3dmapsettings.h.
|
signal |
Emitted when the debug overaly is enabled or disabled.
|
inline |
Returns the corner where the shadow map preview is displayed.
Definition at line 428 of file qgs3dmapsettings.h.
|
inline |
Returns whether the shadow map debugging is enabled.
Definition at line 426 of file qgs3dmapsettings.h.
|
signal |
Emitted when shadow map debugging has changed.
|
inline |
Returns the size of the shadow map preview.
Definition at line 430 of file qgs3dmapsettings.h.
|
signal |
Emitted when the list of directional lights changes.
|
inline |
Returns the 3D scene's 2D extent in project's CRS.
Definition at line 75 of file qgs3dmapsettings.h.
|
signal |
|
inline |
Returns the eye dome lighting distance value (contributes to the contrast of the image)
Definition at line 417 of file qgs3dmapsettings.h.
|
signal |
Emitted when the eye dome lighting distance has changed.
|
inline |
Returns whether eye dome lighting is used.
Definition at line 399 of file qgs3dmapsettings.h.
|
signal |
Emitted when the flag whether eye dome lighting is used has changed.
|
inline |
Returns the eye dome lighting strength value.
Definition at line 408 of file qgs3dmapsettings.h.
|
signal |
Emitted when the eye dome lighting strength has changed.
|
inline |
Returns the camera lens' field of view.
Definition at line 466 of file qgs3dmapsettings.h.
|
signal |
Emitted when the camera lens field of view changes.
|
signal |
Emitted when the FPS counter is enabled or disabled.
|
inline |
Returns the current configuration of 3d axis.
Definition at line 654 of file qgs3dmapsettings.h.
|
inline |
Returns whether debug overlay is enabled.
Definition at line 667 of file qgs3dmapsettings.h.
|
inline |
Returns whether FPS counter label is enabled.
Definition at line 583 of file qgs3dmapsettings.h.
|
inline |
Returns whether the skybox is enabled.
Definition at line 569 of file qgs3dmapsettings.h.
|
inline |
Returns whether terrain shading is enabled.
When enabled, in addition to the terrain texture generated from the map, the terrain rendering will take into account position of the lights, terrain normals and terrain shading material (ambient and specular colors, shininess).
Definition at line 307 of file qgs3dmapsettings.h.
QList< QgsMapLayer * > Qgs3DMapSettings::layers | ( | ) | const |
Returns the list of 3D map layers to be rendered in the scene.
This setting dictates which layers are to be rendered using their 3D rendering configuration, if available.
Definition at line 563 of file qgs3dmapsettings.cpp.
|
signal |
Emitted when the list of map layers for 3d rendering has changed.
QList< QgsLightSource * > Qgs3DMapSettings::lightSources | ( | ) | const |
Returns list of directional light sources defined in the scene.
Definition at line 792 of file qgs3dmapsettings.cpp.
|
signal |
Emitted when any of the light source settings in the map changes.
|
inline |
Returns pointer to the collection of map themes.
Normally this would be QgsProject::mapThemeCollection() of the currently used project. Without a valid map theme collection object it is not possible to resolve map themes from their names.
Definition at line 154 of file qgs3dmapsettings.h.
int Qgs3DMapSettings::mapTileResolution | ( | ) | const |
Returns resolution (in pixels) of the texture of a terrain tile.
This parameter influences how many zoom levels for terrain tiles there will be (together with maxTerrainGroundError())
Definition at line 630 of file qgs3dmapsettings.cpp.
|
signal |
Emitted when the map tile resoulution has changed.
QgsVector3D Qgs3DMapSettings::mapToWorldCoordinates | ( | const QgsVector3D & | mapCoords | ) | const |
Converts map coordinates to 3D world coordinates (applies offset and turns (x,y,z) into (x,-z,y))
Definition at line 480 of file qgs3dmapsettings.cpp.
float Qgs3DMapSettings::maxTerrainGroundError | ( | ) | const |
Returns maximum ground error of terrain tiles in world units.
This parameter influences how many zoom levels there will be (together with mapTileResolution()). This value tells that when the given ground error is reached (e.g. 10 meters), it makes no sense to further split terrain tiles into finer ones because they will not add extra details anymore.
Definition at line 666 of file qgs3dmapsettings.cpp.
|
signal |
Emitted when the maximum terrain ground error has changed.
float Qgs3DMapSettings::maxTerrainScreenError | ( | ) | const |
Returns maximum allowed screen error of terrain tiles in pixels.
This parameter decides how aggressively less detailed terrain tiles are swapped to more detailed ones as camera gets closer. Each tile has its error defined in world units - this error gets projected to screen pixels according to camera view and if the tile's error is greater than the allowed error, it will be swapped by more detailed tiles with lower error.
Definition at line 644 of file qgs3dmapsettings.cpp.
|
signal |
Emitted when the maximum terrain screen error has changed.
|
delete |
|
inline |
Returns coordinates in map CRS at which 3D scene has origin (0,0,0)
Definition at line 100 of file qgs3dmapsettings.h.
|
inline |
Returns DPI used for conversion between real world units (e.g.
mm) and pixels Default value is 96
Definition at line 526 of file qgs3dmapsettings.h.
|
inline |
Returns the path resolver for conversion between relative and absolute paths during rendering operations, e.g.
for resolving relative symbol paths.
Definition at line 137 of file qgs3dmapsettings.h.
|
signal |
Emitted when the list of point lights changes.
|
inline |
Returns the camera lens' projection type.
Definition at line 478 of file qgs3dmapsettings.h.
|
signal |
Emitted when the camera lens projection type changes.
void Qgs3DMapSettings::readXml | ( | const QDomElement & | elem, |
const QgsReadWriteContext & | context | ||
) |
Reads configuration from a DOM element previously written by writeXml()
Definition at line 121 of file qgs3dmapsettings.cpp.
|
signal |
Emitted when the list of map's extra renderers have been modified.
Qgis::RendererUsage Qgs3DMapSettings::rendererUsage | ( | ) | const |
Returns the renderer usage.
Definition at line 893 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::resolveReferences | ( | const QgsProject & | project | ) |
Resolves references to other objects (map layers) after the call to readXml()
Definition at line 453 of file qgs3dmapsettings.cpp.
QColor Qgs3DMapSettings::selectionColor | ( | ) | const |
Returns color used for selected features.
Definition at line 528 of file qgs3dmapsettings.cpp.
|
signal |
Emitted when the selection color has changed.
void Qgs3DMapSettings::set3DAxisSettings | ( | const Qgs3DAxisSettings & | axisSettings, |
bool | force = false |
||
) |
Sets the current configuration of 3d axis.
Definition at line 965 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setAmbientOcclusionSettings | ( | const QgsAmbientOcclusionSettings & | ambientOcclusionSettings | ) |
Sets the current configuration of screen space ambient occlusion.
Definition at line 855 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setBackgroundColor | ( | const QColor & | color | ) |
Sets background color of the 3D map view.
Definition at line 505 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setCameraMovementSpeed | ( | double | movementSpeed | ) |
void Qgs3DMapSettings::setCameraNavigationMode | ( | Qgis::NavigationMode | navigationMode | ) |
Sets the navigation mode for the camera.
Definition at line 825 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setCrs | ( | const QgsCoordinateReferenceSystem & | crs | ) |
Sets coordinate reference system used in the 3D scene.
Definition at line 490 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setDebugDepthMapSettings | ( | bool | enabled, |
Qt::Corner | corner, | ||
double | size | ||
) |
Sets the debugging settings of the depth map.
Definition at line 869 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setDebugShadowMapSettings | ( | bool | enabled, |
Qt::Corner | corner, | ||
double | size | ||
) |
Sets the debugging settings of the shadow map.
Definition at line 861 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setExtent | ( | const QgsRectangle & | extent | ) |
Sets the 3D scene's 2D extent in project's CRS, while also setting the scene's origin to the extent's center This needs to be called during initialization, as terrain will only be generated within this extent and layer 3D data will only be loaded within this extent too.
Definition at line 464 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setEyeDomeLightingDistance | ( | int | distance | ) |
Sets the eye dome lighting distance value (contributes to the contrast of the image.
Definition at line 784 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setEyeDomeLightingEnabled | ( | bool | enabled | ) |
Sets whether eye dome lighting will be used.
Definition at line 768 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setEyeDomeLightingStrength | ( | double | strength | ) |
Sets the eye dome lighting strength value.
Definition at line 776 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setFieldOfView | ( | const float | fieldOfView | ) |
Sets the camera lens' field of view.
Definition at line 807 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setIsDebugOverlayEnabled | ( | bool | debugOverlayEnabled | ) |
Sets whether debug overlay is enabled The debug overlay displays some debugging and profiling information.
It has been introduced in Qt version 5.15. This parameter is transient. It is not saved in the project parameters.
Definition at line 917 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setIsFpsCounterEnabled | ( | bool | fpsCounterEnabled | ) |
Sets whether FPS counter label is enabled.
Definition at line 877 of file qgs3dmapsettings.cpp.
|
inline |
Sets whether the skybox is enabled.
Definition at line 576 of file qgs3dmapsettings.h.
void Qgs3DMapSettings::setLayers | ( | const QList< QgsMapLayer * > & | layers | ) |
Sets the list of 3D map layers to be rendered in the scene.
This setting dictates which layers are to be rendered using their 3D rendering configuration, if available.
Definition at line 547 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setLightSources | ( | const QList< QgsLightSource * > & | lights | ) |
Sets the list of light sources defined in the scene.
Ownership of the lights is transferred to the settings.
Definition at line 797 of file qgs3dmapsettings.cpp.
|
inline |
Sets pointer to the collection of map themes.
Definition at line 161 of file qgs3dmapsettings.h.
void Qgs3DMapSettings::setMapTileResolution | ( | int | res | ) |
Sets resolution (in pixels) of the texture of a terrain tile.
Definition at line 621 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setMaxTerrainGroundError | ( | float | error | ) |
Returns maximum ground error of terrain tiles in world units.
Definition at line 649 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setMaxTerrainScreenError | ( | float | error | ) |
Sets maximum allowed screen error of terrain tiles in pixels.
Definition at line 635 of file qgs3dmapsettings.cpp.
|
inline |
Sets coordinates in map CRS at which our 3D world has origin (0,0,0)
We move the 3D world origin to the center of the extent of our terrain: this is done to minimize the impact of numerical errors when operating with 32-bit floats. Unfortunately this is not enough when working with a large area (still results in jitter with scenes spanning hundreds of kilometers and zooming in a lot).
Need to look into more advanced techniques like "relative to center" or "relative to eye" to improve the precision.
Definition at line 98 of file qgs3dmapsettings.h.
|
inline |
Sets DPI used for conversion between real world units (e.g.
mm) and pixels
dpi | the number of dot per inch |
Definition at line 518 of file qgs3dmapsettings.h.
|
inline |
Sets the path resolver for conversion between relative and absolute paths during rendering operations, e.g.
for resolving relative symbol paths.
Definition at line 146 of file qgs3dmapsettings.h.
void Qgs3DMapSettings::setProjectionType | ( | const Qt3DRender::QCameraLens::ProjectionType | projectionType | ) |
Sets the camera lens' projection type.
Definition at line 816 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setRendererUsage | ( | Qgis::RendererUsage | rendererUsage | ) |
Sets the renderer usage.
Definition at line 898 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setSelectionColor | ( | const QColor & | color | ) |
Sets color used for selected features.
Definition at line 519 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setShadowSettings | ( | const QgsShadowSettings & | shadowSettings | ) |
Sets the current configuration of shadow rendering.
Definition at line 849 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setShowCameraRotationCenter | ( | bool | enabled | ) |
Sets whether to show camera's rotation center as a sphere (for debugging)
Definition at line 740 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setShowCameraViewCenter | ( | bool | enabled | ) |
Sets whether to show camera's view center as a sphere (for debugging)
Definition at line 731 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setShowExtentIn2DView | ( | bool | show | ) |
Sets whether the extent is displayed on the main 2D map canvas.
Definition at line 984 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setShowLabels | ( | bool | enabled | ) |
Sets whether to display labels on terrain tiles.
Definition at line 759 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setShowLightSourceOrigins | ( | bool | enabled | ) |
Sets whether to show light source origins as a sphere (for debugging)
Definition at line 750 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setShowTerrainBoundingBoxes | ( | bool | enabled | ) |
Sets whether to display bounding boxes of terrain tiles (for debugging)
Definition at line 713 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setShowTerrainTilesInfo | ( | bool | enabled | ) |
Sets whether to display extra tile info on top of terrain tiles (for debugging)
Definition at line 722 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setSkyboxSettings | ( | const QgsSkyboxSettings & | skyboxSettings | ) |
Sets the current configuration of the skybox.
Definition at line 843 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setTerrainElevationOffset | ( | float | offset | ) |
Sets the terrain elevation offset (used to move the terrain up or down)
Definition at line 658 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setTerrainGenerator | ( | QgsTerrainGenerator * | gen | ) |
Sets terrain generator and sets extent() as the generator's extent.
It takes care of producing terrain tiles from the input data. Takes ownership of the generator.
true
.Definition at line 671 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setTerrainMapTheme | ( | const QString & | theme | ) |
Sets name of the map theme.
Definition at line 704 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setTerrainRenderingEnabled | ( | bool | terrainRenderingEnabled | ) |
Sets whether the 2D terrain surface will be rendered in.
Definition at line 885 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setTerrainShadingEnabled | ( | bool | enabled | ) |
Sets whether terrain shading is enabled.
Definition at line 686 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setTerrainShadingMaterial | ( | const QgsPhongMaterialSettings & | material | ) |
Sets terrain shading material.
Definition at line 695 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setTerrainVerticalScale | ( | double | zScale | ) |
Sets vertical scale (exaggeration) of terrain (1 = true scale, > 1 = hills get more pronounced)
Definition at line 533 of file qgs3dmapsettings.cpp.
|
signal |
Emitted when one of the configuration settings has changed.
void Qgs3DMapSettings::setTransformContext | ( | const QgsCoordinateTransformContext & | context | ) |
Sets the coordinate transform context, which stores various information regarding which datum transforms should be used when transforming points from a source to destination coordinate reference system.
Definition at line 500 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setViewFrustumVisualizationEnabled | ( | bool | enabled | ) |
Sets whether the camera's view frustum is visualized on the 2D map canvas.
Definition at line 908 of file qgs3dmapsettings.cpp.
void Qgs3DMapSettings::setViewSyncMode | ( | Qgis::ViewSyncModeFlags | mode | ) |
Sets the view sync mode (used to synchronize the 2D main map canvas and the 3D camera navigation)
Definition at line 903 of file qgs3dmapsettings.cpp.
|
inline |
Returns the current configuration of shadows.
Definition at line 538 of file qgs3dmapsettings.h.
|
signal |
Emitted when shadow rendering settings are changed.
|
inline |
Returns whether to show camera's rotation center as a sphere (for debugging)
Definition at line 373 of file qgs3dmapsettings.h.
|
signal |
Emitted when the flag whether camera's rotation center is shown has changed.
|
inline |
Returns whether to show camera's view center as a sphere (for debugging)
Definition at line 361 of file qgs3dmapsettings.h.
|
signal |
Emitted when the flag whether camera's view center is shown has changed.
|
inline |
Returns whether the extent is displayed on the main 2D map canvas.
Definition at line 684 of file qgs3dmapsettings.h.
|
signal |
Emitted when the parameter to display 3d view's extent in the 2D canvas has changed.
|
inline |
Returns whether to display labels on terrain tiles.
Definition at line 390 of file qgs3dmapsettings.h.
|
signal |
Emitted when the flag whether labels are displayed on terrain tiles has changed.
|
inline |
Returns whether to show light source origins as a sphere (for debugging)
Definition at line 385 of file qgs3dmapsettings.h.
|
signal |
Emitted when the flag whether light source origins are shown has changed.
|
inline |
Returns whether to display bounding boxes of terrain tiles (for debugging)
Definition at line 345 of file qgs3dmapsettings.h.
|
signal |
Emitted when the flag whether terrain's bounding boxes are shown has changed.
|
inline |
Returns whether to display extra tile info on top of terrain tiles (for debugging)
Definition at line 349 of file qgs3dmapsettings.h.
|
signal |
Emitted when the flag whether terrain's tile info is shown has changed.
|
inline |
Returns the current configuration of the skybox.
Definition at line 532 of file qgs3dmapsettings.h.
|
signal |
Emitted when skybox settings are changed.
|
inline |
Returns the elevation offset of the terrain (used to move the terrain up or down)
Definition at line 263 of file qgs3dmapsettings.h.
|
signal |
Emitted when the terrain elevation offset is changed.
|
inline |
Returns the terrain generator.
It takes care of producing terrain tiles from the input data.
true
.Definition at line 289 of file qgs3dmapsettings.h.
|
signal |
Emitted when the terrain generator has changed.
|
inline |
Returns name of the map theme (from the active project) that will be used for terrain's texture.
Empty map theme name means that the map theme is not overridden and the current map theme will be used.
Definition at line 336 of file qgs3dmapsettings.h.
|
signal |
Emitted when terrain's map theme has changed.
|
inline |
Returns whether the 2D terrain surface will be rendered.
Definition at line 597 of file qgs3dmapsettings.h.
|
signal |
Emitted when terrain shading enabled flag or terrain shading material has changed.
|
inline |
Returns terrain shading material.
Diffuse color component is ignored since the diffuse component is provided by 2D rendered map texture. Only used when isTerrainShadingEnabled() is true
.
Definition at line 321 of file qgs3dmapsettings.h.
double Qgs3DMapSettings::terrainVerticalScale | ( | ) | const |
Returns vertical scale (exaggeration) of terrain.
Definition at line 542 of file qgs3dmapsettings.cpp.
|
signal |
Emitted when the vertical scale of the terrain has changed.
QgsCoordinateTransformContext Qgs3DMapSettings::transformContext | ( | ) | const |
Returns the coordinate transform context, which stores various information regarding which datum transforms should be used when transforming points from a source to destination coordinate reference system.
Definition at line 495 of file qgs3dmapsettings.cpp.
|
inline |
Returns whether the camera's view frustum is visualized on the 2D map canvas.
Definition at line 641 of file qgs3dmapsettings.h.
|
signal |
Emitted when the camera's view frustum visualization on the main 2D map canvas is enabled or disabled.
|
inline |
Returns the view sync mode (used to synchronize the 2D main map canvas and the 3D camera navigation)
Definition at line 627 of file qgs3dmapsettings.h.
QgsVector3D Qgs3DMapSettings::worldToMapCoordinates | ( | const QgsVector3D & | worldCoords | ) | const |
Converts 3D world coordinates to map coordinates (applies offset and turns (x,y,z) into (x,-z,y))
Definition at line 485 of file qgs3dmapsettings.cpp.
QDomElement Qgs3DMapSettings::writeXml | ( | QDomDocument & | doc, |
const QgsReadWriteContext & | context | ||
) | const |
Writes configuration to a DOM element, to be used later with readXml()
Definition at line 318 of file qgs3dmapsettings.cpp.