Re: [wxVTK] screen coordinates to world coordinates
Brought to you by:
malat
From: Nigel N. <nN...@au...> - 2006-08-09 05:53:41
|
Andres Munarriz <mun...@gm...> wrote: > > Has someone come across the need of converting screen "display" > > corrdinates (ie. wxEvent ._x, ._y) to VTK world coordinates? > > I've read about a get event method in the VTKRenderWindowInteractor > > but wxVTKRenderWindowInteractor doesn't seem to support this method. > > If someone can help it'll be greatly appreciated. ... > I'm using the interactor->GetLastEventPosition(&event_x, &event_y); > method. event_x and event_y are both integers. > > Am I using the wrong method? Hi Andres, >From file <vtkCoordinate.h>: The coordinate systems in vtk are as follows: DISPLAY - x-y pixel values in window NORMALIZED DISPLAY - x-y (0,1) normalized values VIEWPORT - x-y pixel values in viewport NORMALIZED VIEWPORT - x-y (0,1) normalized value in viewport VIEW - x-y-z (-1,1) values in camera coordinates. (z is dep= th) WORLD - x-y-z global coordinate values USERDEFINED - x-y-z in User defined space First question is what would you like to do? Are you trying to convert a wx= Window "pick" position to vtk "world" or "viewport"? Or are you trying to g= o the other way, i.e. from Vtk to Wx? Can you describe when and how you get= the source coordinates, and what you would like to do with the target coord= inates? A test for most possible conversions can be found here: /VTK/Rendering/Testing/Cxx/otherCoordinate.cxx Nigel ----------------------------------------------------------------------------= ---------=0A= This message is intended for the addressee named and may contain confidentia= l and privileged information. If you are not the intended recipient please= note that any form of distribution, copying or use of this communication or= the information in it is strictly prohibited and may be unlawful. If you r= eceive this message in error, please delete it and notify the sender.=0A= Keep up to date with what's happening in Australian sport.=0A= Visit http://www.ausport.gov.au=0A= ----------------------------------------------------------------------------= --------- |