[vtkusers] vtkinteractorstyle

David Doria daviddoria+vtk at gmail.com
Tue Nov 24 08:14:00 EST 2009


On Tue, Nov 24, 2009 at 4:03 AM, Radu Ilinca <radu_away_hu at yahoo.com> wrote:
>
> Hello.
>
> For learning the event interaction in VTK , i derived my own class from vtkinteractorstyle and implemented the OnChar method with custom actions. However, the default behavious (like the mouse clicks but not only) do not work anymore. How can I avoid this (preserve the default responses while just "overwritting" / adding my own?
>
> Thanks,
> Radu.


At the end of the OnChar() function, you need to call:

// forward events
vtkInteractorStyleTrackballCamera::OnChar();

(or whatever interactor you were using)

Here is a full example:
http://www.cmake.org/Wiki/Handle_keypress_events

Thanks,

David



More information about the vtkusers mailing list