Skip to content

Commit 9a401e3

Browse files
committed
ovis: also free yaw axis of camera manager and default to free yaw
so meshes in any orientation can be properly viewed
1 parent 34caac7 commit 9a401e3

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

modules/ovis/src/ovis.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,11 @@ class WindowSceneImpl : public WindowScene
319319
{
320320
camman.reset(new OgreBites::CameraMan(camNode));
321321
camman->setStyle(OgreBites::CS_ORBIT);
322-
camNode->setFixedYawAxis(true, Vector3::NEGATIVE_UNIT_Y);
322+
#if OGRE_VERSION >= ((1 << 16) | (11 << 8) | 5)
323+
camman->setFixedYaw(false);
324+
#else
325+
camNode->setFixedYawAxis(true, Vector3::NEGATIVE_UNIT_Y); // OpenCV +Y in Ogre CS
326+
#endif
323327
}
324328

325329
if (!app->sceneMgr)
@@ -694,6 +698,10 @@ class WindowSceneImpl : public WindowScene
694698

695699
void fixCameraYawAxis(bool useFixed, InputArray _up) CV_OVERRIDE
696700
{
701+
#if OGRE_VERSION >= ((1 << 16) | (11 << 8) | 5)
702+
if(camman) camman->setFixedYaw(useFixed);
703+
#endif
704+
697705
Vector3 up = Vector3::NEGATIVE_UNIT_Y;
698706
if (!_up.empty())
699707
{

0 commit comments

Comments
 (0)