17#include "moc_qgs3dmapsettings.cpp"
36#include <QDomDocument>
46 connectChangedSignalsToSettingsChanged();
47 mTerrainSettings = std::make_unique<QgsFlatTerrainSettings>();
53 , mOrigin( other.mOrigin )
55 , mBackgroundColor( other.mBackgroundColor )
56 , mSelectionColor( other.mSelectionColor )
57 , mTerrainShadingEnabled( other.mTerrainShadingEnabled )
58 , mTerrainShadingMaterial( other.mTerrainShadingMaterial )
59 , mTerrainMapTheme( other.mTerrainMapTheme )
60 , mShowTerrainBoundingBoxes( other.mShowTerrainBoundingBoxes )
61 , mShowTerrainTileInfo( other.mShowTerrainTileInfo )
62 , mShowCameraViewCenter( other.mShowCameraViewCenter )
63 , mShowCameraRotationCenter( other.mShowCameraRotationCenter )
64 , mShowLightSources( other.mShowLightSources )
65 , mShowLabels( other.mShowLabels )
66 , mStopUpdates( other.mStopUpdates )
67 , mShowDebugPanel( other.mShowDebugPanel )
68 , mFieldOfView( other.mFieldOfView )
69 , mProjectionType( other.mProjectionType )
70 , mCameraNavigationMode( other.mCameraNavigationMode )
71 , mCameraMovementSpeed( other.mCameraMovementSpeed )
72 , mLayers( other.mLayers )
73 , mTransformContext( other.mTransformContext )
74 , mPathResolver( other.mPathResolver )
75 , mMapThemes( other.mMapThemes )
77 , mIsFpsCounterEnabled( other.mIsFpsCounterEnabled )
78 , mIsSkyboxEnabled( other.mIsSkyboxEnabled )
79 , mSkyboxSettings( other.mSkyboxSettings )
80 , mShadowSettings( other.mShadowSettings )
81 , mAmbientOcclusionSettings( other.mAmbientOcclusionSettings )
82 , mEyeDomeLightingEnabled( other.mEyeDomeLightingEnabled )
83 , mEyeDomeLightingStrength( other.mEyeDomeLightingStrength )
84 , mEyeDomeLightingDistance( other.mEyeDomeLightingDistance )
85 , mViewSyncMode( other.mViewSyncMode )
86 , mVisualizeViewFrustum( other.mVisualizeViewFrustum )
87 , mDebugShadowMapEnabled( other.mDebugShadowMapEnabled )
88 , mDebugShadowMapCorner( other.mDebugShadowMapCorner )
89 , mDebugShadowMapSize( other.mDebugShadowMapSize )
90 , mDebugDepthMapEnabled( other.mDebugDepthMapEnabled )
91 , mDebugDepthMapCorner( other.mDebugDepthMapCorner )
92 , mDebugDepthMapSize( other.mDebugDepthMapSize )
93 , mTerrainRenderingEnabled( other.mTerrainRenderingEnabled )
94 , mRendererUsage( other.mRendererUsage )
95 , m3dAxisSettings( other.m3dAxisSettings )
96 , mIsDebugOverlayEnabled( other.mIsDebugOverlayEnabled )
97 , mExtent( other.mExtent )
98 , mShowExtentIn2DView( other.mShowExtentIn2DView )
102 for (
QgsLightSource *source : std::as_const( other.mLightSources ) )
105 mLightSources << source->clone();
111 connectChangedSignalsToSettingsChanged();
116 qDeleteAll( mLightSources );
124 QDomElement elemOrigin = elem.firstChildElement( QStringLiteral(
"origin" ) );
126 elemOrigin.attribute( QStringLiteral(
"x" ) ).toDouble(),
127 elemOrigin.attribute( QStringLiteral(
"y" ) ).toDouble(),
128 elemOrigin.attribute( QStringLiteral(
"z" ) ).toDouble()
131 QDomElement elemExtent = elem.firstChildElement( QStringLiteral(
"extent" ) );
132 if ( !elemExtent.isNull() )
135 elemExtent.attribute( QStringLiteral(
"xMin" ) ).toDouble(),
136 elemExtent.attribute( QStringLiteral(
"yMin" ) ).toDouble(),
137 elemExtent.attribute( QStringLiteral(
"xMax" ) ).toDouble(),
138 elemExtent.attribute( QStringLiteral(
"yMax" ) ).toDouble()
141 mShowExtentIn2DView = elemExtent.attribute( QStringLiteral(
"showIn2dView" ), QStringLiteral(
"0" ) ).toInt();
148 QDomElement elemCamera = elem.firstChildElement( QStringLiteral(
"camera" ) );
149 if ( !elemCamera.isNull() )
151 mFieldOfView = elemCamera.attribute( QStringLiteral(
"field-of-view" ), QStringLiteral(
"45" ) ).toFloat();
152 mProjectionType =
static_cast<Qt3DRender::QCameraLens::ProjectionType
>( elemCamera.attribute( QStringLiteral(
"projection-type" ), QStringLiteral(
"1" ) ).toInt() );
153 QString
cameraNavigationMode = elemCamera.attribute( QStringLiteral(
"camera-navigation-mode" ), QStringLiteral(
"basic-navigation" ) );
158 mCameraMovementSpeed = elemCamera.attribute( QStringLiteral(
"camera-movement-speed" ), QStringLiteral(
"5.0" ) ).toDouble();
161 QDomElement elemColor = elem.firstChildElement( QStringLiteral(
"color" ) );
162 if ( !elemColor.isNull() )
168 QDomElement elemCrs = elem.firstChildElement( QStringLiteral(
"crs" ) );
171 QDomElement elemTerrain = elem.firstChildElement( QStringLiteral(
"terrain" ) );
172 mTerrainRenderingEnabled = elemTerrain.attribute( QStringLiteral(
"terrain-rendering-enabled" ), QStringLiteral(
"1" ) ).toInt();
173 mTerrainShadingEnabled = elemTerrain.attribute( QStringLiteral(
"shading-enabled" ), QStringLiteral(
"0" ) ).toInt();
175 QDomElement elemTerrainShadingMaterial = elemTerrain.firstChildElement( QStringLiteral(
"shading-material" ) );
176 if ( !elemTerrainShadingMaterial.isNull() )
177 mTerrainShadingMaterial.
readXml( elemTerrainShadingMaterial, context );
178 mTerrainMapTheme = elemTerrain.attribute( QStringLiteral(
"map-theme" ) );
179 mShowLabels = elemTerrain.attribute( QStringLiteral(
"show-labels" ), QStringLiteral(
"0" ) ).toInt();
181 qDeleteAll( mLightSources );
182 mLightSources.clear();
183 const QDomElement lightsElem = elem.firstChildElement( QStringLiteral(
"lights" ) );
184 if ( !lightsElem.isNull() )
186 const QDomNodeList lightNodes = lightsElem.childNodes();
187 for (
int i = 0; i < lightNodes.size(); ++i )
189 const QDomElement lightElement = lightNodes.at( i ).toElement();
191 mLightSources << light;
197 QDomElement elemPointLights = elem.firstChildElement( QStringLiteral(
"point-lights" ) );
198 if ( !elemPointLights.isNull() )
200 QDomElement elemPointLight = elemPointLights.firstChildElement( QStringLiteral(
"point-light" ) );
201 while ( !elemPointLight.isNull() )
203 std::unique_ptr<QgsPointLightSettings> pointLight = std::make_unique<QgsPointLightSettings>();
204 pointLight->readXml( elemPointLight, context );
205 mLightSources << pointLight.release();
206 elemPointLight = elemPointLight.nextSiblingElement( QStringLiteral(
"point-light" ) );
212 std::unique_ptr<QgsPointLightSettings> defaultLight = std::make_unique<QgsPointLightSettings>();
213 defaultLight->setPosition(
QgsVector3D( 0, 1000, 0 ) );
214 mLightSources << defaultLight.release();
217 QDomElement elemDirectionalLights = elem.firstChildElement( QStringLiteral(
"directional-lights" ) );
218 if ( !elemDirectionalLights.isNull() )
220 QDomElement elemDirectionalLight = elemDirectionalLights.firstChildElement( QStringLiteral(
"directional-light" ) );
221 while ( !elemDirectionalLight.isNull() )
223 std::unique_ptr<QgsDirectionalLightSettings> directionalLight = std::make_unique<QgsDirectionalLightSettings>();
224 directionalLight->readXml( elemDirectionalLight, context );
225 mLightSources << directionalLight.release();
226 elemDirectionalLight = elemDirectionalLight.nextSiblingElement( QStringLiteral(
"directional-light" ) );
231 QDomElement elemMapLayers = elemTerrain.firstChildElement( QStringLiteral(
"layers" ) );
232 QDomElement elemMapLayer = elemMapLayers.firstChildElement( QStringLiteral(
"layer" ) );
233 QList<QgsMapLayerRef> mapLayers;
234 while ( !elemMapLayer.isNull() )
236 mapLayers <<
QgsMapLayerRef( elemMapLayer.attribute( QStringLiteral(
"id" ) ) );
237 elemMapLayer = elemMapLayer.nextSiblingElement( QStringLiteral(
"layer" ) );
241 QDomElement elemTerrainGenerator = elemTerrain.firstChildElement( QStringLiteral(
"generator" ) );
242 const QString terrainGenType = elemTerrainGenerator.attribute( QStringLiteral(
"type" ) );
250 QDomElement elemSkybox = elem.firstChildElement( QStringLiteral(
"skybox" ) );
251 mIsSkyboxEnabled = elemSkybox.attribute( QStringLiteral(
"skybox-enabled" ) ).toInt();
252 mSkyboxSettings.
readXml( elemSkybox, context );
254 QDomElement elemShadows = elem.firstChildElement( QStringLiteral(
"shadow-rendering" ) );
255 mShadowSettings.
readXml( elemShadows, context );
257 QDomElement elemAmbientOcclusion = elem.firstChildElement( QStringLiteral(
"screen-space-ambient-occlusion" ) );
258 mAmbientOcclusionSettings.
readXml( elemAmbientOcclusion, context );
260 QDomElement elemEyeDomeLighting = elem.firstChildElement( QStringLiteral(
"eye-dome-lighting" ) );
261 mEyeDomeLightingEnabled = elemEyeDomeLighting.attribute(
"enabled", QStringLiteral(
"0" ) ).toInt();
262 mEyeDomeLightingStrength = elemEyeDomeLighting.attribute(
"eye-dome-lighting-strength", QStringLiteral(
"1000.0" ) ).toDouble();
263 mEyeDomeLightingDistance = elemEyeDomeLighting.attribute(
"eye-dome-lighting-distance", QStringLiteral(
"1" ) ).toInt();
265 QDomElement elemNavigationSync = elem.firstChildElement( QStringLiteral(
"navigation-sync" ) );
266 mViewSyncMode = (
Qgis::ViewSyncModeFlags )( elemNavigationSync.attribute( QStringLiteral(
"view-sync-mode" ), QStringLiteral(
"0" ) ).toInt() );
267 mVisualizeViewFrustum = elemNavigationSync.attribute( QStringLiteral(
"view-frustum-visualization-enabled" ), QStringLiteral(
"0" ) ).toInt();
269 QDomElement elemDebugSettings = elem.firstChildElement( QStringLiteral(
"debug-settings" ) );
270 mDebugShadowMapEnabled = elemDebugSettings.attribute( QStringLiteral(
"shadowmap-enabled" ), QStringLiteral(
"0" ) ).toInt();
271 mDebugShadowMapCorner =
static_cast<Qt::Corner
>( elemDebugSettings.attribute( QStringLiteral(
"shadowmap-corner" ),
"0" ).toInt() );
272 mDebugShadowMapSize = elemDebugSettings.attribute( QStringLiteral(
"shadowmap-size" ), QStringLiteral(
"0.2" ) ).toDouble();
274 mDebugDepthMapEnabled = elemDebugSettings.attribute( QStringLiteral(
"depthmap-enabled" ), QStringLiteral(
"0" ) ).toInt();
275 mDebugDepthMapCorner =
static_cast<Qt::Corner
>( elemDebugSettings.attribute( QStringLiteral(
"depthmap-corner" ), QStringLiteral(
"1" ) ).toInt() );
276 mDebugDepthMapSize = elemDebugSettings.attribute( QStringLiteral(
"depthmap-size" ), QStringLiteral(
"0.2" ) ).toDouble();
278 QDomElement elemDebug = elem.firstChildElement( QStringLiteral(
"debug" ) );
279 mShowTerrainBoundingBoxes = elemDebug.attribute( QStringLiteral(
"bounding-boxes" ), QStringLiteral(
"0" ) ).toInt();
280 mShowTerrainTileInfo = elemDebug.attribute( QStringLiteral(
"terrain-tile-info" ), QStringLiteral(
"0" ) ).toInt();
281 mShowCameraViewCenter = elemDebug.attribute( QStringLiteral(
"camera-view-center" ), QStringLiteral(
"0" ) ).toInt();
282 mShowCameraRotationCenter = elemDebug.attribute( QStringLiteral(
"camera-rotation-center" ), QStringLiteral(
"0" ) ).toInt();
283 mShowLightSources = elemDebug.attribute( QStringLiteral(
"show-light-sources" ), QStringLiteral(
"0" ) ).toInt();
284 mIsFpsCounterEnabled = elemDebug.attribute( QStringLiteral(
"show-fps-counter" ), QStringLiteral(
"0" ) ).toInt();
285 mStopUpdates = elemDebug.attribute( QStringLiteral(
"stop-updates" ), QStringLiteral(
"0" ) ).toInt();
286 mShowDebugPanel = elemDebug.attribute( QStringLiteral(
"debug-panel" ), QStringLiteral(
"0" ) ).toInt();
288 QDomElement elemTemporalRange = elem.firstChildElement( QStringLiteral(
"temporal-range" ) );
289 QDateTime start = QDateTime::fromString( elemTemporalRange.attribute( QStringLiteral(
"start" ) ), Qt::ISODate );
290 QDateTime end = QDateTime::fromString( elemTemporalRange.attribute( QStringLiteral(
"end" ) ), Qt::ISODate );
293 QDomElement elem3dAxis = elem.firstChildElement( QStringLiteral(
"axis3d" ) );
294 m3dAxisSettings.
readXml( elem3dAxis, context );
301 QDomElement elem = doc.createElement( QStringLiteral(
"qgis3d" ) );
303 QDomElement elemOrigin = doc.createElement( QStringLiteral(
"origin" ) );
304 elemOrigin.setAttribute( QStringLiteral(
"x" ), QString::number( mOrigin.
x() ) );
305 elemOrigin.setAttribute( QStringLiteral(
"y" ), QString::number( mOrigin.
y() ) );
306 elemOrigin.setAttribute( QStringLiteral(
"z" ), QString::number( mOrigin.
z() ) );
307 elem.appendChild( elemOrigin );
309 QDomElement elemExtent = doc.createElement( QStringLiteral(
"extent" ) );
310 elemExtent.setAttribute( QStringLiteral(
"xMin" ), mExtent.
xMinimum() );
311 elemExtent.setAttribute( QStringLiteral(
"yMin" ), mExtent.
yMinimum() );
312 elemExtent.setAttribute( QStringLiteral(
"xMax" ), mExtent.
xMaximum() );
313 elemExtent.setAttribute( QStringLiteral(
"yMax" ), mExtent.
yMaximum() );
314 elemExtent.setAttribute( QStringLiteral(
"showIn2dView" ), mShowExtentIn2DView );
315 elem.appendChild( elemExtent );
317 QDomElement elemCamera = doc.createElement( QStringLiteral(
"camera" ) );
318 elemCamera.setAttribute( QStringLiteral(
"field-of-view" ), mFieldOfView );
319 elemCamera.setAttribute( QStringLiteral(
"projection-type" ),
static_cast<int>( mProjectionType ) );
320 switch ( mCameraNavigationMode )
323 elemCamera.setAttribute( QStringLiteral(
"camera-navigation-mode" ), QStringLiteral(
"terrain-based-navigation" ) );
326 elemCamera.setAttribute( QStringLiteral(
"camera-navigation-mode" ), QStringLiteral(
"walk-navigation" ) );
329 elemCamera.setAttribute( QStringLiteral(
"camera-movement-speed" ), mCameraMovementSpeed );
330 elem.appendChild( elemCamera );
332 QDomElement elemColor = doc.createElement( QStringLiteral(
"color" ) );
335 elem.appendChild( elemColor );
337 QDomElement elemCrs = doc.createElement( QStringLiteral(
"crs" ) );
339 elem.appendChild( elemCrs );
341 QDomElement elemTerrain = doc.createElement( QStringLiteral(
"terrain" ) );
342 elemTerrain.setAttribute( QStringLiteral(
"terrain-rendering-enabled" ), mTerrainRenderingEnabled ? 1 : 0 );
343 elemTerrain.setAttribute( QStringLiteral(
"shading-enabled" ), mTerrainShadingEnabled ? 1 : 0 );
345 QDomElement elemTerrainShadingMaterial = doc.createElement( QStringLiteral(
"shading-material" ) );
346 mTerrainShadingMaterial.
writeXml( elemTerrainShadingMaterial, context );
347 elemTerrain.appendChild( elemTerrainShadingMaterial );
348 elemTerrain.setAttribute( QStringLiteral(
"map-theme" ), mTerrainMapTheme );
349 elemTerrain.setAttribute( QStringLiteral(
"show-labels" ), mShowLabels ? 1 : 0 );
352 QDomElement elemLights = doc.createElement( QStringLiteral(
"lights" ) );
355 const QDomElement elemLight = light->writeXml( doc, context );
356 elemLights.appendChild( elemLight );
358 elem.appendChild( elemLights );
361 QDomElement elemMapLayers = doc.createElement( QStringLiteral(
"layers" ) );
364 QDomElement elemMapLayer = doc.createElement( QStringLiteral(
"layer" ) );
365 elemMapLayer.setAttribute( QStringLiteral(
"id" ), layerRef.layerId );
366 elemMapLayers.appendChild( elemMapLayer );
368 elemTerrain.appendChild( elemMapLayers );
370 QDomElement elemTerrainGenerator = doc.createElement( QStringLiteral(
"generator" ) );
371 elemTerrainGenerator.setAttribute( QStringLiteral(
"type" ), mTerrainSettings->type() );
372 mTerrainSettings->writeXml( elemTerrain, context );
373 elemTerrain.appendChild( elemTerrainGenerator );
374 elem.appendChild( elemTerrain );
376 QDomElement elemSkybox = doc.createElement( QStringLiteral(
"skybox" ) );
377 elemSkybox.setAttribute( QStringLiteral(
"skybox-enabled" ), mIsSkyboxEnabled );
378 mSkyboxSettings.
writeXml( elemSkybox, context );
379 elem.appendChild( elemSkybox );
381 QDomElement elemShadows = doc.createElement( QStringLiteral(
"shadow-rendering" ) );
382 mShadowSettings.
writeXml( elemShadows, context );
383 elem.appendChild( elemShadows );
385 QDomElement elemAmbientOcclusion = doc.createElement( QStringLiteral(
"screen-space-ambient-occlusion" ) );
386 mAmbientOcclusionSettings.
writeXml( elemAmbientOcclusion, context );
387 elem.appendChild( elemAmbientOcclusion );
389 QDomElement elemDebug = doc.createElement( QStringLiteral(
"debug" ) );
390 elemDebug.setAttribute( QStringLiteral(
"bounding-boxes" ), mShowTerrainBoundingBoxes ? 1 : 0 );
391 elemDebug.setAttribute( QStringLiteral(
"terrain-tile-info" ), mShowTerrainTileInfo ? 1 : 0 );
392 elemDebug.setAttribute( QStringLiteral(
"camera-view-center" ), mShowCameraViewCenter ? 1 : 0 );
393 elemDebug.setAttribute( QStringLiteral(
"camera-rotation-center" ), mShowCameraRotationCenter ? 1 : 0 );
394 elemDebug.setAttribute( QStringLiteral(
"show-light-sources" ), mShowLightSources ? 1 : 0 );
395 elemDebug.setAttribute( QStringLiteral(
"show-fps-counter" ), mIsFpsCounterEnabled ? 1 : 0 );
396 elemDebug.setAttribute( QStringLiteral(
"stop-updates" ), mStopUpdates ? 1 : 0 );
397 elemDebug.setAttribute( QStringLiteral(
"debug-panel" ), mShowDebugPanel ? 1 : 0 );
398 elem.appendChild( elemDebug );
400 QDomElement elemEyeDomeLighting = doc.createElement( QStringLiteral(
"eye-dome-lighting" ) );
401 elemEyeDomeLighting.setAttribute( QStringLiteral(
"enabled" ), mEyeDomeLightingEnabled ? 1 : 0 );
402 elemEyeDomeLighting.setAttribute( QStringLiteral(
"eye-dome-lighting-strength" ), mEyeDomeLightingStrength );
403 elemEyeDomeLighting.setAttribute( QStringLiteral(
"eye-dome-lighting-distance" ), mEyeDomeLightingDistance );
404 elem.appendChild( elemEyeDomeLighting );
406 QDomElement elemNavigationSync = doc.createElement( QStringLiteral(
"navigation-sync" ) );
407 elemNavigationSync.setAttribute( QStringLiteral(
"view-sync-mode" ), ( int ) mViewSyncMode );
408 elemNavigationSync.setAttribute( QStringLiteral(
"view-frustum-visualization-enabled" ), mVisualizeViewFrustum ? 1 : 0 );
409 elem.appendChild( elemNavigationSync );
411 QDomElement elemDebugSettings = doc.createElement( QStringLiteral(
"debug-settings" ) );
412 elemDebugSettings.setAttribute( QStringLiteral(
"shadowmap-enabled" ), mDebugShadowMapEnabled );
413 elemDebugSettings.setAttribute( QStringLiteral(
"shadowmap-corner" ), mDebugShadowMapCorner );
414 elemDebugSettings.setAttribute( QStringLiteral(
"shadowmap-size" ), mDebugShadowMapSize );
415 elemDebugSettings.setAttribute( QStringLiteral(
"depthmap-enabled" ), mDebugDepthMapEnabled );
416 elemDebugSettings.setAttribute( QStringLiteral(
"depthmap-corner" ), mDebugDepthMapCorner );
417 elemDebugSettings.setAttribute( QStringLiteral(
"depthmap-size" ), mDebugDepthMapSize );
418 elem.appendChild( elemDebugSettings );
420 QDomElement elemTemporalRange = doc.createElement( QStringLiteral(
"temporal-range" ) );
421 elemTemporalRange.setAttribute( QStringLiteral(
"start" ),
temporalRange().
begin().toString( Qt::ISODate ) );
422 elemTemporalRange.setAttribute( QStringLiteral(
"end" ),
temporalRange().
end().toString( Qt::ISODate ) );
424 QDomElement elem3dAxis = doc.createElement( QStringLiteral(
"axis3d" ) );
425 m3dAxisSettings.
writeXml( elem3dAxis, context );
426 elem.appendChild( elem3dAxis );
435 for (
int i = 0; i < mLayers.count(); ++i )
441 if ( mTerrainSettings )
443 mTerrainSettings->resolveReferences( &project );
471 if ( mTerrainGenerator )
474 mTerrainGenerator->setExtent( terrainExtent );
529 return mTransformContext;
536 mTransformContext = context;
543 return mPathResolver;
550 mPathResolver = resolver;
564 mMapThemes = mapThemes;
571 if ( color == mBackgroundColor )
574 mBackgroundColor = color;
582 return mBackgroundColor;
589 if ( color == mSelectionColor )
592 mSelectionColor = color;
600 return mSelectionColor;
607 if ( zScale == mTerrainSettings->verticalScale() )
610 mTerrainSettings->setVerticalScale( zScale );
621 return mTerrainSettings->verticalScale();
628 const QList<QgsMapLayer *> raw = _qgis_listRefToRaw( mLayers );
633 mLayers = _qgis_listRawToRef(
layers );
641 QList<QgsMapLayer *> lst;
642 lst.reserve( mLayers.count() );
645 if ( layerRef.layer )
646 lst.append( layerRef.layer );
668 return mTerrainSettings.get();
675 bool hasChanged =
false;
676 if ( settings == mTerrainSettings.get() )
683 hasChanged = !settings->
equals( mTerrainSettings.get() );
684 mTerrainSettings.reset( settings );
712 if ( mTerrainSettings->mapTileResolution() == res )
715 mTerrainSettings->setMapTileResolution( res );
726 return mTerrainSettings->mapTileResolution();
733 if ( mTerrainSettings->maximumScreenError() == error )
736 mTerrainSettings->setMaximumScreenError( error );
747 return mTerrainSettings->maximumScreenError();
754 if ( mTerrainSettings->maximumGroundError() == error )
757 mTerrainSettings->setMaximumGroundError( error );
769 if ( mTerrainSettings->elevationOffset() == offset )
771 mTerrainSettings->setElevationOffset( offset );
782 return mTerrainSettings->elevationOffset();
789 return mTerrainSettings->maximumGroundError();
796 if ( mTerrainGenerator )
806 mTerrainGenerator.reset( gen );
816 return mTerrainGenerator.get();
823 if ( mTerrainShadingEnabled == enabled )
826 mTerrainShadingEnabled = enabled;
834 return mTerrainShadingEnabled;
841 if ( mTerrainShadingMaterial == material )
844 mTerrainShadingMaterial = material;
852 return mTerrainShadingMaterial;
859 if ( mTerrainMapTheme == theme )
862 mTerrainMapTheme = theme;
870 return mTerrainMapTheme;
877 if ( mShowTerrainBoundingBoxes == enabled )
880 mShowTerrainBoundingBoxes = enabled;
888 return mShowTerrainBoundingBoxes;
896 if ( mShowTerrainTileInfo == enabled )
899 mShowTerrainTileInfo = enabled;
907 return mShowTerrainTileInfo;
914 if ( mShowCameraViewCenter == enabled )
917 mShowCameraViewCenter = enabled;
925 return mShowCameraViewCenter;
932 if ( mShowCameraRotationCenter == enabled )
935 mShowCameraRotationCenter = enabled;
943 return mShowCameraRotationCenter;
950 if ( mShowLightSources == enabled )
953 mShowLightSources = enabled;
961 return mShowLightSources;
968 if ( mShowLabels == enabled )
971 mShowLabels = enabled;
986 if ( mStopUpdates == enabled )
989 mStopUpdates = enabled;
1004 if ( mEyeDomeLightingEnabled == enabled )
1006 mEyeDomeLightingEnabled = enabled;
1014 return mEyeDomeLightingEnabled;
1021 if ( mEyeDomeLightingStrength == strength )
1023 mEyeDomeLightingStrength = strength;
1031 return mEyeDomeLightingStrength;
1038 if ( mEyeDomeLightingDistance == distance )
1040 mEyeDomeLightingDistance = distance;
1048 return mEyeDomeLightingDistance;
1055 return mLightSources;
1063 if ( mLightSources.count() == lights.count() )
1066 for (
int i = 0; i < mLightSources.count(); ++i )
1068 if ( mLightSources[i]->type() == lights[i]->type() )
1070 switch ( mLightSources[i]->type() )
1087 qDeleteAll( lights );
1092 qDeleteAll( mLightSources );
1093 mLightSources = lights;
1104 return mFieldOfView;
1122 return mProjectionType;
1140 return mCameraNavigationMode;
1147 if ( mCameraNavigationMode == navigationMode )
1150 mCameraNavigationMode = navigationMode;
1158 return mCameraMovementSpeed;
1165 if ( mCameraMovementSpeed == movementSpeed )
1168 mCameraMovementSpeed = movementSpeed;
1190 return mSkyboxSettings;
1197 return mShadowSettings;
1204 return mAmbientOcclusionSettings;
1235 return mIsSkyboxEnabled;
1242 mIsSkyboxEnabled = enabled;
1249 return mIsFpsCounterEnabled;
1256 if ( mShowDebugPanel == enabled )
1259 mShowDebugPanel = enabled;
1267 return mShowDebugPanel;
1274 mDebugShadowMapEnabled = enabled;
1275 mDebugShadowMapCorner = corner;
1276 mDebugShadowMapSize = size;
1284 return mDebugShadowMapEnabled;
1291 return mDebugShadowMapCorner;
1298 return mDebugShadowMapSize;
1305 mDebugDepthMapEnabled = enabled;
1306 mDebugDepthMapCorner = corner;
1307 mDebugDepthMapSize = size;
1315 return mDebugDepthMapEnabled;
1322 return mDebugDepthMapCorner;
1329 return mDebugDepthMapSize;
1336 if ( fpsCounterEnabled == mIsFpsCounterEnabled )
1338 mIsFpsCounterEnabled = fpsCounterEnabled;
1346 return mTerrainRenderingEnabled;
1363 return mRendererUsage;
1377 return mViewSyncMode;
1384 mViewSyncMode = mode;
1391 return mVisualizeViewFrustum;
1398 if ( mVisualizeViewFrustum != enabled )
1400 mVisualizeViewFrustum = enabled;
1409 return m3dAxisSettings;
1416 if ( debugOverlayEnabled == mIsDebugOverlayEnabled )
1419 mIsDebugOverlayEnabled = debugOverlayEnabled;
1427 return mShowExtentIn2DView;
1430void Qgs3DMapSettings::connectChangedSignalsToSettingsChanged()
1472 if ( axisSettings == m3dAxisSettings )
1484 m3dAxisSettings = axisSettings;
1493 return mIsDebugOverlayEnabled;
1500 if ( show == mShowExtentIn2DView )
1503 mShowExtentIn2DView = show;
QFlags< ViewSyncModeFlag > ViewSyncModeFlags
NavigationMode
The navigation mode used by 3D cameras.
@ TerrainBased
The default navigation based on the terrain.
@ Walk
Uses WASD keys or arrows to navigate in walking (first person) manner.
RendererUsage
Usage of the renderer.
@ Point
Point light source.
@ Directional
Directional light source.
Contains the configuration of a 3d axis.
void readXml(const QDomElement &element, const QgsReadWriteContext &context)
Reads settings from a DOM element.
void writeXml(QDomElement &element, const QgsReadWriteContext &context) const
Writes settings to a DOM element.
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 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.
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 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.
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.
bool isSkyboxEnabled() const
Returns whether the skybox is enabled.
void setFieldOfView(const float fieldOfView)
Sets the camera lens' field of view.
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.
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.
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.
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.
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.
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 setIsSkyboxEnabled(bool enabled)
Sets whether the skybox is enabled.
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 setSkyboxSettings(const QgsSkyboxSettings &skyboxSettings)
Sets the current configuration of the skybox.
void skyboxSettingsChanged()
Emitted when skybox settings are changed.
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.
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 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.
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.
void setShowLightSourceOrigins(bool enabled)
Sets whether to show light source origins as a sphere (for debugging)
bool showDebugPanel() const
Returns whether the debug side panel is shown.
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.
float fieldOfView() const
Returns the camera lens' field of view.
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.
void setDebugShadowMapSettings(bool enabled, Qt::Corner corner, double size)
Sets the debugging settings of the shadow map.
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.
QgsTerrainGenerator * terrainGenerator() const
Returns the terrain generator.
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()
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,...
bool showTerrainBoundingBoxes() const
Returns whether to display bounding boxes of terrain tiles (for debugging)
~Qgs3DMapSettings() override
void showLabelsChanged()
Emitted when the flag whether labels are displayed on terrain tiles has changed.
void setStopUpdates(bool enabled)
Sets whether scene updates on camera movement should be enabled.
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 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.
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 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.
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.
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.
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.
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.
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.
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 debugShadowMapSettingsChanged()
Emitted when shadow map debugging has changed.
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).
bool showCameraRotationCenter() const
Returns whether to show camera's rotation center as a sphere (for debugging)
static Qgs3DRenderContext fromMapSettings(const Qgs3DMapSettings *mapSettings)
Creates an initialized Qgs3DRenderContext instance from given Qgs3DMapSettings.
static QgsRectangle tryReprojectExtent2D(const QgsRectangle &extent, const QgsCoordinateReferenceSystem &crs1, const QgsCoordinateReferenceSystem &crs2, const QgsCoordinateTransformContext &context)
Reprojects extent from crs1 to crs2 coordinate reference system with context context.
static QgsVector3D worldToMapCoordinates(const QgsVector3D &worldCoords, const QgsVector3D &origin)
Converts 3D world coordinates to map coordinates (applies offset)
static QgsVector3D mapToWorldCoordinates(const QgsVector3D &mapCoords, const QgsVector3D &origin)
Converts map coordinates to 3D world coordinates (applies offset)
static Qgs3DTerrainRegistry * terrainRegistry()
Returns the terrain registry, used for managing 3D terrains.
virtual void readXml(const QDomElement &element, const QgsReadWriteContext &context)=0
Reads settings from a DOM element.
virtual bool equals(const QgsAbstractTerrainSettings *other) const =0
Returns true if this settings is exactly equal to another other settings.
class containing the configuration of ambient occlusion rendering 3
void writeXml(QDomElement &element, const QgsReadWriteContext &context) const
Writes settings to a DOM element.
void readXml(const QDomElement &element, const QgsReadWriteContext &context)
Reads settings from a DOM element.
static QColor colorFromString(const QString &string)
Decodes a string into a color value.
static QString colorToString(const QColor &color)
Encodes a color into a string value.
This class represents a coordinate reference system (CRS).
bool isValid() const
Returns whether this CRS is correctly initialized and usable.
bool readXml(const QDomNode &node)
Restores state from the given DOM node.
bool writeXml(QDomNode &node, QDomDocument &doc) const
Stores state to the given Dom node in the given document.
Contains information about the context in which a coordinate transform is executed.
static QgsLightSource * createFromXml(const QDomElement &element, const QgsReadWriteContext &context)
Creates a new light source from an XML element.
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.
void writeXml(QDomElement &elem, const QgsReadWriteContext &context) const override
Writes settings to a DOM element.
void readXml(const QDomElement &elem, const QgsReadWriteContext &context) override
Reads settings from a DOM element.
A class to represent a 2D point.
Temporarily blocks QgsProject "dirtying" for the lifetime of the object.
Contains elevation properties for a QgsProject.
QgsReferencedRectangle fullExtent() const
Returns the full extent of the project, which represents the maximal limits of the project.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
static QgsProject * instance()
Returns the QgsProject singleton instance.
Q_INVOKABLE QgsMapLayer * mapLayer(const QString &layerId) const
Retrieve a pointer to a registered layer by layer ID.
void setDirty(bool b=true)
Flag the project as dirty (modified).
const QgsProjectViewSettings * viewSettings() const
Returns the project's view settings, which contains settings and properties relating to how a QgsProj...
The class is used as a container of context for various read/write operations on other objects.
A rectangle specified with double values.
class containing the configuration of shadows rendering 3
void writeXml(QDomElement &element, const QgsReadWriteContext &context) const
Writes settings to a DOM element.
void readXml(const QDomElement &element, const QgsReadWriteContext &context)
Reads settings from a DOM element.
Contains the configuration of a skybox entity.
void readXml(const QDomElement &element, const QgsReadWriteContext &context)
Reads settings from a DOM element.
void writeXml(QDomElement &element, const QgsReadWriteContext &context) const
Writes settings to a DOM element.
Base class for objects with an associated (optional) temporal range.
const QgsDateTimeRange & temporalRange() const
Returns the datetime range for the object.
void setTemporalRange(const QgsDateTimeRange &range)
Sets the temporal range for the object.
T begin() const
Returns the beginning of the range.
T end() const
Returns the upper bound of the range.
void terrainChanged()
Emitted when the terrain changed (for example, raster DEM or mesh have data changed)
virtual void setExtent(const QgsRectangle &extent)
sets the extent of the terrain in terrain's CRS
virtual QgsCoordinateReferenceSystem crs() const
Returns CRS of the terrain.
Class for storage of 3D vectors similar to QVector3D, with the difference that it uses double precisi...
double y() const
Returns Y coordinate.
double z() const
Returns Z coordinate.
double x() const
Returns X coordinate.
#define Q_NOWARN_DEPRECATED_POP
#define Q_NOWARN_DEPRECATED_PUSH
_LayerRef< QgsMapLayer > QgsMapLayerRef
QgsTemporalRange< QDateTime > QgsDateTimeRange
QgsRange which stores a range of date times.
#define QGIS_PROTECT_QOBJECT_THREAD_ACCESS
const QgsCoordinateReferenceSystem & crs
void setLayer(TYPE *l)
Sets the reference to point to a specified layer.
QString layerId
Original layer ID.