[vtkusers] Relative Rotation with VTK Transform
Lonni Besançon
lonni.besancon at gmail.com
Thu Feb 18 10:45:04 EST 2016
Yes the "rotation" give a relative change from the previous position.
Well I tried what you suggested, but it does not seem to work better.
Actually the bunny does not rotate at all in this case.
Here is the code I used:
/t->SetMatrix(actor->GetMatrix());
tInverse->SetMatrix(actor->GetMatrix());
tL->Inverse();
tRotationToApply->Identity();
tRotationToApply->RotateWXYZ(angle*180.0/3.14,axis[0],axis[1],axis[2]);
t->PostMultiply();
t->Concatenate(tRotationToApply) ;
t->Contatenate(tL);
actor->SetUserMatrix(t->GetMatrix());/
Also, changing the PostMultiply() to PreMultiply did not change the result
at all. The bunny gets back to its original position (unless I make a really
quick tablet tilt, you don't even see it move).
--
View this message in context: http://vtk.1045678.n5.nabble.com/Relative-Rotation-with-VTK-Transform-tp5736566p5736629.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list