315 Commits

Author SHA1 Message Date
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
qgis-bot
c2b726d5f8 auto sipify 🍺 2025-03-11 12:54:49 +00: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
qgis-bot
c582e723e6 auto sipify 🍺 2025-03-06 08:31:58 +00: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
qgis-bot
0318ff38cb auto sipify 🍺 2025-01-17 21:54:36 +00:00
Withalion
e9a8dea22c Add VPC zoom out behavior for 3D rendering 2025-01-17 22:51:46 +01:00
qgis-bot
c0df09b614 auto sipify 🍺 2025-01-17 09:53:43 +00: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
qgis-bot
b7b94510cd auto sipify 🍺 2025-01-15 09:46:22 +00: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
Juergen E. Fischer
8825f861dd fix sid build with sip 6.9.1 2024-12-23 11:57:01 +01:00
qgis-bot
b7f78e8c73 auto sipify 🍺 2024-12-18 08:10:21 +00: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
qgis-bot
645c474284 auto sipify 🍺 2024-12-13 04:24:36 +00:00
Nyall Dawson
3a649fbc81 Rename file to qgsabstractterrainsettings.h/cpp 2024-12-13 14:21:51 +10:00
Nyall Dawson
6019c3e755 Handle extent and crs in terrain generator creation 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
qgis-bot
f4975103b6 auto sipify 🍺 2024-12-11 09:22:49 +00:00
Denis Rouzaud
7306e5b170
Merge branch 'master' into more-clang 2024-12-11 07:53:23 +01:00
qgis-bot
98c5bf8bcd auto sipify 🍺 2024-12-10 15:43:17 +00:00
Denis Rouzaud
30ea619861
sipify 2024-12-10 14:52:35 +01:00
qgis-bot
eb1ce83af1 auto sipify 🍺 2024-12-03 07:47:10 +00:00
Nyall Dawson
0dbf6e730b Add equality operator for QgsMesh3DSymbol 2024-11-27 10:53:53 +10:00
qgis-bot
96984ac6a6 auto sipify 🍺 2024-11-26 10:08:44 +00: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
Nyall Dawson
373b48ce10
Expose QgsMesh3DSymbol to Python 2024-11-26 14:42:21 +10:00
qgis-bot
eacf823601 auto sipify 🍺 2024-11-25 16:19:42 +00:00
Martin Dobias
6defbc68c4 Review: add missing \since 2024-11-25 17:16:28 +01:00
Martin Dobias
60554195dc Add possibility to shift origin of 3D map scenes
This introduces a new class QgsGeoTransform (derived from QTransform)
that keeps chunk's translation vector as a QgsVector3D (i.e. in double
coordinates) and if there is a shift of the origin, 3D map scene and
chunk entities react to it by adjusting the underlying QTransform.
2024-11-25 17:16:28 +01:00
Jean Felder
dfce7dc231 qgs3dmapscene: Compute max clip planes
The number of available clip planes depends on the OpenGL
implementation.

This change Introduces a new function in Qgs3DUtils function called
`Qgs3DUtils::getOpenGLMaxClipPlanes` to compute this
number (`GL_MAX_CLIP_PLANES`) and use it in the 3D scene.

See: https://registry.khronos.org/OpenGL-Refpages/gl2.1/xhtml/glClipPlane.xml
2024-11-21 17:08:41 +01:00
qgis-bot
14ab3d40de auto sipify 🍺 2024-11-21 08:33:56 +00:00
Withalion
5f6259ac10 Fix issues found in review 2024-11-21 09:30:45 +01:00