[vtkusers] How to be notified when an interaction style is set (from Python)?

Elvis Stansvik elvis.stansvik at orexplore.com
Mon Jun 20 09:02:10 EDT 2016


Hi all,

In my custom interaction style (derived from vtkInteractionStyleUser), I
have a need to be notified when the interaction style is set on an
interactor.

The reason I need this is that the purpose of my interaction style is to
lock the camera position to a cylinder around my subject: The user should
be able to zoom in/out, rotate around the subject on a circle, change the
azimuth, and pan up/down along the subject (which has the shape of standing
cylinder), but not perform other camera movements. The focal point should
always be on the axis through the middle of my subject which is parallel to
the Y ("vertical") axis. I therefore would like to do some initialization
of the camera when the interactor is first set on the interactor style
(and, I guess equivalently, when the interaction style is set on the
interactor).

In C++ I think I could override SetInteractor on the interactor style, but
in Python that won't work. Is there some event I could listen for which
fires when the interaction style gets a new interactor?

Elvis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160620/84dbefe0/attachment.html>


More information about the vtkusers mailing list