Discussion:
[mitk-users] Weird behaviour while rotating
Wojciech Lassmann
2017-03-09 12:58:42 UTC
Permalink
I am rotating an object using mitk::RotationOperation
I am rotating it arround static axis [1,0,0] [0,1,0] [0,0,1] and arround
its own geometry->GetAxisVector. Everything works smooth, but when i try to
track the axis value changes weird thing happens

vector3D planevect = geometry->GetAxisVector(0);

qDebug()
<<tr("%1,%2,%3").arg(planevect[0]).arg(planevect[1]).arg(planevect[2]);
planevect = geometry->GetAxisVector(1);
qDebug()
<<tr("%1,%2,%3").arg(planevect[0]).arg(planevect[1]).arg(planevect[2]);
planevect = geometry->GetAxisVector(2);
qDebug()
<<tr("%1,%2,%3").arg(planevect[0]).arg(planevect[1]).arg(planevect[2]);

when I rotate object arround axis 0, 1 or 2 its vector is allso changing.
While it's mathematicly imposible, program does what it should. Is there a
bug somewhere?

Additionally How can I rotate camera. Not the data (if i understand
corectly mitk::RotationOperation is an ITK transformation), but just the
camera (VTK transformation).

With regards,
Wojciech Lassmann

Loading...