[vtkusers] Converting from X, Y screen to X, Y world

Greg Scott g.scott at oneteldsl.net
Thu Jul 31 08:20:34 EDT 2003


I have implemented a simple interactive free-form deformation system using
vtkPicker. Points on a mesh can be picked and dragged with the mouse.
Currently, however, the points only move correctly when the viewing
direction is along the positive Z axis, i.e. when X and Y in the world
really correspond with the X and Y screen directions (left,right and up,down
the window).

When viewing the mesh from any other side, the movement (as you can imagine)
is no longer intuitive, as the X and Y axis of the world are no longer in
correspondance with the screen X and Y directions.

My question is this: how can I convert the X and Y screen movements to world
coordinate space movements, such that the points move as they should? What
filter should do this easily for me?

Thank you for your help everyone.


More information about the vtkusers mailing list