[vtkusers] switch interactor style depending on mouse position

Thomas Ka t-ka at gmx.net
Thu Mar 22 17:15:58 EDT 2012


Hello list!

Can you help me with the following problem?

I'd like to use an interactor style that works like a vtkInteractorStyleTrackballActor (move the actor) when the mouse is dragged above an actor, and when the mouse is dragged above the background the style should work like a vtkInteractorStyleTrackballCamera (move/rotate the scene).

Does such a style exist in VTK? If not, how can I build it? Is it possible to use a vtkInteractorStyleSwitch and call its methods SetCurrentStyleToTrackballActor/Camera at the beginning of each drag operation? How can I detect whether the dragging is performed above an actor or not? If possible, please give a link to some code snippets.

Thank you for any comment!
Thomas
-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de



More information about the vtkusers mailing list