From 9a401e3d95ca64316989a662a7b54126d7fa4f9b Mon Sep 17 00:00:00 2001 From: Pavel Rojtberg Date: Tue, 11 Dec 2018 14:09:13 +0100 Subject: [PATCH] ovis: also free yaw axis of camera manager and default to free yaw so meshes in any orientation can be properly viewed --- modules/ovis/src/ovis.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/ovis/src/ovis.cpp b/modules/ovis/src/ovis.cpp index 7abac0781..2e2fe98ab 100644 --- a/modules/ovis/src/ovis.cpp +++ b/modules/ovis/src/ovis.cpp @@ -319,7 +319,11 @@ public: { camman.reset(new OgreBites::CameraMan(camNode)); camman->setStyle(OgreBites::CS_ORBIT); - camNode->setFixedYawAxis(true, Vector3::NEGATIVE_UNIT_Y); +#if OGRE_VERSION >= ((1 << 16) | (11 << 8) | 5) + camman->setFixedYaw(false); +#else + camNode->setFixedYawAxis(true, Vector3::NEGATIVE_UNIT_Y); // OpenCV +Y in Ogre CS +#endif } if (!app->sceneMgr) @@ -694,6 +698,10 @@ public: void fixCameraYawAxis(bool useFixed, InputArray _up) CV_OVERRIDE { +#if OGRE_VERSION >= ((1 << 16) | (11 << 8) | 5) + if(camman) camman->setFixedYaw(useFixed); +#endif + Vector3 up = Vector3::NEGATIVE_UNIT_Y; if (!_up.empty()) {