-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Conversation
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.
🪟 Windows buildsDownload Windows builds of this PR for testing. 🪟 Windows Qt6 buildsDownload Windows Qt6 builds of this PR for testing. |
I think |
@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? |
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.