[vtkusers] Global Rotations and Translations

Andrew Dolgert ajd27 at cornell.edu
Thu Jan 8 19:29:34 EST 2004


Hi,

You are using the right method to find the current transformation
matrix.  I'll hazard a guess that the actor's transformation matrix is
identity because it hasn't moved.  There are two modes for the default
interactor style, the camera mode 'c', and object mode 'o'.  If you
twiddle the mouse in camera mode, then the actors don't actually move.
Your camera moves.  If you hit 'o', then click and drag on the actor,
the actor's transformation matrix should change.

You can test the call you are making by setting the actor's position in
your code and then retrieving its matrix immediately.

Once you get the matrix, you could put it into a vtkTransform.  In the
vtkAbstractTransform base class, you'll find a method to do a bulk
transformation of points.

Drew

> -----Original Message-----
> From: Jonathan.Bailleul at greyc.ismra.fr 
> I'm not sure I got all of it, but it seems that I have a 
> problem _related_ to this one. I would like to retrieve the 
> transformations (scaling, rotation,
> translation) that are applied to an actor when the user moves 
> it with the mouse. I finally want to get corresponding  
> polydata object with point coordinates modified by these 
> transformations. I hoped I could get it through 
> Actor->GetMatrix();, but this is always equal to identity.
> 
> Ok, I know I seem clueless on this problem, but I don't have 
> decent documentation at hand (the vtk handbook), and I got 
> pretty confused running through the online documentation: any 
> help would be really appreciated!
> 
> In advance, thanks for your patience.
> 
> -- 
> -----------------------------------
> Jonathan BAILLEUL, Doctorant
> GREYC Image - Université de Caen 
> http://www.greyc.ismra.fr/~bailleul
> 
> 
> 
> 




More information about the vtkusers mailing list