[vtkusers] InteractorStyle Subclassing

Majid Mohammad sadeghi majid.msadeghi at yahoo.com
Tue Jan 16 04:40:53 EST 2018


Dear All,
What I am trying to do is:
Based on the position of the mouse click in the window, if no actor is clicked on, then move the camera (like InteractorStyleTrackballCamera) but if the mouse is clicked on an actor(and there are different actors in the scene), then move the actor (like InteractorStyleTrackballActor). Also limit the motion type of the actor to a specific translation or rotation.

The way I think I might be able to do it is:
 Write my own interactor style with a combination of trackballActor and trackballCamera after I check the pickposition of the mouse.
My question is:
Am I in the right path? Can I do it in a faster or better way? Is there a widget which might help me?
Thank you all.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180116/c6f87870/attachment.html>


More information about the vtkusers mailing list