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

Flip axes of the 3D world coordinates #59272

Merged
merged 11 commits into from
Nov 6, 2024

Conversation

wonder-sk
Copy link
Member

Finally we can stop using the weird convention in 3D views (where X grows to the east, Z grows to the south, Y goes up) that caused endless trouble having to keep in mind that the coordinates in 3D views are rotated compared to the map coordinates. I am not sure anymore why I chose to use this convention, but most likely because Qt's plane mesh is oriented this way (and also various other 3D software has scene with Y going up).

Anyway, the world coordinates are not flipped anymore, so the axes are consistent with the map coordinates 🎉 - i.e. X grows to the east, Y grows to the north, Z goes up (well, at least that's the case for many commonly used CRS). The 3D world coordinates are now only translated by the scene's origin point compared to map coordinates.

Finally we can stop using the weird convention in 3D views (where
X grows to the east, Z grows to the south, Y goes up) that caused
endless trouble having to keep in mind that the coordinates in 3D
views are rotated compared to the map coordinates. I am not sure
anymore why I chose to use this convention, but most likely because
Qt's plane mesh is oriented this way (and also various other
3D software has scene with Y going up).

Anyway, the world coordinates are not flipped anymore, so the axes
are consistent with the map coordinates 🎉 - i.e. X grows to
the east, Y grows to the north, Z goes up (well, at least that's
the case for many commonly used CRS). The 3D world coordinates
are now only translated by the scene's origin point compared to
map coordinates.
@wonder-sk wonder-sk added the 3D Relates to QGIS' 3D engine or rendering label Oct 30, 2024
@github-actions github-actions bot added this to the 3.42.0 milestone Oct 30, 2024
Copy link

github-actions bot commented Oct 30, 2024

🪟 Windows builds

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

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit 9d3f419)

@ptitjano
Copy link
Contributor

ptitjano commented Nov 4, 2024

I think QgsPoint3DSymbolWidget needs changes too.

@wonder-sk
Copy link
Member Author

I think QgsPoint3DSymbolWidget needs changes too.

@ptitjano The QgsPoint3DSymbol::transform() still uses "Y up" convention, but the widget uses "Z up" convention as before, so there should be no change needed, or am I missing something?

@qgis qgis deleted a comment from github-actions bot Nov 6, 2024
@qgis qgis deleted a comment from github-actions bot Nov 6, 2024
@wonder-sk wonder-sk merged commit 5fad1e1 into qgis:master Nov 6, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3D Relates to QGIS' 3D engine or rendering
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants