[vtkusers] problem with GetEventPosion
Mathieu Malaterre
mathieu.malaterre at kitware.com
Tue Jan 6 08:42:00 EST 2004
Binjie Qin wrote:
> Hi vtkuser: I have had problem with vtkRenderWindowInteractor's
> function, GetEventPosion(), in picking the event position (such
> mouse's leftbutton down)in render window's screen display coordinate.
> Due to new implementation of vtkRenderWindowInteractor in vtk4.2,
> the Position gotted is not actually the event position in window's
> screen display coordinate when actor in render window was scaled or
> rotated. How to get the position at render window's sreen disply
> coordinate using GetEventPosion() function? Any help?
Binjie,
You can try something like:
y = rwi->GetSize()[1] - rwi->GetEventPosition()[1] - 1;
'rwi' being your renderwindowinteractor:
HTH
Mathieu
Ps: Have also a look to 'vtkRenderWindowInteractor::SetEventPositionFlipY'
More information about the vtkusers
mailing list