[vtkusers] Re: vtkusers digest, Vol 1 #1709 - 10 msgs

Clinton Stimpson clinton at elemtech.com
Mon Mar 31 14:34:43 EST 2003


Have a look at vtkInteractorStyle.  You can subclass it to create your 
own behavior.  Or you can use any of the derived classes.  You have a 
few options there.

Another approach will be to use a vtkInteractorObserver which will watch 
for events too.

Clint

vtkusers-request at public.kitware.com wrote:

>--__--__--
>
>Message: 10
>Date: Mon, 31 Mar 2003 20:36:32 +0200
>From: Jonathan Bailleul <Jonathan.Bailleul at greyc.ismra.fr>
>Organization: GREYC - ISMRA
>To: VTK-User <vtkusers at public.kitware.com>
>Subject: [vtkusers] Point picking: how to handle mouse (keyboard?) events??
>
>Dear all, 
>
>Though this question should be trivial, I did not figured out how to
>solve it through the online doc or thanks to the book that was just
>stolen from the library ;(
>
>I would like to find out how to execute a method when a special mouse
>event occurs (left button pressed). It seems like i found out how to
>retrieve mouse position, already. I would also get content with a
>keyboard event, even if I'd prefer a mouse one.
>
>The other problem is I can't figure out how to mix mouse event handling
>with standard interaction. Here
>(http://www.greyc.ismra.fr/~bailleul/These/picker.cc) is a simple
>program displaying a mesh that can be moved interactively, with
>interaction lauched via: 
>
>
>	...
>  // render an image (lights and cameras are created automatically)
>  renWin->Render();
>
>  // begin mouse interaction
>  iren->Start();
>
>  return EXIT_SUCCESS;
>}
>
>How should I modify it for my purpose?
>The final aim is to retrieve the position of a mesh point selected by
>the mouse (not the current point coordinates, but the point in vtk
>file).
>
>
>In advance, thank you for your help.
>
>
>  
>





More information about the vtkusers mailing list