[vtkusers] How can i get the mouse position? GetMousePosition?

BoShi chinaren.vtk at gmail.com
Sun Jun 4 07:34:22 EDT 2006


In the following source code ,

vtkRenderWindowInteractor* iren =
vtkRenderer* renderer = (vtkRenderer*)clientdata;

vtkWorldPointPicker* picker = vtkWorldPointPicker::New();
double pickCoords[3];

int mouseX,mouseY;
iren->GetMousePosition(&mouseX, &mouseY);
picker->Pick(mouseX, mouseY, 0.0, renderer);


I debug these code I found the mouseX and mouseY got from
GetMousePosition are constant and doesn't change while I' changing the
mouse double click. Why?

Who can tell me? Thanks a lot!

More information about the vtkusers mailing list