Skip to content

viewpoint: add euler conversion operations

This change prepare the viewpoint structure to use quaternions in the core, while still using Euler angles in the current clients.

Euler angles have singularity issues, which in the convention we chosed happens at the north and south poles. It didn't matter when using usual yaw/pitch controllers since there are not a lot of way to do this, but it definitively matters when the orientation is already described by a quaternion. In particular, phone devices or HMD headset with gyroscopes can easily reach the north and south poles while having a different roll-like rotation, so can trigger those bugs.

Using quaternions from the start won't trigger those issues in cases where the control is not done through the euler-angle-like paradigm, while still allowing clients to use it as long as they handle the problem themselves.

The commits afterwards will make use of the function to interact with the viewpoint. Tests are added to ensure the resulting matrices for the video output are not broken by any additional changes.

This is a resend of patches from https://mailman.videolan.org/pipermail/vlc-devel/2021-March/142833.html without the quaternion patches for now.

Merge request reports

Loading