Class: Qgs3DMapScene¶
- class qgis._3d.Qgs3DMapScene¶
Bases:
PyQt5.QtCore.QObject
Entity that encapsulates our 3D scene - contains all other entities (such as terrain) as children.
Note
Not available in Python bindings
New in version 3.0:
Methods
Returns camera controller
Returns the scene's elevation range
Exports the scene according to the scene export settings
Returns the 3D map settings.
Returns a map of 3D map scenes (by name) open in the QGIS application.
Returns the scene extent in the map's CRS
Returns the current state of the scene
Resets camera view to show the extent
extent
(top view)Returns number of pending jobs of the terrain entity
Returns number of pending jobs for all chunked entities
Updates the temporale entities
Calculates the 2D extent viewed by the 3D camera as the vertices of the viewed trapezoid
Resets camera view to show the whole scene (top view)
Given screen error (in pixels) and distance from camera (in 3D world coordinates), this function estimates the error in world space.
Signals
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
Attributes
- Ready = 0¶
- class SceneState¶
Bases:
int
- Updating = 1¶
- cameraController(self) QgsCameraController ¶
Returns camera controller
- Return type:
- elevationRange(self) QgsDoubleRange ¶
Returns the scene’s elevation range
Note
Only some layer types are considered by this method (eg terrain, point cloud and mesh layers)
New in version 3.30.
- Return type:
- exportScene(self, exportSettings: Qgs3DMapExportSettings)¶
Exports the scene according to the scene export settings
- Parameters:
exportSettings (Qgs3DMapExportSettings) –
- fpsCountChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Parameters:
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type:
PYQT_SIGNAL
- fpsCounterEnabledChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Parameters:
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type:
PYQT_SIGNAL
- mapSettings(self) Qgs3DMapSettings ¶
Returns the 3D map settings.
New in version 3.30.
- Return type:
- openScenes() object ¶
Returns a map of 3D map scenes (by name) open in the QGIS application.
Note
Only available from the QGIS desktop application.
New in version 3.30.
- Return type:
object
- sceneExtent(self) QgsRectangle ¶
Returns the scene extent in the map’s CRS
New in version 3.20.
- Return type:
- sceneState(self) Qgs3DMapScene.SceneState ¶
Returns the current state of the scene
- Return type:
- sceneStateChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Parameters:
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type:
PYQT_SIGNAL
- setViewFrom2DExtent(self, extent: QgsRectangle)¶
Resets camera view to show the extent
extent
(top view)New in version 3.26.
- Parameters:
extent (QgsRectangle) –
- terrainEntityChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Parameters:
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type:
PYQT_SIGNAL
- terrainPendingJobsCount(self) int ¶
Returns number of pending jobs of the terrain entity
- Return type:
int
- terrainPendingJobsCountChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Parameters:
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type:
PYQT_SIGNAL
- totalPendingJobsCount(self) int ¶
Returns number of pending jobs for all chunked entities
New in version 3.12.
- Return type:
int
- totalPendingJobsCountChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Parameters:
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type:
PYQT_SIGNAL
- updateTemporal(self)¶
Updates the temporale entities
- viewFrustum2DExtent(self) List[QgsPointXY] ¶
Calculates the 2D extent viewed by the 3D camera as the vertices of the viewed trapezoid
New in version 3.26.
- Return type:
List[QgsPointXY]
- viewZoomFull(self)¶
Resets camera view to show the whole scene (top view)
- viewed2DExtentFrom3DChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Parameters:
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type:
PYQT_SIGNAL
- worldSpaceError(self, epsilon: float, distance: float) float ¶
Given screen error (in pixels) and distance from camera (in 3D world coordinates), this function estimates the error in world space. Takes into account camera’s field of view and the screen (3D view) size.
- Parameters:
epsilon (float) –
distance (float) –
- Return type:
float