[Graphics][Bugfix] Make "Nearest Isometric" follow turntable navigation#1307
Conversation
Prior to this commit, the "Nearest Isometric" GUI command searched all 24 possible isometric views. When using turntable navigation, this could result in the z-axis no longer being oriented vertically. This commit restricts the views being searched while in turntable navigation mode to those that follow this restriction.
| //----------------------------------------------------------------------------- | ||
| #include "solvespace.h" | ||
|
|
||
| #include <iostream> |
There was a problem hiding this comment.
Whoops, thank you for the catch! Looks like I left that in after some initial debugging.
|
@Lunderberg makes perfect sense! Thank you for your first SolveSpace contribution. FWIW it is still possible to "screw up" turntable navigation with |
|
An extra observation experimenting with your commit - something I had never noticed before - there are 8 views (all with the Z axis projection on the screen vertical) that are not reachable with |
Hmm. I'm not sure what the most compatible way to handle that within turntable mode would be, since it would always rotate the z-axis. It looks like the normal middle-click rotation assumes that z is already up, and starts having weirder movement when that assumption is broken, so maybe there's a way to improve it there.
Good point. Testing here, there's a similar effect with turntable notification, as it preferentially places the viewer looking down from above, even if the view was previously looking down from above. Even when already aligned along an isometric view, every computed values of |
Prior to this commit, the "Nearest Isometric" GUI command searched all 24 possible isometric views. When using turntable navigation, this could result in the z-axis no longer being oriented vertically. This commit restricts the views being searched while in turntable navigation mode to those that follow this restriction.