Why camera heading and roll should both be retained
Lets say someone starts off at heading 45, pitch -89, roll 45. Now they want to only alter their world pitch to -90 and nothing else. That means that heading is still 45 and roll is still 45. Is that the same orientation (DRU-DirRightUp) as heading 90, pitch -90, roll 0? Ya, but so what?
Now they want to only alter their world pitch say to 0 and nothing else. Well if their heading and roll information wasn’t lost they’d be at heading 45, pitch 0, roll 45. If any of this info was lost they might instead end up at heading 90, pitch 0, roll 0. They might be upset about this.
So if a program only saves DRU vectors you lose heading and roll information at vertical pitch. So it’s best to save heading and roll, so when you perform a ‘world pitch movement’ you retain the proper heading and roll.
At vertical pitch ‘up vector heading’ = sum of heading and roll
Example: (45H, -89.99P, 45R) is the basically the same view as (90H, -89.99P, 0.0R)
So at -90P the ‘up vector heading’ is the sum of heading and roll angles. There is no ‘direction vector heading’ at vertical pitch.
Something I call hemiflip (for lack of a better term)
Google Earth used to let you do this, but they’ve seem to have disabled it recently. Let’s say someone starts with heading 0, pitch 0, roll 0. Then they change only their pitch to -90 and retain heading 0 roll 0.
Now lets say they want to ‘world pitch’ in a negative direction, basically to a ‘negative tilt’ value.
With a negative tilt:
-your ‘rendered heading value’ is 180deg from your ‘stored heading value’
-your ‘rendered roll value’ is 180deg from your ‘stored roll value’
(In other words if you were right side up you’re now upside down, if you were rolled 90deg left now your rolled 90deg right.)
So all 3 (heading, tilt, roll) have a full 360deg range. Internally only tilt should be kept, pitch display is simply for the user’s convenience. (similar to internally only Radians are kept, Degrees display is simply for the user convenience.)
Video of going into negative tilt
Perhaps provide a roll up button so after the user is done tilting and tilt is negative the tilt value could swap sign and heading & roll both move 180 degrees, or do this automatically after tilting. This is in relation to the reference frame you’re tilting in, so it would have to be done before swapping camera reference frames. When swapping camera reference frames heading and roll would probably be reset and tilt assumed to be positive.