[vtkusers] Global Rotations and Translations
Jonathan.Bailleul
Jonathan.Bailleul at greyc.ismra.fr
Thu Jan 8 18:36:03 EST 2004
Andrew Dolgert wrote:
>
> Hi John,
>
> I was trying to get this straight, myself. vtkTransform is a simple
> object which does not shift the global axes. I would hope that what you
> want to do requires only that you create a transform which translates
> the object from the origin and then rotates it, R*T, and then poke it
> into vtkActor->SetUserTransform().
>
> When you lay out the coordinate systems for VTK, they look pretty clear.
> There are three coordinate systems, Screen, World, and Actor, and they
> are connected by transformations
> Screen - s_M_v v_M_w - World - w_M_a - Actor.
> VTK expresses everything from the world's perspective, so the
> UserTransform in vtkActor is a matrix which transforms world points to
> actor points, or a_M_w. It's that matrix you want to set. If you are
> doing something funky, like rotating the actor about a world position by
> rotating all of the points, p, in its vtkPolyData, then you have to do
> the traditional linear algebra thing, where R*w_M_a*p = w_M_a*R'*p so
> that R' = a_M_w * R * w_M_a in the actor's coordinate system.
>
> - Drew
>
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