[vtkusers] Picking actor and move others

Totte Karlsson totte at dunescientific.com
Mon Apr 6 17:51:17 EDT 2015


Hello,
I have code using a subject/observer pattern, where the observer is 
basically a vtk actor.
Some subjects may be rendered using several independent actors (I do not 
combine them into a vtkAssembly).

I am currently trying to interactively move a subject, by picking an 
actor, tracing it back to corresponding subject, and then move all 
corresponding actors from the obtained coordinates. However, this gets a 
little messy, cause one of the observers is the picked actor itself, and 
keeping track of that seem a little difficult.

So I am looking for a simpler way. Is it possible in a MouseDown event 
to 'switch' out a picked actor, with another "proxy" actor, and then use 
the position/movement of the proxy actor to set the position of my subject?

Something on the lines of using a seedwidget, that get created and 
picked when another actor is picked.
However, I don't see how it can be done easily or even if it make sense.

Cheers,
tk



More information about the vtkusers mailing list