[vtkusers] Dragging an object in the x-y plane
Dov Grobgeld
dov.grobgeld at gmail.com
Tue Apr 8 16:03:45 EDT 2014
I'm trying to create a toy x-y board which has pieces, realized as Actors,
that I can drag around in the x-y plane. Through the vtkPicker() I have
figured out how to choose a piece, and I can get the render window
coordinates through GetInteractor().GetEventPosition(). Further, if I now
move the mouse I can calculate a Dx,Dy shift in the window coordinate. But
I would now like to translate the Window Dx,Dy to an Actor Dx,Dy shift.
I.e. I would like to take a two pairs of xy coordinates in window
coordinates and calculate their respective positions in actor coordinates,
according to the current actor to dispay matrix. How can I do that?
Thanks in advance!
Dov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140408/c93ff85f/attachment.html>
More information about the vtkusers
mailing list