]> 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)
committerbugmaster <bugmaster@opencascade.com>
Fri, 26 Feb 2021 07:56:31 +0000 (10:56 +0300)
Fixed wrong axis check.

src/V3d/V3d_View.cxx

index 6b0b828044fcc407ce8dbfd9ac9a67e08ad0bae5..8683c77d19c7f4ca58c6b52ddaf1aae8737be905 100644 (file)
@@ -969,7 +969,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,");
   }