16 #ifndef QGS3DMAPSETTINGS_H 17 #define QGS3DMAPSETTINGS_H 66 void resolveReferences(
const QgsProject &project );
145 void setBackgroundColor(
const QColor &color );
147 QColor backgroundColor()
const;
150 void setSelectionColor(
const QColor &color );
152 QColor selectionColor()
const;
162 void setTerrainVerticalScale(
double zScale );
164 double terrainVerticalScale()
const;
170 void setLayers(
const QList<QgsMapLayer *> &layers );
176 QList<QgsMapLayer *> layers()
const;
182 void setMapTileResolution(
int res );
188 int mapTileResolution()
const;
194 void setMaxTerrainScreenError(
float error );
203 float maxTerrainScreenError()
const;
209 void setMaxTerrainGroundError(
float error );
217 float maxTerrainGroundError()
const;
232 void setTerrainShadingEnabled(
bool enabled );
261 void setTerrainMapTheme(
const QString &theme );
276 void setRenderers(
const QList<QgsAbstract3DRenderer *> &renderers SIP_TRANSFER );
278 QList<QgsAbstract3DRenderer *>
renderers()
const {
return mRenderers; }
286 void setSkybox(
bool enabled,
const QString &fileBase = QString(),
const QString &fileExtension = QString() );
295 void setShowTerrainBoundingBoxes(
bool enabled );
299 void setShowTerrainTilesInfo(
bool enabled );
307 void setShowCameraViewCenter(
bool enabled );
315 void setShowLabels(
bool enabled );
323 QList<QgsPointLightSettings>
pointLights()
const {
return mPointLights; }
329 void setPointLights(
const QList<QgsPointLightSettings> &pointLights );
341 void setFieldOfView(
const float fieldOfView );
360 void backgroundColorChanged();
362 void selectionColorChanged();
364 void layersChanged();
366 void terrainGeneratorChanged();
368 void terrainVerticalScaleChanged();
370 void mapTileResolutionChanged();
372 void maxTerrainScreenErrorChanged();
374 void maxTerrainGroundErrorChanged();
380 void terrainShadingChanged();
386 void terrainMapThemeChanged();
392 void renderersChanged();
395 void showTerrainBoundingBoxesChanged();
397 void showTerrainTilesInfoChanged();
403 void showCameraViewCenterChanged();
405 void showLabelsChanged();
411 void pointLightsChanged();
417 void fieldOfViewChanged();
423 QColor mBackgroundColor = Qt::black;
424 QColor mSelectionColor;
425 double mTerrainVerticalScale = 1;
426 std::unique_ptr<QgsTerrainGenerator> mTerrainGenerator;
427 int mMapTileResolution = 512;
428 float mMaxTerrainScreenError = 3.f;
429 float mMaxTerrainGroundError = 1.f;
430 bool mTerrainShadingEnabled =
false;
432 QString mTerrainMapTheme;
433 bool mShowTerrainBoundingBoxes =
false;
434 bool mShowTerrainTileInfo =
false;
435 bool mShowCameraViewCenter =
false;
436 bool mShowLabels =
false;
437 QList<QgsPointLightSettings> mPointLights;
438 float mFieldOfView = 45.0f;
439 QList<QgsMapLayerRef> mLayers;
440 QList<QgsAbstract3DRenderer *> mRenderers;
441 bool mSkyboxEnabled =
false;
442 QString mSkyboxFileBase;
443 QString mSkyboxFileExtension;
452 #endif // QGS3DMAPSETTINGS_H The class is used as a container of context for various read/write operations on other objects...
3 Class for storage of 3D vectors similar to QVector3D, with the difference that it uses double preci...
Base class for all map layer types.
bool showTerrainBoundingBoxes() const
Returns whether to display bounding boxes of terrain tiles (for debugging)
QgsCoordinateReferenceSystem crs() const
Returns coordinate reference system used in the 3D scene.
QgsMapThemeCollection * mapThemeCollection() const
Returns pointer to the collection of map themes.
bool isTerrainShadingEnabled() const
Returns whether terrain shading is enabled.
Base class for all renderers that may to participate in 3D view.
void setOutputDpi(const double dpi)
Sets DPI used for conversion between real world units (e.g.
QgsPhongMaterialSettings terrainShadingMaterial() const
Returns terrain shading material.
bool showCameraViewCenter() const
Returns whether to show camera's view center as a sphere (for debugging)
This class provides qgis with the ability to render raster datasets onto the mapcanvas.
QString skyboxFileBase() const
Returns base part of filenames of skybox (see setSkybox())
const QgsPathResolver & pathResolver() const
Returns the path resolver for conversion between relative and absolute paths during rendering operati...
QList< QgsPointLightSettings > pointLights() const
Returns list of point lights defined in the scene.
const QgsCoordinateReferenceSystem & crs
3 Basic shading material used for rendering based on the Phong shading model with three color compone...
3 Definition of the world
QgsVector3D origin() const
Returns coordinates in map CRS at which 3D scene has origin (0,0,0)
QString terrainMapTheme() const
Returns name of the map theme (from the active project) that will be used for terrain's texture...
bool hasSkyboxEnabled() const
Returns whether skybox is enabled.
bool showTerrainTilesInfo() const
Returns whether to display extra tile info on top of terrain tiles (for debugging) ...
Encapsulates a QGIS project, including sets of map layers and their styles, layouts, annotations, canvases, etc.
Contains information about the context in which a coordinate transform is executed.
void setOrigin(const QgsVector3D &origin)
Sets coordinates in map CRS at which our 3D world has origin (0,0,0)
void setMapThemeCollection(QgsMapThemeCollection *mapThemes)
Sets pointer to the collection of map themes.
bool showLabels() const
Returns whether to display labels on terrain tiles.
void setPathResolver(const QgsPathResolver &resolver)
Sets the path resolver for conversion between relative and absolute paths during rendering operations...
3 Base class for generators of terrain.
QList< QgsAbstract3DRenderer * > renderers() const
Returns list of extra 3D renderers.
This class represents a coordinate reference system (CRS).
QString skyboxFileExtension() const
Returns extension part of filenames of skybox (see setSkybox())
double outputDpi() const
Returns DPI used for conversion between real world units (e.g.
float fieldOfView() const
Returns the camera lens' field of view.
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.
QgsTerrainGenerator * terrainGenerator() const
Returns terrain generator. It takes care of producing terrain tiles from the input data...