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.
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...
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.
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.