QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
16 #ifndef QGS3DMAPSETTINGS_H
17 #define QGS3DMAPSETTINGS_H
71 void resolveReferences(
const QgsProject &project );
150 void setBackgroundColor(
const QColor &color );
152 QColor backgroundColor()
const;
155 void setSelectionColor(
const QColor &color );
157 QColor selectionColor()
const;
170 void setLayers(
const QList<QgsMapLayer *> &layers );
183 QList<QgsMapLayer *> layers()
const;
201 void setTerrainLayers(
const QList<QgsMapLayer *> &layers );
215 QList<QgsMapLayer *> terrainLayers()
const;
221 void setTerrainVerticalScale(
double zScale );
223 double terrainVerticalScale()
const;
229 void setMapTileResolution(
int res );
235 int mapTileResolution()
const;
241 void setMaxTerrainScreenError(
float error );
250 float maxTerrainScreenError()
const;
256 void setMaxTerrainGroundError(
float error );
264 float maxTerrainGroundError()
const;
279 void setTerrainShadingEnabled(
bool enabled );
308 void setTerrainMapTheme(
const QString &theme );
323 void setRenderers(
const QList<QgsAbstract3DRenderer *> &renderers
SIP_TRANSFER );
325 QList<QgsAbstract3DRenderer *>
renderers()
const {
return mRenderers; }
328 void setShowTerrainBoundingBoxes(
bool enabled );
332 void setShowTerrainTilesInfo(
bool enabled );
340 void setShowCameraViewCenter(
bool enabled );
352 void setShowLightSourceOrigins(
bool enabled );
361 void setShowLabels(
bool enabled );
369 QList<QgsPointLightSettings>
pointLights()
const {
return mPointLights; }
381 void setPointLights(
const QList<QgsPointLightSettings> &pointLights );
387 void setDirectionalLights(
const QList<QgsDirectionalLightSettings> &directionalLights );
399 void setFieldOfView(
const float fieldOfView );
568 QColor mBackgroundColor = Qt::black;
569 QColor mSelectionColor;
570 double mTerrainVerticalScale = 1;
571 std::unique_ptr<QgsTerrainGenerator> mTerrainGenerator;
572 int mMapTileResolution = 512;
573 float mMaxTerrainScreenError = 3.f;
574 float mMaxTerrainGroundError = 1.f;
575 bool mTerrainShadingEnabled =
false;
577 QString mTerrainMapTheme;
578 bool mShowTerrainBoundingBoxes =
false;
579 bool mShowTerrainTileInfo =
false;
580 bool mShowCameraViewCenter =
false;
581 bool mShowLightSources =
false;
582 bool mShowLabels =
false;
583 QList<QgsPointLightSettings> mPointLights;
584 QList<QgsDirectionalLightSettings> mDirectionalLights;
585 float mFieldOfView = 45.0f;
586 QList<QgsMapLayerRef> mLayers;
587 QList<QgsMapLayerRef> mTerrainLayers;
588 QList<QgsAbstract3DRenderer *> mRenderers;
595 bool mIsSkyboxEnabled =
false;
601 #endif // QGS3DMAPSETTINGS_H
void backgroundColorChanged()
Emitted when the background color has changed.
bool showLightSourceOrigins() const
Returns whether to show light source origins as a sphere (for debugging)
QgsCoordinateReferenceSystem crs() const
Returns coordinate reference system used in the 3D scene.
Contains information about the context in which a coordinate transform is executed.
void directionalLightsChanged()
Emitted when the list of directional lights changes.
QgsPhongMaterialSettings terrainShadingMaterial() const
Returns terrain shading material.
The class is used as a container of context for various read/write operations on other objects.
double outputDpi() const
Returns DPI used for conversion between real world units (e.g.
QgsMapThemeCollection * mapThemeCollection() const
Returns pointer to the collection of map themes.
Base class for all renderers that may to participate in 3D view.
3 Class for storage of 3D vectors similar to QVector3D, with the difference that it uses double preci...
void showLightSourceOriginsChanged()
Emitted when the flag whether light source origins are shown has changed.
const QgsCoordinateReferenceSystem & crs
void showCameraViewCenterChanged()
Emitted when the flag whether camera's view center is shown has changed.
class containing the configuration of a skybox entity 3
void mapTileResolutionChanged()
Emitted when the map tile resoulution has changed.
void terrainGeneratorChanged()
Emitted when the terrain generator has changed.
Qgs3DMapSettings & operator=(Qgs3DMapSettings const &)=delete
void skyboxSettingsChanged()
Emitted when skybox settings are changed.
void renderersChanged()
Emitted when the list of map's extra renderers have been modified.
QString terrainMapTheme() const
Returns name of the map theme (from the active project) that will be used for terrain's texture.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
bool showLabels() const
Returns whether to display labels on terrain tiles.
3 Basic shading material used for rendering based on the Phong shading model with three color compone...
void maxTerrainScreenErrorChanged()
Emitted when the maximum terrain screen error has changed.
3 Base class for generators of terrain.
const QgsPathResolver & pathResolver() const
Returns the path resolver for conversion between relative and absolute paths during rendering operati...
void setOutputDpi(const double dpi)
Sets DPI used for conversion between real world units (e.g.
void terrainLayersChanged()
Emitted when the list of map layers for terrain texture has changed.
void setIsSkyboxEnabled(bool enabled)
Sets whether the skybox is enabled.
void terrainVerticalScaleChanged()
Emitted when the vertical scale of the terrain has changed.
void setOrigin(const QgsVector3D &origin)
Sets coordinates in map CRS at which our 3D world has origin (0,0,0)
3 Definition of the world
float fieldOfView() const
Returns the camera lens' field of view.
Represents a raster layer.
QgsVector3D origin() const
Returns coordinates in map CRS at which 3D scene has origin (0,0,0)
void fieldOfViewChanged()
Emitted when the camera lens field of view changes.
void pointLightsChanged()
Emitted when the list of point lights changes.
This class represents a coordinate reference system (CRS).
void shadowSettingsChanged()
Emitted when shadow rendering settings are changed.
QgsTerrainGenerator * terrainGenerator() const
Returns terrain generator. It takes care of producing terrain tiles from the input data.
void terrainShadingChanged()
Emitted when terrain shading enabled flag or terrain shading material has changed.
Qgs3DMapSettings()=default
Constructor for Qgs3DMapSettings.
void setPathResolver(const QgsPathResolver &resolver)
Sets the path resolver for conversion between relative and absolute paths during rendering operations...
void showTerrainBoundingBoxesChanged()
Emitted when the flag whether terrain's bounding boxes are shown has changed.
void setMapThemeCollection(QgsMapThemeCollection *mapThemes)
Sets pointer to the collection of map themes.
QgsShadowSettings shadowSettings() const
Returns the current configuration of shadows.
QList< QgsDirectionalLightSettings > directionalLights() const
Returns list of directional lights defined in the scene.
Base class for all map layer types.
QList< QgsAbstract3DRenderer * > renderers() const
Returns list of extra 3D renderers.
void selectionColorChanged()
Emitted when the selection color has changed.
class containing the configuration of shadows rendering 3
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)
void terrainMapThemeChanged()
Emitted when terrain's map theme has changed.
Container class that allows storage of map themes consisting of visible map layers and layer styles.
bool showCameraViewCenter() const
Returns whether to show camera's view center as a sphere (for debugging)
QgsSkyboxSettings skyboxSettings() const
Returns the current configuration of the skybox.
bool isSkyboxEnabled() const
Returns whether the skybox is enabled.
void maxTerrainGroundErrorChanged()
Emitted when the maximum terrain ground error has changed.
Resolves relative paths into absolute paths and vice versa.
Base class for objects with an associated (optional) temporal range.
QList< QgsPointLightSettings > pointLights() const
Returns list of point lights defined in the scene.
bool isTerrainShadingEnabled() const
Returns whether terrain shading is enabled.
void showLabelsChanged()
Emitted when the flag whether labels are displayed on terrain tiles has changed.
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.