[vlc-devel] [PATCH 15/18] viewpoint: negate angles earlier
Alexandre Janniaux
ajanni at videolabs.io
Wed Mar 31 09:25:47 UTC 2021
---
src/misc/viewpoint.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/misc/viewpoint.c b/src/misc/viewpoint.c
index 4975e6c9a5..72f68bb40f 100644
--- a/src/misc/viewpoint.c
+++ b/src/misc/viewpoint.c
@@ -28,9 +28,9 @@
void vlc_viewpoint_to_4x4( const vlc_viewpoint_t *vp, float *m )
{
- float yaw = -vp->yaw * (float)M_PI / 180.f;
- float pitch = -vp->pitch * (float)M_PI / 180.f;
- float roll = -vp->roll * (float)M_PI / 180.f;
+ float yaw = vp->yaw * (float)M_PI / 180.f;
+ float pitch = vp->pitch * (float)M_PI / 180.f;
+ float roll = vp->roll * (float)M_PI / 180.f;
float s, c;
@@ -73,15 +73,15 @@ void vlc_viewpoint_to_4x4( const vlc_viewpoint_t *vp, float *m )
void vlc_viewpoint_from_euler(vlc_viewpoint_t *vp,
float yaw, float pitch, float roll)
{
- vp->yaw = yaw;
- vp->pitch = pitch;
- vp->roll = roll;
+ vp->yaw = -yaw;
+ vp->pitch = -pitch;
+ vp->roll = -roll;
}
void vlc_viewpoint_to_euler(const vlc_viewpoint_t *vp,
float *yaw, float *pitch, float *roll)
{
- *yaw = vp->yaw;
- *pitch = vp->pitch;
- *roll = vp->roll;
+ *yaw = -vp->yaw;
+ *pitch = -vp->pitch;
+ *roll = -vp->roll;
}
--
2.31.0
More information about the vlc-devel
mailing list