Commit 6843b59f authored by saubatn's avatar saubatn
Browse files

FIXED For any rotation on frames, given 3 angles around X, Y and Z, perform 3...

FIXED For any rotation on frames, given 3 angles around X, Y and Z, perform 3 rotations in this specific order : Z, X, Y.
This allows the vtkTransform::GetOrientation() method to retrieve the correct angles around the X, Y and Z axes.

git-svn-id: svn+ssh://scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/svn/camitk/trunk/camitk@2169 ec899d31-69d1-42ba-9299-647d76f65fb3
parent eeba6801
......@@ -255,9 +255,10 @@ void Frame::rotate(double aroundX, double aroundY, double aroundZ) {
transformParentToMe->Translate(-initialPos[0], -initialPos[1], -initialPos[2]);
transformParentToMe->RotateX(aroundX);
transformParentToMe->RotateY(aroundY);
transformParentToMe->RotateZ(aroundZ);
transformParentToMe->RotateZ(aroundZ); // we need to keep the rotations in this Z, X, Y order
transformParentToMe->RotateX(aroundX); // this allows the vtkTransform::GetOrientation() method
transformParentToMe->RotateY(aroundY); // to get back the correct angles.
transformParentToMe->Update();
transformParentToMe->Translate(initialPos[0], initialPos[1], initialPos[2]);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment