[vtkusers] vtkPropPicker and vtkPicker::SetTolerance questions.

Piotr Byzia piotr.byzia at gmail.com
Tue Dec 1 08:13:09 EST 2009


In reference to my e-mail at http://www.vtk.org/pipermail/vtkusers/2009-November/104198.html
this is what I found so far:

vtkPropPicker has AddPickList, where I can specify which actor(s) I want to mark as picked.
I'm using it like this:

self.propPicker = vtk.vtkPropPicker()
widget_3d.GetRenderWindow().GetInteractor().SetPicker(self.propPicker)

selff.propPicker.AddPickList(actor)
selff.propPicker.AddPickList(another_actor)

widget_3d.GetRenderWindow().GetInteractor().GetInteractorStyle().SetCurrentStyleToTrackballActor()

self.propPicker.GetPickList() returns number of items as 2, which is correct.

What I expect at this point is to be able to rotate (with a mouse) both actors, but by picking (again, with the mouse) one of the actors that has PickableOn(), I'm rotating only this one, not *all* that I gathered in the PickList.

I assume, that by another selection action I'm overwriting self.propPicker list -- so my question is: how to prevent overwriting and be able to rotate all actors that were added to the PickList?


On the other hand, vtkCellPicker seems to ignore setting tolerance value like this:

propPicker = vtk.vtkCellPicker()
print propPicker.GetTolerance()
propPicker.SetTolerance(50)
print propPicker.GetTolerance()
GetRenderWindow().GetInteractor().SetPicker(propPicker)

0.025
50.0

I still have to precisely pick my actor.
Do I have to add here something? Refresh the interactor, renderer, yet something else??

Thanks,
Piotr Byzia


More information about the vtkusers mailing list