qgscamerapose: Do not restrict the pitch angle with qt6
This was introduced as a workaround for a bug in Qt5. It has been fixed in Qt6.
@ -62,9 +62,13 @@ void QgsCameraPose::setPitchAngle( float pitch )
|
||||
// prevent going over the head
|
||||
// prevent bug in QgsCameraPose::updateCamera when updating camera rotation.
|
||||
// With a mPitchAngle < 0.2 or > 179.8, QQuaternion::fromEulerAngles( mPitchAngle, mHeadingAngle, 0 )
|
||||
// will return bad rotation angle.
|
||||
// will return bad rotation angle in Qt5.
|
||||
// See https://bugreports.qt.io/browse/QTBUG-72103
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
mPitchAngle = std::clamp( pitch, 0.2f, 179.8f );
|
||||
#else
|
||||
mPitchAngle = std::clamp( pitch, 0.0f, 180.0f );
|
||||
#endif
|
||||
}
|
||||
|
||||
void QgsCameraPose::updateCamera( Qt3DRender::QCamera *camera )
|
||||
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 340 KiB After Width: | Height: | Size: 340 KiB |
BIN
tests/testdata/control_images/3d/expected_flat_terrain_1/qt6/expected_flat_terrain_1.png
vendored
Normal file
After Width: | Height: | Size: 341 KiB |
BIN
tests/testdata/control_images/3d/expected_line_rendering_1/qt6/expected_line_rendering_1.png
vendored
Normal file
After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
BIN
tests/testdata/control_images/3d/expected_terrain_theme/qt6/expected_terrain_theme.png
vendored
Normal file
After Width: | Height: | Size: 58 KiB |