[vtkusers] switch interactor style depending on mouse position
Darshan Pai
darshanpai at gmail.com
Fri Mar 23 13:55:36 EDT 2012
You will probably need to subclass the vtkInteractorStyleSwitch .
Within the new subclass , I think you can specify some kind of picking
operation. And depending on if you picked a prop, you can use that as a
predicate for choosing trackball camera or trackball actor .
I do not know if there is anything builtin which does what you are asking
for .
Regards
Darshan
On Thu, Mar 22, 2012 at 5:15 PM, Thomas Ka <t-ka at gmx.net> wrote:
> 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
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120323/7edfd480/attachment.htm>
More information about the vtkusers
mailing list