[vtkusers] GetMousePosition(&x,&y) doesn't work!!!!

David Català david.catala at datapixel.com
Fri Dec 5 03:29:54 EST 2003


Hi,
In the class vtkInteractorStyle you have many functions
OnMouseMove
OnLeftButtonDown
and other
where you have x and y mouse coordinates

Regards,
David
-----Mensaje original-----
De: vtkusers-admin at vtk.org [mailto:vtkusers-admin at vtk.org]En nombre de
Rahul Goela
Enviado el: divendres, 5 / desembre / 2003 07:28
Para: vtkusers at vtk.org
Asunto: [vtkusers] GetMousePosition(&x,&y) doesn't work!!!!


Hi,

I want to get the current mouse position and am using
the following code:

int mouseX, mouseY;
float z;
iren->GetMousePosition(&mouseX, &mouseY);
z=renderer->GetZ(mouseX,mouseY);

This gives me following values always...even when i
keep move the mouse on the interactor window.

mouseX = 0
mouseY = 0
z = 1

This is vry WIERD!!!!

Isn't there any way in VTK to get the current mouse
pointer position?

any help in this regard would be appreciated.

Thanks in advance!

regards,

Rahul

______________________________________________________________________
__
Yahoo! India Mobile: Download the latest polyphonic ringtones.
Go to http://in.mobile.yahoo.com
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers




More information about the vtkusers mailing list