From c172a596eef0bbc285189aad48f8b265b3c62ccd Mon Sep 17 00:00:00 2001 From: mkr Date: Mon, 27 Nov 2006 13:53:29 +0000 Subject: [PATCH] Fix for PAL14011 : Strange behaviour in rotation in VTK Viewer. --- src/SVTK/SVTK_InteractorStyle.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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); -- 2.39.2