QGIS API Documentation 4.1.0-Master (26185ffb827)
Loading...
Searching...
No Matches
qgs3dmapsettings.h
Go to the documentation of this file.
1/***************************************************************************
2 qgs3dmapsettings.h
3 --------------------------------------
4 Date : July 2017
5 Copyright : (C) 2017 by Martin Dobias
6 Email : wonder dot sk at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGS3DMAPSETTINGS_H
17#define QGS3DMAPSETTINGS_H
18
19#include <memory>
20
21#include "qgis_3d.h"
22#include "qgs3daxissettings.h"
26#include "qgsbloomsettings.h"
29#include "qgsmaplayerref.h"
31#include "qgsshadowsettings.h"
32#include "qgsskyboxsettings.h"
34#include "qgsterraingenerator.h"
35#include "qgsvector3d.h"
36
37#include <QColor>
38#include <QMatrix4x4>
39#include <Qt3DRender/QCamera>
40
41class QgsMapLayer;
42class QgsRasterLayer;
43class QgsLightSource;
46class QgsProject;
47
48class QDomElement;
49
58class _3D_EXPORT Qgs3DMapSettings : public QObject, public QgsTemporalRangeObject
59{
60 Q_OBJECT
61 public:
63 Qgs3DMapSettings( const Qgs3DMapSettings &other );
64 ~Qgs3DMapSettings() override;
65
67
69 void readXml( const QDomElement &elem, const QgsReadWriteContext &context );
71 QDomElement writeXml( QDomDocument &doc, const QgsReadWriteContext &context ) const;
73 void resolveReferences( const QgsProject &project );
74
83 QgsRectangle extent() const;
84
97 void setExtent( const QgsRectangle &extent );
98
112 void setOrigin( const QgsVector3D &origin );
113
119 QgsVector3D origin() const;
120
122 QgsVector3D mapToWorldCoordinates( const QgsVector3D &mapCoords ) const;
124 QgsVector3D worldToMapCoordinates( const QgsVector3D &worldCoords ) const;
125
132
139
149
158
167
174 const QgsPathResolver &pathResolver() const;
175
182 void setPathResolver( const QgsPathResolver &resolver );
183
191
198
200 void setBackgroundColor( const QColor &color );
202 QColor backgroundColor() const;
203
211
220
222 void setSelectionColor( const QColor &color );
224 QColor selectionColor() const;
225
234 void setLayers( const QList<QgsMapLayer *> &layers );
235
244 QList<QgsMapLayer *> layers() const;
245
246 //
247 // terrain related config
248 //
249
256
267
275
282 Q_DECL_DEPRECATED void setTerrainVerticalScale( double zScale ) SIP_DEPRECATED;
283
289 Q_DECL_DEPRECATED double terrainVerticalScale() const SIP_DEPRECATED;
290
297 Q_DECL_DEPRECATED void setMapTileResolution( int res ) SIP_DEPRECATED;
298
305 Q_DECL_DEPRECATED int mapTileResolution() const SIP_DEPRECATED;
306
313 Q_DECL_DEPRECATED void setMaxTerrainScreenError( double error ) SIP_DEPRECATED;
314
324 Q_DECL_DEPRECATED double maxTerrainScreenError() const SIP_DEPRECATED;
325
332 Q_DECL_DEPRECATED void setMaxTerrainGroundError( double error ) SIP_DEPRECATED;
333
342 Q_DECL_DEPRECATED double maxTerrainGroundError() const SIP_DEPRECATED;
343
349 Q_DECL_DEPRECATED void setTerrainElevationOffset( double offset ) SIP_DEPRECATED;
350
356 Q_DECL_DEPRECATED double terrainElevationOffset() const SIP_DEPRECATED;
357
371
383
389 void setTerrainShadingEnabled( bool enabled );
390
397 bool isTerrainShadingEnabled() const;
398
405
412
418 void setTerrainMapTheme( const QString &theme );
419
426 QString terrainMapTheme() const;
427
428 //
429 // misc configuration
430 //
431
440 void setDebugFlags( Qgis::Map3DDebugFlags flags );
441
450 Qgis::Map3DDebugFlags debugFlags() const;
451
457 Q_DECL_DEPRECATED void setShowTerrainBoundingBoxes( bool enabled ) SIP_DEPRECATED;
458
464 Q_DECL_DEPRECATED bool showTerrainBoundingBoxes() const SIP_DEPRECATED;
465
471 Q_DECL_DEPRECATED void setShowTerrainTilesInfo( bool enabled ) SIP_DEPRECATED;
472
478 Q_DECL_DEPRECATED bool showTerrainTilesInfo() const SIP_DEPRECATED;
479
485 Q_DECL_DEPRECATED void setShowCameraViewCenter( bool enabled ) SIP_DEPRECATED;
486
492 Q_DECL_DEPRECATED bool showCameraViewCenter() const SIP_DEPRECATED;
493
499 Q_DECL_DEPRECATED void setShowCameraRotationCenter( bool enabled ) SIP_DEPRECATED;
500
506 Q_DECL_DEPRECATED bool showCameraRotationCenter() const SIP_DEPRECATED;
507
513 Q_DECL_DEPRECATED void setShowLightSourceOrigins( bool enabled ) SIP_DEPRECATED;
514
520 Q_DECL_DEPRECATED bool showLightSourceOrigins() const SIP_DEPRECATED;
521
523 void setShowLabels( bool enabled );
525 bool showLabels() const;
526
532 void setEyeDomeLightingEnabled( bool enabled );
534 bool eyeDomeLightingEnabled() const;
535
541 void setEyeDomeLightingStrength( double strength );
543 double eyeDomeLightingStrength() const;
544
550 void setEyeDomeLightingDistance( int distance );
552 int eyeDomeLightingDistance() const;
553
559 void setStopUpdates( bool enabled );
560
565 bool stopUpdates() const;
566
574 Q_DECL_DEPRECATED void setDebugShadowMapSettings( bool enabled, Qt::Corner corner, double size ) SIP_DEPRECATED;
575
580 Q_DECL_DEPRECATED bool debugShadowMapEnabled() const SIP_DEPRECATED;
581
586 Q_DECL_DEPRECATED Qt::Corner debugShadowMapCorner() const SIP_DEPRECATED;
587
592 Q_DECL_DEPRECATED double debugShadowMapSize() const SIP_DEPRECATED;
593
601 void setDebugDepthMapSettings( bool enabled, Qt::Corner corner, double size );
603 bool debugDepthMapEnabled() const;
605 Qt::Corner debugDepthMapCorner() const;
607 double debugDepthMapSize() const;
608
614 QList<QgsLightSource *> lightSources() const;
615
624 void setLightSources( const QList<QgsLightSource *> &lights SIP_TRANSFER );
625
630 double fieldOfView() const;
631
636 void setFieldOfView( double fieldOfView );
637
642 Qt3DRender::QCameraLens::ProjectionType projectionType() const SIP_SKIP;
643
648 void setProjectionType( const Qt3DRender::QCameraLens::ProjectionType projectionType ) SIP_SKIP;
649
650#ifndef SIP_RUN
651
657
662 void setCameraNavigationMode( Qgis::NavigationMode navigationMode );
663#endif
664
669 double cameraMovementSpeed() const;
670
675 void setCameraMovementSpeed( double movementSpeed );
676
682 void setOutputDpi( const double dpi );
683
689 double outputDpi() const;
690
696 Q_DECL_DEPRECATED QgsSkyboxSettings skyboxSettings() const SIP_SKIP;
697
703
709
718
727
733 Q_DECL_DEPRECATED void setSkyboxSettings( const QgsSkyboxSettings &skyboxSettings ) SIP_SKIP;
734
740
746
754 void setBloomSettings( const QgsBloomSettings &settings ) SIP_SKIP;
755
764
771 Q_DECL_DEPRECATED bool isSkyboxEnabled() const SIP_DEPRECATED;
772
779 Q_DECL_DEPRECATED void setIsSkyboxEnabled( bool enabled ) SIP_DEPRECATED;
780
786 Q_DECL_DEPRECATED bool isFpsCounterEnabled() const SIP_DEPRECATED;
787
793 Q_DECL_DEPRECATED void setIsFpsCounterEnabled( bool fpsCounterEnabled ) SIP_DEPRECATED;
794
800 bool terrainRenderingEnabled() const;
801
808
815 Qgis::RendererUsage rendererUsage() const;
816
823 void setRendererUsage( Qgis::RendererUsage rendererUsage );
824
830 Qgis::ViewSyncModeFlags viewSyncMode() const;
831
837 void setViewSyncMode( Qgis::ViewSyncModeFlags mode );
838
845
851 void setViewFrustumVisualizationEnabled( bool enabled );
852
858
863 void set3DAxisSettings( const Qgs3DAxisSettings &axisSettings, bool force = false ) SIP_SKIP;
864
870 bool isDebugOverlayEnabled() const;
871
880 void setIsDebugOverlayEnabled( bool debugOverlayEnabled );
881
887 bool showExtentIn2DView() const;
888
893 void setShowExtentIn2DView( bool show );
894
900 Q_DECL_DEPRECATED void setShowDebugPanel( bool enabled ) SIP_DEPRECATED;
901
907 Q_DECL_DEPRECATED bool showDebugPanel() const SIP_DEPRECATED;
908
915 bool is2DMapOverlayEnabled() const;
916
923 void setIs2DMapOverlayEnabled( bool enabled );
924
930 void setMsaaEnabled( bool enabled );
931
937 bool isMsaaEnabled() const;
938
945 Qgis::TextureFilterQuality textureFilterQuality() const { return mTextureFilterQuality; }
946
953 void setTextureFilterQuality( Qgis::TextureFilterQuality quality ) { mTextureFilterQuality = quality; }
954
955 signals:
956
963
968
976
979
986
992
997 Q_DECL_DEPRECATED void mapTileResolutionChanged() SIP_DEPRECATED;
998
1004
1011
1017 Q_DECL_DEPRECATED void terrainElevationOffsetChanged( double newElevation ) SIP_DEPRECATED;
1018
1024
1030
1036
1041
1047
1053
1059
1062
1068
1074
1080
1086
1092
1098
1104
1110
1116
1122
1128
1134
1140
1146
1152 Q_DECL_DEPRECATED void skyboxSettingsChanged() SIP_DEPRECATED;
1153
1159
1165
1171
1180
1189
1194 void fpsCounterEnabledChanged( bool fpsCounterEnabled );
1195
1202
1208
1213 void debugOverlayEnabledChanged( bool debugOverlayEnabled );
1214
1221
1228
1234 void showDebugPanelChanged( bool shown );
1235
1242
1249
1250 private:
1251#ifdef SIP_RUN
1253#endif
1254
1255 private:
1257 void connectChangedSignalsToSettingsChanged();
1258
1259 private:
1261 QgsVector3D mOrigin;
1263 QColor mBackgroundColor = Qt::black;
1264 QColor mSelectionColor;
1265 std::unique_ptr<QgsTerrainGenerator> mTerrainGenerator;
1266 std::unique_ptr<QgsAbstractTerrainSettings> mTerrainSettings;
1267 bool mTerrainShadingEnabled = false;
1268 QgsPhongMaterialSettings mTerrainShadingMaterial;
1269 QString mTerrainMapTheme;
1270 Qgis::Map3DDebugFlags mDebugFlags;
1271 bool mShowLabels = false;
1272 bool mStopUpdates = false;
1273 QList<QgsLightSource *> mLightSources;
1274 double mFieldOfView = 45.0;
1275 Qt3DRender::QCameraLens::ProjectionType mProjectionType = Qt3DRender::QCameraLens::PerspectiveProjection; //<! Camera lens projection type
1277 double mCameraMovementSpeed = 5.0;
1278 QList<QgsMapLayerRef> mLayers;
1280 QgsCoordinateTransformContext mTransformContext;
1281 QgsPathResolver mPathResolver;
1282 QgsMapThemeCollection *mMapThemes = nullptr;
1283 double mDpi = 96;
1284
1285 std::unique_ptr<QgsAbstract3DMapBackgroundSettings> mBackgroundSettings;
1286 QgsShadowSettings mShadowSettings;
1287 QgsAmbientOcclusionSettings mAmbientOcclusionSettings;
1288 QgsBloomSettings mBloomSettings;
1289 QgsColorGradingSettings mColorGradingSettings;
1290
1291 bool mEyeDomeLightingEnabled = false;
1292 double mEyeDomeLightingStrength = 1000.0;
1293 int mEyeDomeLightingDistance = 1;
1294
1295 bool mMsaaEnabled = false;
1297
1298 Qgis::ViewSyncModeFlags mViewSyncMode;
1299 bool mVisualizeViewFrustum = false;
1300
1301 bool mDebugDepthMapEnabled = false;
1302 Qt::Corner mDebugDepthMapCorner = Qt::Corner::BottomLeftCorner;
1303 double mDebugDepthMapSize = 0.2;
1304
1305 bool mTerrainRenderingEnabled = true;
1306
1307 Qgis::RendererUsage mRendererUsage;
1308
1309 Qgs3DAxisSettings m3dAxisSettings;
1310
1311 bool mIsDebugOverlayEnabled = false;
1312
1313 QgsRectangle mExtent;
1314
1315 bool mShowExtentIn2DView = false;
1316
1317 bool mShow2DMapOverlay = false;
1318};
1319
1320
1321#endif // QGS3DMAPSETTINGS_H
Provides global constants and enumerations for use throughout the application.
Definition qgis.h:62
TextureFilterQuality
Texture filtering qualities.
Definition qgis.h:4394
@ Trilinear
Trilinear (LinearMipmapLinear).
Definition qgis.h:4395
QFlags< ViewSyncModeFlag > ViewSyncModeFlags
Definition qgis.h:3663
NavigationMode
The navigation mode used by 3D cameras.
Definition qgis.h:4464
@ TerrainBased
The default navigation based on the terrain.
Definition qgis.h:4465
QFlags< Map3DDebugFlag > Map3DDebugFlags
Definition qgis.h:4329
RendererUsage
Usage of the renderer.
Definition qgis.h:3626
SceneMode
The 3D scene mode used in 3D map views.
Definition qgis.h:4477
Contains the configuration of a 3d axis.
void extentChanged()
Emitted when the 3d view's 2d extent has changed.
void setEyeDomeLightingStrength(double strength)
Sets the eye dome lighting strength value.
bool isDebugOverlayEnabled() const
Returns whether debug overlay is enabled.
Qt::Corner debugDepthMapCorner() const
Returns the corner where the shadow map preview is displayed.
void originChanged()
Emitted when the world's origin point has been shifted.
void setTransformContext(const QgsCoordinateTransformContext &context)
Sets the coordinate transform context, which stores various information regarding which datum transfo...
void settingsChanged()
Emitted when one of the configuration settings has changed.
void renderersChanged()
Emitted when the list of map's extra renderers have been modified.
void setColorGradingSettings(const QgsColorGradingSettings &settings)
Sets the current color grading settings.
void eyeDomeLightingDistanceChanged()
Emitted when the eye dome lighting distance has changed.
void readXml(const QDomElement &elem, const QgsReadWriteContext &context)
Reads configuration from a DOM element previously written by writeXml().
void terrainShadingChanged()
Emitted when terrain shading enabled flag or terrain shading material has changed.
bool isMsaaEnabled() const
Returns whether multisample anti-aliasing (MSAA) is enabled.
const QgsPathResolver & pathResolver() const
Returns the path resolver for conversion between relative and absolute paths during rendering operati...
void setAmbientOcclusionSettings(const QgsAmbientOcclusionSettings &ambientOcclusionSettings)
Sets the current configuration of screen space ambient occlusion.
void bloomSettingsChanged()
Emitted when the bloom lighting effect settings are changed.
Q_DECL_DEPRECATED void setShowTerrainTilesInfo(bool enabled)
Sets whether to display extra tile info on top of terrain tiles (for debugging).
QgsVector3D mapToWorldCoordinates(const QgsVector3D &mapCoords) const
Converts map coordinates to 3D world coordinates (applies offset and turns (x,y,z) into (x,...
bool showExtentIn2DView() const
Returns whether the extent is displayed on the main 2D map canvas.
double cameraMovementSpeed() const
Returns the camera movement speed.
QgsBloomSettings bloomSettings() const
Returns the current configuration of the bloom lighting effect.
Qt3DRender::QCameraLens::ProjectionType projectionType() const
Returns the camera lens' projection type.
void setEyeDomeLightingEnabled(bool enabled)
Sets whether eye dome lighting will be used.
void showDebugPanelChanged(bool shown)
Emitted when the Show debug panel checkbox changes value.
bool debugDepthMapEnabled() const
Returns whether the shadow map debugging is enabled.
Q_DECL_DEPRECATED bool isSkyboxEnabled() const
Returns whether the skybox is enabled.
void debugDepthMapSettingsChanged()
Emitted when depth map debugging has changed.
Q_DECL_DEPRECATED double terrainElevationOffset() const
Returns the elevation offset of the terrain (used to move the terrain up or down).
void setLightSources(const QList< QgsLightSource * > &lights)
Sets the list of light sources defined in the scene.
void backgroundSettingsChanged()
Emitted when background settings are changed.
double outputDpi() const
Returns DPI used for conversion between real world units (e.g.
Qgis::NavigationMode cameraNavigationMode() const
Returns the navigation mode used by the camera.
double eyeDomeLightingStrength() const
Returns the eye dome lighting strength value.
void backgroundColorChanged()
Emitted when the background color has changed.
void showTerrainBoundingBoxesChanged()
Emitted when the flag whether terrain's bounding boxes are shown has changed.
Q_DECL_DEPRECATED void setMaxTerrainGroundError(double error)
Sets the maximum ground error of terrain tiles in world units.
Q_DECL_DEPRECATED void terrainElevationOffsetChanged(double newElevation)
Emitted when the terrain elevation offset is changed.
Qgis::TextureFilterQuality textureFilterQuality() const
Returns the texture filtering quality.
Q_DECL_DEPRECATED Qt::Corner debugShadowMapCorner() const
Returns the corner where the shadow map preview is displayed.
void setMapThemeCollection(QgsMapThemeCollection *mapThemes)
Sets pointer to the collection of map themes.
QDomElement writeXml(QDomDocument &doc, const QgsReadWriteContext &context) const
Writes configuration to a DOM element, to be used later with readXml().
void setDebugDepthMapSettings(bool enabled, Qt::Corner corner, double size)
Sets the debugging settings of the depth map.
Q_DECL_DEPRECATED bool showCameraViewCenter() const
Returns whether to show camera's view center as a sphere (for debugging).
void showCameraRotationCenterChanged()
Emitted when the flag whether camera's rotation center is shown has changed.
QColor selectionColor() const
Returns color used for selected features.
void directionalLightsChanged()
Emitted when the list of directional lights changes.
void setTerrainShadingMaterial(const QgsPhongMaterialSettings &material)
Sets terrain shading material.
const QgsAbstractTerrainSettings * terrainSettings() const
Returns the terrain settings.
Q_DECL_DEPRECATED void maxTerrainScreenErrorChanged()
Emitted when the maximum terrain screen error has changed.
void cameraNavigationModeChanged()
Emitted when the camera navigation mode was changed.
void shadowSettingsChanged()
Emitted when shadow rendering settings are changed.
void show2DMapOverlayChanged()
Emitted when the 2D map overlay is enabled or disabled.
bool stopUpdates() const
Returns whether the scene updates on camera movement.
void setViewFrustumVisualizationEnabled(bool enabled)
Sets whether the camera's view frustum is visualized on the 2D map canvas.
Q_DECL_DEPRECATED void setShowCameraRotationCenter(bool enabled)
Sets whether to show camera's rotation center as a sphere (for debugging).
void setExtent(const QgsRectangle &extent)
Sets the 3D scene's 2D extent in the 3D scene's CRS, while also setting the scene's origin to the ext...
void eyeDomeLightingEnabledChanged()
Emitted when the flag whether eye dome lighting is used has changed.
Q_DECL_DEPRECATED void setTerrainVerticalScale(double zScale)
Sets vertical scale (exaggeration) of terrain (1 = true scale, > 1 = hills get more pronounced).
void debugOverlayEnabledChanged(bool debugOverlayEnabled)
Emitted when the debug overaly is enabled or disabled.
void setOutputDpi(const double dpi)
Sets DPI used for conversion between real world units (e.g.
void setFieldOfView(double fieldOfView)
Sets the camera lens' field of view.
Q_DECL_DEPRECATED void setIsSkyboxEnabled(bool enabled)
Sets whether the skybox is enabled.
Qgis::SceneMode sceneMode() const
Returns mode of the 3D scene - whether it is represented as a globe (when using Geocentric CRS such a...
void setShowLabels(bool enabled)
Sets whether to display labels on terrain tiles.
Q_DECL_DEPRECATED double terrainVerticalScale() const
Returns vertical scale (exaggeration) of terrain.
void setViewSyncMode(Qgis::ViewSyncModeFlags mode)
Sets the view sync mode (used to synchronize the 2D main map canvas and the 3D camera navigation).
void setOrigin(const QgsVector3D &origin)
Sets coordinates in map CRS at which our 3D world has origin (0,0,0).
void setDebugFlags(Qgis::Map3DDebugFlags flags)
Sets flags that control debugging options for the map.
Q_DECL_DEPRECATED void setSkyboxSettings(const QgsSkyboxSettings &skyboxSettings)
Sets the current configuration of the skybox.
Q_DECL_DEPRECATED void setMapTileResolution(int res)
Sets resolution (in pixels) of the texture of a terrain tile.
void setLayers(const QList< QgsMapLayer * > &layers)
Sets the list of 3D map layers to be rendered in the scene.
Q_DECL_DEPRECATED void setShowDebugPanel(bool enabled)
Sets whether the debug side panel is shown.
QgsShadowSettings shadowSettings() const
Returns the current configuration of shadows.
void terrainMapThemeChanged()
Emitted when terrain's map theme has changed.
void setShadowSettings(const QgsShadowSettings &shadowSettings)
Sets the current configuration of shadow rendering.
void msaaEnabledChanged()
Emitted when the MSAA enabled flag has changed.
void setIsDebugOverlayEnabled(bool debugOverlayEnabled)
Sets whether debug overlay is enabled The debug overlay displays some debugging and profiling informa...
void pointLightsChanged()
Emitted when the list of point lights changes.
QList< QgsLightSource * > lightSources() const
Returns list of directional light sources defined in the scene.
double debugDepthMapSize() const
Returns the size of the shadow map preview.
void setCrs(const QgsCoordinateReferenceSystem &crs)
Sets coordinate reference system used in the 3D scene.
Q_DECL_DEPRECATED double maxTerrainScreenError() const
Returns maximum allowed screen error of terrain tiles in pixels.
void setBackgroundSettings(QgsAbstract3DMapBackgroundSettings *settings)
Sets the background settings for the 3D scene.
Qgs3DAxisSettings get3DAxisSettings() const
Returns the current configuration of 3d axis.
void setEyeDomeLightingDistance(int distance)
Sets the eye dome lighting distance value (contributes to the contrast of the image.
Q_DECL_DEPRECATED void maxTerrainGroundErrorChanged()
Emitted when the maximum terrain ground error has changed.
bool viewFrustumVisualizationEnabled() const
Returns whether the camera's view frustum is visualized on the 2D map canvas.
Q_DECL_DEPRECATED void setShowLightSourceOrigins(bool enabled)
Sets whether to show light source origins as a sphere (for debugging).
Q_DECL_DEPRECATED bool showDebugPanel() const
Returns whether the debug side panel is shown.
double fieldOfView() const
Returns the camera lens' field of view.
bool is2DMapOverlayEnabled() const
Returns whether 2D map overlay is enabled.
void setIs2DMapOverlayEnabled(bool enabled)
Sets whether 2D map overlay is enabled.
void setShowExtentIn2DView(bool show)
Sets whether the extent is displayed on the main 2D map canvas.
void projectionTypeChanged()
Emitted when the camera lens projection type changes.
Q_DECL_DEPRECATED void debugShadowMapSettingsChanged()
Emitted when shadow map debugging has changed.
void selectionColorChanged()
Emitted when the selection color has changed.
QgsAmbientOcclusionSettings ambientOcclusionSettings() const
Returns the current configuration of screen space ambient occlusion.
QgsRectangle extent() const
Returns the 3D scene's 2D extent in the 3D scene's CRS.
void setTerrainShadingEnabled(bool enabled)
Sets whether terrain shading is enabled.
Qgis::ViewSyncModeFlags viewSyncMode() const
Returns the view sync mode (used to synchronize the 2D main map canvas and the 3D camera navigation).
Q_DECL_DEPRECATED void mapTileResolutionChanged()
Emitted when the map tile resoulution has changed.
void stopUpdatesChanged()
Emitted when the flag whether to keep updating scene has changed.
QgsColorGradingSettings colorGradingSettings() const
Returns the current color grading settings for the map.
Q_DECL_DEPRECATED void setDebugShadowMapSettings(bool enabled, Qt::Corner corner, double size)
Sets the debugging settings of the shadow map.
void setMsaaEnabled(bool enabled)
Sets whether multisample anti-aliasing (MSAA) is enabled.
int eyeDomeLightingDistance() const
Returns the eye dome lighting distance value (contributes to the contrast of the image).
void setSelectionColor(const QColor &color)
Sets color used for selected features.
void lightSourcesChanged()
Emitted when any of the light source settings in the map changes.
void showLightSourceOriginsChanged()
Emitted when the flag whether light source origins are shown has changed.
void setTextureFilterQuality(Qgis::TextureFilterQuality quality)
Sets the texture filtering quality.
QgsTerrainGenerator * terrainGenerator() const
Returns the terrain generator.
const QgsAbstract3DMapBackgroundSettings * backgroundSettings() const
Returns the background settings for the 3D scene, or null if no background is set.
void setCameraNavigationMode(Qgis::NavigationMode navigationMode)
Sets the navigation mode for the camera.
QColor backgroundColor() const
Returns background color of the 3D map view.
void terrainSettingsChanged()
Emitted when the terrain settings are changed.
void resolveReferences(const QgsProject &project)
Resolves references to other objects (map layers) after the call to readXml().
Qgis::Map3DDebugFlags debugFlags() const
Returns the flags that control debugging options for the map.
Q_DECL_DEPRECATED double debugShadowMapSize() const
Returns the size of the shadow map preview.
void setPathResolver(const QgsPathResolver &resolver)
Sets the path resolver for conversion between relative and absolute paths during rendering operations...
QgsVector3D worldToMapCoordinates(const QgsVector3D &worldCoords) const
Converts 3D world coordinates to map coordinates (applies offset and turns (x,y,z) into (x,...
Q_DECL_DEPRECATED bool showTerrainBoundingBoxes() const
Returns whether to display bounding boxes of terrain tiles (for debugging).
void showLabelsChanged()
Emitted when the flag whether labels are displayed on terrain tiles has changed.
Qgs3DMapSettings & operator=(Qgs3DMapSettings const &)=delete
void setStopUpdates(bool enabled)
Sets whether scene updates on camera movement should be enabled.
Q_DECL_DEPRECATED void setShowCameraViewCenter(bool enabled)
Sets whether to show camera's view center as a sphere (for debugging).
Q_DECL_DEPRECATED int mapTileResolution() const
Returns resolution (in pixels) of the texture of a terrain tile.
bool showLabels() const
Returns whether to display labels on terrain tiles.
void setTerrainSettings(QgsAbstractTerrainSettings *settings)
Sets the terrain settings.
void colorGradingSettingsChanged()
Emitted when the color grading settings are changed.
void set3DAxisSettings(const Qgs3DAxisSettings &axisSettings, bool force=false)
Sets the current configuration of 3d axis.
void setCameraMovementSpeed(double movementSpeed)
Sets the camera movement speed.
void setTerrainRenderingEnabled(bool terrainRenderingEnabled)
Sets whether the 2D terrain surface will be rendered in.
Q_DECL_DEPRECATED bool debugShadowMapEnabled() const
Returns whether the shadow map debugging is enabled.
Q_DECL_DEPRECATED void setMaxTerrainScreenError(double error)
Sets maximum allowed screen error of terrain tiles in pixels.
void setBackgroundColor(const QColor &color)
Sets background color of the 3D map view.
bool terrainRenderingEnabled() const
Returns whether the 2D terrain surface will be rendered.
void fpsCounterEnabledChanged(bool fpsCounterEnabled)
Emitted when the FPS counter is enabled or disabled.
void setBloomSettings(const QgsBloomSettings &settings)
Sets the current configuration of bloom lighting effect.
void axisSettingsChanged()
Emitted when 3d axis rendering settings are changed.
void viewFrustumVisualizationEnabledChanged()
Emitted when the camera's view frustum visualization on the main 2D map canvas is enabled or disabled...
void setProjectionType(const Qt3DRender::QCameraLens::ProjectionType projectionType)
Sets the camera lens' projection type.
void ambientOcclusionSettingsChanged()
Emitted when ambient occlusion rendering settings are changed.
Q_DECL_DEPRECATED bool showTerrainTilesInfo() const
Returns whether to display extra tile info on top of terrain tiles (for debugging).
void showExtentIn2DViewChanged()
Emitted when the parameter to display 3d view's extent in the 2D canvas has changed.
void configureTerrainFromProject(QgsProjectElevationProperties *properties, const QgsRectangle &fullExtent)
Configures the map's terrain settings directly from a project's elevation properties.
void layersChanged()
Emitted when the list of map layers for 3d rendering has changed.
void showTerrainTilesInfoChanged()
Emitted when the flag whether terrain's tile info is shown has changed.
void eyeDomeLightingStrengthChanged()
Emitted when the eye dome lighting strength has changed.
Q_DECL_DEPRECATED void skyboxSettingsChanged()
Emitted when skybox settings are changed.
Q_DECL_DEPRECATED QgsSkyboxSettings skyboxSettings() const
Returns the current configuration of the skybox.
Q_DECL_DEPRECATED double maxTerrainGroundError() const
Returns maximum ground error of terrain tiles in world units.
bool isTerrainShadingEnabled() const
Returns whether terrain shading is enabled.
void cameraMovementSpeedChanged()
Emitted when the camera movement speed was changed.
QgsCoordinateReferenceSystem crs() const
Returns coordinate reference system used in the 3D scene.
bool eyeDomeLightingEnabled() const
Returns whether eye dome lighting is used.
QgsPhongMaterialSettings terrainShadingMaterial() const
Returns terrain shading material.
void setRendererUsage(Qgis::RendererUsage rendererUsage)
Sets the renderer usage.
Q_DECL_DEPRECATED bool isFpsCounterEnabled() const
Returns whether FPS counter label is enabled.
QString terrainMapTheme() const
Returns name of the map theme (from the active project) that will be used for terrain's texture.
Q_DECL_DEPRECATED void setShowTerrainBoundingBoxes(bool enabled)
Sets whether to display bounding boxes of terrain tiles (for debugging).
void fieldOfViewChanged()
Emitted when the camera lens field of view changes.
Qgis::RendererUsage rendererUsage() const
Returns the renderer usage.
Q_DECL_DEPRECATED void setIsFpsCounterEnabled(bool fpsCounterEnabled)
Sets whether FPS counter label is enabled.
QgsMapThemeCollection * mapThemeCollection() const
Returns pointer to the collection of map themes.
QList< QgsMapLayer * > layers() const
Returns the list of 3D map layers to be rendered in the scene.
void setTerrainMapTheme(const QString &theme)
Sets name of the map theme.
Q_DECL_DEPRECATED void setTerrainElevationOffset(double offset)
Sets the terrain elevation offset (used to move the terrain up or down).
Q_DECL_DEPRECATED void terrainVerticalScaleChanged()
Emitted when the vertical scale of the terrain has changed.
void terrainGeneratorChanged()
Emitted when the terrain generator has changed.
Q_DECL_DEPRECATED bool showLightSourceOrigins() const
Returns whether to show light source origins as a sphere (for debugging).
void setTerrainGenerator(QgsTerrainGenerator *gen)
Sets terrain generator and sets extent() as the generator's extent.
void showCameraViewCenterChanged()
Emitted when the flag whether camera's view center is shown has changed.
QgsCoordinateTransformContext transformContext() const
Returns the coordinate transform context, which stores various information regarding which datum tran...
QgsVector3D origin() const
Returns coordinates in map CRS at which 3D scene has origin (0,0,0).
Q_DECL_DEPRECATED bool showCameraRotationCenter() const
Returns whether to show camera's rotation center as a sphere (for debugging).
Base class for all background settings classes used in a 3D map view.
Base class for all renderers that participate in 3D views.
Base class for all terrain settings classes.
Contains the configuration of ambient occlusion rendering.
Contains the configuration of the lighting "bloom" effect.
Contains the configuration of the scene's color grading settings, such as exposure and tone mapping.
Represents a coordinate reference system (CRS).
Contains information about the context in which a coordinate transform is executed.
Base class for light sources in 3d scenes.
Base class for all map layer types.
Definition qgsmaplayer.h:83
Container class that allows storage of map themes consisting of visible map layers and layer styles.
Resolves relative paths into absolute paths and vice versa.
Basic shading material used for rendering based on the Phong shading model with three color component...
Contains elevation properties for a QgsProject.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition qgsproject.h:114
Represents a raster layer.
A container for the context for various read/write operations on objects.
A rectangle specified with double values.
Contains configuration for rendering shadows.
Contains the configuration of a skybox entity.
QgsTemporalRangeObject(bool enabled=false)
Constructor QgsTemporalRangeObject.
Base class for generators of terrain.
A 3D vector (similar to QVector3D) with the difference that it uses double precision instead of singl...
Definition qgsvector3d.h:33
#define SIP_DEPRECATED
Definition qgis_sip.h:113
#define SIP_SKIP
Definition qgis_sip.h:133
#define SIP_TRANSFER
Definition qgis_sip.h:35