[vtkusers] transforming objects due to user interaction II

Sebastien Auclair sxa at fluent.com
Tue Mar 18 10:41:40 EST 2003


Bauer,

You can query the transformation matrix that was used to bring your actor
were it is at the moment of window\program terminasion.
You can then save this matrix and apply it to your actor when he needs to be
displayed again or you can use this matrix to process the initial data that
was used to
create your actor in the first place. (multiply all the points with the
transformation matrix.)

In all cases, i suggest that you spend time reading the "VTK User's Guide"
and to look the sample applications.

It will help you see how VTK seperates DATA to display and Transformation
Data (i.e. Matrix values) used to modify how the initial data should be
displayed.
To put it simple, if you use VTK in it's most simple and direct way, you'll
realize that moving a cube from a position A to a position B doesn't
modifies the points coordinates but the Transformation\Translation matrix
used in the display pipeline associated to the cube actor.

Hope it helps !

______________________________________________________
Seb


----- Original Message -----
From: "Bauer Harald" <Harald.Bauer at fh-hagenberg.at>
To: "Sebastien Auclair" <sxa at fluent.com>; <vtkusers at public.kitware.com>
Sent: Tuesday, March 18, 2003 1:54 AM
Subject: AW: [vtkusers] transforming objects due to user interaction II


> Hi,
>
> first of all, thanks for replying
>
> I'll try to specify the problem once again:
>
> When setting a vtkRenderWindowInteractor, the user can rotate or translate
the actor using the mouse buttons. What I want to do: Get the actor (somehow
back from the window) in the exact position where it was rotated/translated
by the user.
>
> I visualize vtkPolyData; after closing the vtkRenderWindow it would be
nice to get another (or the modified) vtkPolyData encapsulating the
object/actor in the position where it was rotated/translated.
>
> (Therefore, I think I should implement a kind of TerminateApp method but I
do not know how to get the latest actor position... )
>
> It would be really helpful,
>
> if you can give me a hint !
>
> Harry
>
> -----Ursprüngliche Nachricht-----
> Von: Sebastien Auclair [mailto:sxa at fluent.com]
> Gesendet: Mo 17.03.2003 18:21
> An: Bauer Harald; vtkusers at public.kitware.com
> Cc:
> Betreff: Re: [vtkusers] transforming objects due to user interaction II
>
>
>
> Hi Bauer,
>
> Your e-mail is clear up to the point where you talk about modifiing after
> closing a window !
>
> Can you specify please ?
>
> Thanks !
> _______________________________
> Seb
>
> ----- Original Message -----
> From: "Bauer Harald" <Harald.Bauer at fh-hagenberg.at>
> To: <vtkusers at public.kitware.com>
> Sent: Monday, March 17, 2003 2:40 AM
> Subject: [vtkusers] transforming objects due to user interaction II
>
>
> > Dear VTK Users,
> > (Info: I'm using vtk4.0 with C++)
> > can anyone tell me how to transform an object due to arbitrary user
> interaction ??
> > To be sure that the problem is ok - in more detail:
> > ----------------------------------------------------
> > It's easy to visualize objects in a vtkRenderWindow.
> > Moreover, it's easy to enable a vtkRenderWindowInteractor to enable user
> interaction (rotation, zooming, ..)
> > Is there also a (simple) way to transform the visualized object
according
> to the interaction actions
> > when closing the window for example ???
> > ----------------------------------------------------
> > I hope, that - even if it may be a very easy question - someone can give
> me an answer;
> > best would be a short programming example ;-)
> > Greetings,
> > Harry
> >                   +"^ئjוLbˬ*'+- ^jǤyfz ( h'
> >  ^   nnXH  & "  d}e a bKh r{ r츛{m ' +pjr噩+-w  dǫ
>
>




More information about the vtkusers mailing list