99 Commits

Author SHA1 Message Date
Nyall Dawson
a940543035 Fix a number of warnings when building in c++20 mode 2025-06-30 14:03:24 +12:00
David Koňařík
19ded7be74 Fix saving/loading 3D map view viewpoint
Previously the point was saved in origin-relative coordinates. Now since
we pick the origin automatically, it can be changed by various
initialisation routines, so the coordinates will be interpreted relative
to the wrong origin.

This commit changes the format to use map coordinates instead, and saves
the "original" origin from the XML for interpreting older projects.
2025-06-29 19:44:56 +02:00
David Koňařík
f5931f3e1a Move shortcut handling from Qgs3DAxis to QgsCameraController 2025-06-06 11:13:48 +10:00
David Koňařík
331afe3caf Fix docstring per review 2025-06-06 11:13:48 +10:00
David Koňařík
476d501ce4 Simplify keyboard input handling in 3D view 2025-06-06 11:13:48 +10:00
Nyall Dawson
35f5280342 Sipify 2025-05-04 07:42:31 +10:00
Withalion
6301a60f91 Fix review issues 2025-04-05 10:31:10 +02:00
Withalion
705a2cade7 Disable clipping planes when outside current extent 2025-04-05 10:31:10 +02:00
Nyall Dawson
3f6b490218 Sipify 2025-04-02 11:11:10 +10:00
Martin Dobias
2078404ba7 Globe: finally make it available from the GUI
This is a mix of additions and updates for the initial support of globe mode
in 3D views within QGIS desktop app. Many things are still missing, and will
be introduced in later PRs...
2025-04-01 10:26:27 +10:00
Nyall Dawson
4a10066b69 Fix grammar errors in class docstrings 2025-04-01 09:44:00 +10:00
Nyall Dawson
afd2e4f42d Fix doxygen class briefs which aren't full sentences 2025-04-01 09:44:00 +10:00
Nyall Dawson
26a6828851 Make 3d docs compliant 2025-03-30 20:48:07 +10:00
Nyall Dawson
6d122f0038 Sipify 2025-03-30 20:48:07 +10:00
Nyall Dawson
ac71664a83 Fix multiparagraphs in initial class docstrings 2025-03-30 20:48:07 +10:00
Nyall Dawson
b81e0d83f6 Fix non-compliant class brief documentation 2025-03-30 20:48:07 +10:00
Martin Dobias
ad32431d80 Support for rebasing of scenes 2025-03-29 09:41:22 +01:00
Withalion
0fa3b6d3ec Refactor code & add unit tests 2025-03-29 09:41:22 +01:00
Withalion
742a41d009 Fix review issues 2025-03-29 09:41:22 +01:00
Martin Dobias
b98733dbd7 cleanups of the globe entity code 2025-03-26 08:23:23 +01:00
Martin Dobias
adfb671c7a Add globe mesh 3D entity 2025-03-26 08:23:23 +01:00
Martin Dobias
73b27d9949 Review from Stefanos and Nyall 2025-03-24 10:29:33 +01:00
Martin Dobias
c40d25ade9 Add 3D scene mode enum 2025-03-24 10:29:33 +01:00
Martin Dobias
e98bf79f1a Initial implementation of globe camera controller
This is a new navigation mode for QgsCameraController which is meant to work
just like the terrain-based navigation mode, but for 3D scenes with globe.

Initially, the new navigation mode can handle:
- zooming in/out with mouse wheel
- orbit around globe when dragging with left mouse button pressed
- left/right/up/down keys to orbit around globe
- shift + left/right keys to change heading angle
- shift + up/down keys to change pitch angle
- page up/page down keys to increase/decrease elevation

For camera pose, we use QgsCameraPose as for "flat" scenes, but the QCamera
is positioned/rotated slightly differently - the main change is that in case
of globe, we use ECEF coordinates of the camera pose's center point, convert
them to lat/lon coordinates in order to set up initial rotation of the camera
so that it is perpendicular to the tangent plane at the given ECEF coordinate.
2025-03-24 10:29:33 +01:00
Martin Dobias
c744d96ec1 Large scene support: shift scene's origin if the camera got too far
This should greatly improve our capability to handle large scenes (e.g. more than 50km across)

Also add a checkbox to the debug panel to allow devs temporarily turn it off.
2025-03-06 13:40:29 +01:00
Withalion
4a232bb9ac Fix review issues 2025-03-06 09:35:31 +01:00
Withalion
c5b74ed242 Fix review issues 2025-03-06 09:29:01 +01:00
Withalion
a3694b3ed2 Refactor includes 2025-03-06 09:29:01 +01:00
Withalion
72c6762b37 Add movement state for paintbrush tool 2025-03-06 09:29:01 +01:00
Withalion
e9a8dea22c Add VPC zoom out behavior for 3D rendering 2025-01-17 22:51:46 +01:00
Stefanos Natsis
e728a526fb
Added 3d map tool to change point cloud attribute values (#60172)
* Added 3d map tool to change point cloud attribute values

* remove unused variable

* rename vars, remove colons, use QgsPointXY, const
2025-01-17 11:50:31 +02:00
Martin Dobias
22702aa689 review and test fixes 2025-01-15 10:43:30 +01:00
Martin Dobias
4c654c88fd Simplify code for camera zoom using a pivot point 2025-01-15 10:43:30 +01:00
Martin Dobias
8bd623b724 Simplify rotation around a pivot point 2025-01-15 10:43:30 +01:00
Jean Felder
1c48cfd07f qgs3dmapscene: : Return export operation success state 2024-12-18 09:07:28 +01:00
Julien Cabieces
4eab5313e6 fix(Sip): update sip since rebase 2024-12-17 09:07:41 +01:00
Julien Cabieces
ed64834106 api(deprecated): add message to deprecated SIP annotation 2024-12-17 09:06:42 +01:00
Nyall Dawson
3a649fbc81 Rename file to qgsabstractterrainsettings.h/cpp 2024-12-13 14:21:51 +10:00
Nyall Dawson
f9f2aa40f0 Move symbol to QgsMeshTerrainSettings 2024-12-13 14:21:51 +10:00
Nyall Dawson
e550ea7670 Move configurateTerrainFromProject to registry 2024-12-13 14:21:51 +10:00
Nyall Dawson
be19042d1d Terrain settings can create generators 2024-12-13 14:21:51 +10:00
Nyall Dawson
25313dd530 Registry can create terrain generators 2024-12-13 14:21:51 +10:00
Nyall Dawson
c1bd66a54d Online DEM 2024-12-13 14:21:51 +10:00
Nyall Dawson
ed9b2784b0 Quantized mesh settings 2024-12-13 14:21:51 +10:00
Nyall Dawson
293b7afadd Implement a registry for terrain objects 2024-12-13 14:21:51 +10:00
Nyall Dawson
8af23b1002 Initial framework for terrain settings refactoring 2024-12-13 14:21:51 +10:00
Denis Rouzaud
30ea619861
sipify 2024-12-10 14:52:35 +01:00
Nyall Dawson
0dbf6e730b Add equality operator for QgsMesh3DSymbol 2024-11-27 10:53:53 +10:00
Nyall Dawson
eb750fb7a8 Use doubles for properties in QgsAbstractMaterialSettings subclasses
These classes are supposed to store the original setting values,
so doubles are more appropriate as they won't slightly change
eg when round-tripping through qgis project XML.

(The actual 3d material classes still use floats, this is just
for the settings classes)
2024-11-26 20:05:30 +10:00
Nyall Dawson
0dc89613df Expose equals method for QgsAbstractMaterialSettings subclasses 2024-11-26 20:05:30 +10:00