[vtkusers] rotation of vtkActor through a matrix

Gomez Herrero, Alberto alberto.gomez-herrero at philips.com
Fri Aug 14 10:47:20 EDT 2009


Hi all,

is there any way of applying a transformation to a vtkActor using a 4x4 matrix? The pokeMatrix() method does not work as I expected. If I do

actor->pokeMatrix(transformationMatrix)

and nothing else, the position is set to (0,0,0). If I do

actor->pokeMatrix(transformationMatrix)
actor->SetPosition(position)

and then I print the matrix with

std::cout << *(actor->GetMatrix()) << std::endl;

then the 4th column of the matrix, which is supposed to be the position given with SetPosition, is not that.

If there is not any method for appliying a matrix, could anyone give me some light on how to pass from a matrix to angles around x, y and z so I can use the RotateX, RotateY and RotateZ methods?

Thank you very much,

Alberto

The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.



More information about the vtkusers mailing list