[vtkusers] capture mouse position
Diego Parada
icebishop at gmail.com
Tue Sep 13 20:43:20 EDT 2005
Hi;
I can't get the mouse positon, the code is:
//replace the vtkCommand
void OnLButtonUp(vtkObject *caller, unsigned long eid, void *clientdata,
void *calldata)
{
int x,y;
vtkInteractorStyle * istyle = (vtkInteractorStyle *) caller;
vtkRenderWindowInteractor * iren = istyle->GetInteractor();
iren->GetMousePosition(&x,&y);
}
// whit style interactor
vtkInteractorStyle * istyle = vtkInteractorStyle::New();
vtkCallbackCommand * LMouseUp = vtkCallbackCommand::New();
LMouseUp->SetCallback(OnLButtonUp);
istyle->AddObserver(vtkCommand::LeftButtonReleaseEvent,LMouseUp);
this->m_InteractorRender->SetInteractorStyle(istyle);
the code runs but not capture the mouse position
the application is made in VC++ 6.0 MFC
Thanks
--
Diego Armando Parada Cuervo
Estudiante de Ingeniería de Sistemas y Computación
Universidad Pedagógica y Tecnológica de Colombia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20050913/5c01d342/attachment.htm>
More information about the vtkusers
mailing list