[vtkusers] About MouseEvents.py example
Elvis Stansvik
elvis.stansvik at orexplore.com
Fri Jun 17 09:15:41 EDT 2016
2016-06-17 14:58 GMT+02:00 David Gobbi <david.gobbi at gmail.com>:
> On Fri, Jun 17, 2016 at 6:23 AM, Elvis Stansvik <
> elvis.stansvik at orexplore.com> wrote:
>
>>
>> Alright, I see. Would you mind sharing how you handle custom interactions
>> with a VTK rendering, if you don't use the interactor styles?
>>
>> Do you directly observe events on the interactor instead? Or do you
>> simply handle the Qt events directly and then perform the appropriate
>> manipulation of VTK objects in response to those?
>>
>> I'm very interested in if you use some event forwarding code similar to
>> that in QVTKRenderWindowInteractor, or if you are simply not bothering with
>> feeding input events from Qt to VTK, and handling all input on the Qt side
>> of the fence so to speak.
>>
>
> I have a subclass of QWidget that receives the Qt events and converts them
> to my own events (which are similar to Qt events but also carry useful VTK
> information). Those events are dispatched to my interaction bindings.
> I've always done interaction in VTK this way. Neither the
> vtkRenderWindowInteractor or QVTKWidget play any role.
>
That's very interesting, since I've got a feeling that's the direction I'm
going as well. Thanks for sharing.
When you say "interaction bindings", do you mean like a pluggable event
handler that you can set on your QWidget subclass, to handle your custom
events?
The thing is, I've cut down VTKRenderWindowInteractor to the bare minimum I
thought I'd need, and cleaned it up a little, but I'm realizing now that I
might not even want to do the event forwarding thing it does, but rather
something like the system you describe (where you completely forego the
interactor system of VTK).
Elvis
> - David
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160617/456c580b/attachment.html>
More information about the vtkusers
mailing list