]> OCCT Git - occt.git/commitdiff
0032168: Visualization - Wrong computation of screen axis in V3d_View::SetTwist method
authorkgv <kgv@opencascade.com>
Thu, 25 Feb 2021 11:10:18 +0000 (14:10 +0300)
committermgn <maxim.glibin@opencascade.com>
Thu, 25 Feb 2021 14:29:04 +0000 (17:29 +0300)
Fixed wrong axis check.

src/V3d/V3d_View.cxx

index 9893f73e0b951c37050aa5cc536b6e5c51c75987..bedc6b38d5e9bd32afe67eb7068b297fae4f20fa 100644 (file)
@@ -968,7 +968,7 @@ void V3d_View::SetTwist(const Standard_Real angle)
   const gp_Dir aReferencePlane (aCamera->Direction().Reversed());
   if (!screenAxis (aReferencePlane, gp::DZ(), myXscreenAxis, myYscreenAxis, myZscreenAxis)
    && !screenAxis (aReferencePlane, gp::DY(), myXscreenAxis, myYscreenAxis, myZscreenAxis)
-   && !screenAxis (aReferencePlane, gp::DZ(), myXscreenAxis, myYscreenAxis, myZscreenAxis))
+   && !screenAxis (aReferencePlane, gp::DX(), myXscreenAxis, myYscreenAxis, myZscreenAxis))
   {
     throw V3d_BadValue ("V3d_ViewSetTwist, alignment of Eye,At,Up,");
   }