QGIS/python/PyQt6/3d/auto_generated/qgs3dmapscene.sip.in
2025-04-05 10:31:10 +02:00

280 lines
7.5 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/3d/qgs3dmapscene.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class Qgs3DMapScene : QObject
{
%Docstring(signature="appended")
Entity that encapsulates our 3D scene - contains all other entities
(such as terrain) as children.
%End
%TypeHeaderCode
#include "qgs3dmapscene.h"
%End
public:
QgsCameraController *cameraController() const;
%Docstring
Returns camera controller
%End
void viewZoomFull();
%Docstring
Resets camera view to show the whole scene (top view)
%End
void setViewFrom2DExtent( const QgsRectangle &extent );
%Docstring
Resets camera view to show the extent ``extent`` (top view)
.. versionadded:: 3.26
%End
QVector<QgsPointXY> viewFrustum2DExtent() const;
%Docstring
Calculates the 2D extent viewed by the 3D camera as the vertices of the
viewed trapezoid
.. versionadded:: 3.26
%End
int totalPendingJobsCount() const;
%Docstring
Returns number of pending jobs for all chunked entities
.. versionadded:: 3.12
%End
enum SceneState /BaseType=IntEnum/
{
Ready,
Updating,
};
SceneState sceneState() const;
%Docstring
Returns the current state of the scene
%End
float worldSpaceError( float epsilon, float distance ) const;
%Docstring
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.
%End
bool exportScene( const Qgs3DMapExportSettings &exportSettings );
%Docstring
Exports the scene according to the scene export settings Returns
``False`` if the operation failed
%End
QgsRectangle sceneExtent() const;
%Docstring
Returns the scene extent in the map's CRS
.. versionadded:: 3.20
%End
QgsDoubleRange elevationRange( bool ignoreTerrain = false ) const;
%Docstring
Returns the scene's elevation range
.. note::
Only some layer types are considered by this method (e.g. terrain, point cloud and mesh layers)
:param ignoreTerrain: indicates whether the calculation will ignore
terrain
.. versionadded:: 3.30
%End
Qgs3DMapSettings *mapSettings() const;
%Docstring
Returns the 3D map settings.
.. versionadded:: 3.30
%End
bool hasSceneUpdatesEnabled() const;
%Docstring
Returns whether updates of the 3D scene's entities are allowed.
Normally, scene updates are enabled. But for debugging purposes, it may
be useful to temporarily disable scene updates.
.. versionadded:: 3.40
%End
void setSceneUpdatesEnabled( bool enabled );
%Docstring
Sets whether updates of the 3D scene's entities are allowed. Normally,
scene updates are enabled. But for debugging purposes, it may be useful
to temporarily disable scene updates.
.. versionadded:: 3.40
%End
bool hasSceneOriginShiftEnabled() const;
%Docstring
Returns whether the 3D scene is allowed to automatically move the
scene's origin. This is necessary in large scenes (e.g. more than 50km
across) to avoid issues with numerical precision (due to the use of
32-bit floats in rendering), that may cause jitter in camera position or
object location. When 3D scene moves the origin (because the camera is
far from it), user should not see any change - transforms of 3D entities
should be updated accordingly.
Normally, origin shifts are enabled. But for debugging purposes, it may
be useful to temporarily disable origin shifts.
.. versionadded:: 3.44
%End
void setSceneOriginShiftEnabled( bool enabled );
%Docstring
Returns whether the 3D scene is allowed to automatically move the
scene's origin. See :py:func:`~Qgs3DMapScene.hasSceneOriginShiftEnabled`
for more details.
Normally, origin shifts are enabled. But for debugging purposes, it may
be useful to temporarily disable origin shifts.
.. versionadded:: 3.44
%End
static QMap<QString, Qgs3DMapScene *> openScenes() /Deprecated="Since 3.36. Use QgisAppInterface.mapCanvases3D() instead."/;
%Docstring
Returns a map of 3D map scenes (by name) open in the QGIS application.
.. note::
Only available from the QGIS desktop application.
.. deprecated:: 3.36
Use QgisAppInterface.mapCanvases3D() instead.
.. versionadded:: 3.30
%End
void enableClipping( const QList<QVector4D> &clipPlaneEquations );
%Docstring
Enables OpenGL clipping based on the planes equations defined in
``clipPlaneEquations``. The number of planes is equal to the size of
``clipPlaneEquations``. A plane equation contains 4 elements. A simple
way to define a clip plane equation is to define a normalized normal to
the plane and its distance from the origin of the scene. In that case,
the first 3 elements are the coordinates of the normal of the plane as
``(X, Y, Z)``. They need to be normalized. The last element is the
distance of the plane from the origin of the scene. In mathematical
terms, a 3d plane can be defined with the equation ``ax+by+cz+d=0`` The
normal is ``(a, b, c)`` with ``|a, b, c| = 1`` The distance is ``-d``.
The number of available clip planes depends on the OpenGL
implementation. It should at least handle 6 additional clip planes. When
the map scene is created, this number is retrieved. If
``clipPlaneEquations`` contains more than this maximum, only the first
ones will be kept.
.. seealso:: :py:func:`disableClipping`
.. versionadded:: 3.40
%End
void disableClipping();
%Docstring
Disables OpenGL clipping.
.. seealso:: :py:func:`enableClipping`
.. versionadded:: 3.40
%End
QList<QVector4D> clipPlaneEquations() const;
%Docstring
Returns list of clipping planes if clipping is enabled, otherwise an
empty list.
.. versionadded:: 3.44
%End
signals:
void terrainEntityChanged();
%Docstring
Emitted when the current terrain entity is replaced by a new one
%End
void totalPendingJobsCountChanged();
%Docstring
Emitted when the total number of pending jobs changes
.. versionadded:: 3.12
%End
void sceneStateChanged();
%Docstring
Emitted when the scene's state has changed
%End
void fpsCountChanged( float fpsCount );
%Docstring
Emitted when the FPS count changes
%End
void fpsCounterEnabledChanged( bool fpsCounterEnabled );
%Docstring
Emitted when the FPS counter is activated or deactivated
%End
void viewed2DExtentFrom3DChanged( QVector<QgsPointXY> extent );
%Docstring
Emitted when the viewed 2D extent seen by the 3D camera has changed
.. versionadded:: 3.26
%End
void gpuMemoryLimitReached();
%Docstring
Emitted when one of the entities reaches its GPU memory limit and it is
not possible to lower the GPU memory use by unloading data that's not
currently needed.
%End
public slots:
void updateTemporal();
%Docstring
Updates the temporale entities
%End
private:
Qgs3DMapScene();
Qgs3DMapScene( const Qgs3DMapScene &other );
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/3d/qgs3dmapscene.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/