Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3D] Fix reset view button #60413

Merged
merged 3 commits into from
Mar 6, 2025
Merged

Conversation

Withalion
Copy link
Contributor

Description

This PR fixes reset view button giving wrong camera positions for virtual point clouds, and also fixes a bug where resetting view multiple times would set near & far planes incorrectly. Also it fixes initial position setting of camera after opening 3D view, which should be set to top down view of whole scene.

@github-actions github-actions bot added this to the 3.42.0 milestone Feb 3, 2025
Copy link

github-actions bot commented Feb 3, 2025

🪟 Windows builds

Download Windows builds of this PR for testing.
Debug symbols for this build are available here.
(Built from commit 4e14214)

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit 4e14214)

Copy link

github-actions bot commented Feb 3, 2025

Tests failed for Qt 6

One or more tests failed using the build from commit 8d3bb95

virtual_pointcloud_3d_overview (testPointCloud3DOverview)

virtual_pointcloud_3d_overview

Test failed at testPointCloud3DOverview at tests/src/3d/testqgspointcloud3drendering.cpp:603

The full test report (included comparison of rendered vs expected images) can be found here.

Further documentation on the QGIS test infrastructure can be found in the Developer's Guide.

Copy link

github-actions bot commented Feb 3, 2025

Tests failed for Qt 5

One or more tests failed using the build from commit 3455251

virtual_pointcloud_3d_overview (testPointCloud3DOverview)

virtual_pointcloud_3d_overview

Test failed at testPointCloud3DOverview at tests/src/3d/testqgspointcloud3drendering.cpp:603

The full test report (included comparison of rendered vs expected images) can be found here.

Further documentation on the QGIS test infrastructure can be found in the Developer's Guide.

@Withalion
Copy link
Contributor Author

Withalion commented Feb 4, 2025

To correct myself, the feature to open the 3D scene in the same place as 2D scene is currently looking at stays. It just fixes the bug for smaller scenes where this "zoom" would move camera to point to empty space.
EDIT: fixes only reset view button not the initial position bug

@Withalion Withalion changed the title [3D] Fix reset view button & initial position [3D] Fix reset view button Feb 5, 2025
@Withalion Withalion force-pushed the vpc-reset-view-fix branch 3 times, most recently from f4c943c to 7882f13 Compare February 24, 2025 14:36
@benoitdm-oslandia
Copy link
Collaborator

Can you remove the 2 commits changing the tests (bc137e4 and 7882f13) as they cancelled each other?

Copy link
Collaborator

@benoitdm-oslandia benoitdm-oslandia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang tidy failed with https://github.com/qgis/QGIS/actions/runs/13661129187/job/38194953395?pr=60413#step:9:268

Object is unused and not unallocated

@@ -206,9 +208,9 @@ void QgsCameraController::setLookingAtPoint( const QgsVector3D &point, float dis
setCameraPose( camPose );
}

void QgsCameraController::setCameraPose( const QgsCameraPose &camPose )
void QgsCameraController::setCameraPose( const QgsCameraPose &camPose, const bool force )
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can remove the const: const QgsCameraPose &camPose, bool force

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it

@Withalion Withalion force-pushed the vpc-reset-view-fix branch from 3729055 to 4e14214 Compare March 5, 2025 12:20
@Withalion
Copy link
Contributor Author

@benoitdm-oslandia the clang tidy check is failing on precompiled headers, the stuff you mentioned is just warnings. Anyway the unalloceted memory I fixed, but the unused warning is a mistake by clang tidy as it is used few lines below creation...

@wonder-sk wonder-sk merged commit 4a232bb into qgis:master Mar 6, 2025
32 checks passed
@jef-n
Copy link
Member

jef-n commented Mar 6, 2025

Apparently breaks the nightly https://cdash.orfeo-toolbox.org/viewBuildError.php?buildid=29235

@Withalion Withalion deleted the vpc-reset-view-fix branch March 7, 2025 09:58
@Withalion
Copy link
Contributor Author

@jef-n the issue was not introduced by this PR, but another one. Anyway the fix for that will come with fixes for other 3D point cloud editing tools related bugs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants