[vlc-devel] [PATCH 1/2] viewpoint: remove vlc_viewpoint_reverse

Alexandre Janniaux ajanni at videolabs.io
Sat Jan 9 15:17:10 UTC 2021


Hi,

Thank you for review,

Since I'll move to a dedicated function for euler angles
and change the computation to use quaternions internally
later, we can defer this.

Regarding the math, it's just inlined into the function
at the end (vlc_viewpoint_to_4x4) which was used right
after vlc_viewpoint_reverse so it's fairly easy to confirm
it's the same behaviour. Those changes really reflect
whether we describe the view transform from the world point
of view or the camera point of view.

Regards,
--
Alexandre Janniaux
Videolabs

On Sat, Jan 09, 2021 at 05:00:16PM +0200, Rémi Denis-Courmont wrote:
> Le lauantaina 9. tammikuuta 2021, 16.10.46 EET Alexandre Janniaux a écrit :
> > The function was doing the wrong operation. The underlying rotation,
> > which is R = Rz(roll) Rx(pitch) Ry(yaw), was transformed into the
> > product Rz(-roll) Rx(-pitch) Ry(-yaw), whereas the correct transformation
> > would have been Ry(-yaw) Rx(-pitch) Rz(-roll), which leads to a reversed
> > rotation order. In simpler term, this was a good idea to help understand
> > what was happening but it was wrongly executed.
> >
> > Removing the function and using the correct input for writing the matrix
> > simplifies the code and makes the future quaternion code more logical.
> > The correct version of this process can be done later if still needed.
>
> I didn't check the maths, but maybe using a new macro for degrees to radians
> conversion would be more legible.
>
> --
> Реми Дёни-Курмон
> http://www.remlab.net/
>
>
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list