QGIS icon indicating copy to clipboard operation
QGIS copied to clipboard

[3D] add support for gl_clipdistance + scene rotation (part 2)

Open ptitjano opened this issue 7 months ago • 6 comments

Description

This PR achieves the same result as https://github.com/qgis/QGIS/pull/57593 but with the gl_clipDistance approach from https://github.com/qgis/QGIS/pull/57899

It is possible to limit the extent of a 3d view. However, the extents is always axis aligned: it is aligned with the true north. This PR adds the possibility to define a rotation angle around the Z axis. This way, the previously axis aligned extent can now have an arbitrary azimuth.

Previously, it was possible to fully describe the extent with a QgsRectangle. Now, a more general QgsOrientedBox3D is used to describe the limits of the scene. This allows to define a custom Z rotation. Then, the ClipPlane equations from https://github.com/qgis/QGIS/pull/57899 are updated to take into account the rotation.

A new 3d extent widget is introduced. It allows to properly set a custom orientation

image

An example

image

image

This PR contains the commits from https://github.com/qgis/QGIS/pull/57899

ptitjano avatar Jul 10 '24 09:07 ptitjano