Fastest picking of closest actor?

I’ve been looking over the different picking methods in vtk.js, but I haven’t been able to figure the best way to do fast actor-level picking. I don’t need point or cell picking, but I need more accurate picking than bounding box picking.

In lieu of this kind of picking, I’ve experimented with point picking where I update a text string as I move the mouse around. It looks like the points and actors aren’t sorted, which seems like the most useful choice. Is that right?

Thanks.

You need to use the hardware picker. Unfortunately that one does not have a good documentation or example. We use it heavily for the widgets so if you can’t wait you can look into the WidgetManager implementation. But I was planning to create an example in the coming days to ease its usage for the community. I’ll try to post back the link of the example once I’ve done it.

Thanks so much. I think such an example would be widely useful to the community.

The example is available here and the website should naturally update thanks to Travis, but it will take another ~40 minutes.

Live example available here

Thanks, worked great.

1 Like