From: mkr Date: Mon, 27 Nov 2006 13:53:29 +0000 (+0000) Subject: Fix for PAL14011 : Strange behaviour in rotation in VTK Viewer. X-Git-Tag: V3_2_4pre1~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c172a596eef0bbc285189aad48f8b265b3c62ccd;p=modules%2Fgui.git Fix for PAL14011 : Strange behaviour in rotation in VTK Viewer. --- diff --git a/src/SVTK/SVTK_InteractorStyle.cxx b/src/SVTK/SVTK_InteractorStyle.cxx index 9959ea2ff..de0dbbb74 100644 --- a/src/SVTK/SVTK_InteractorStyle.cxx +++ b/src/SVTK/SVTK_InteractorStyle.cxx @@ -282,13 +282,16 @@ SVTK_InteractorStyle double rxf = double(dx) * aDeltaAzimuth * this->MotionFactor; aTransform->RotateWXYZ(rxf, cam->GetViewUp()); - + // Elevation transformation double aDeltaElevation = -20.0 / size[1]; double ryf = double(dy) * aDeltaElevation * this->MotionFactor; vtkMatrix4x4* aMatrix = cam->GetViewTransformMatrix(); - const double anAxis[3] = {aMatrix->GetElement(0,0), aMatrix->GetElement(0,1), aMatrix->GetElement(0,2)}; + const double anAxis[3] = {-aMatrix->GetElement(0,0), // mkr : 27.11.2006 : PAL14011 - Strange behaviour in rotation in VTK Viewer. + -aMatrix->GetElement(0,1), + -aMatrix->GetElement(0,2)}; + aTransform->RotateWXYZ(ryf, anAxis); aTransform->Translate(-myRotationPointX, -myRotationPointY, -myRotationPointZ);