[vtkusers] Example of setting up global ids and retrieving selection in globalid?

Jesse Kinross-Smith Jesse.Kinross-Smith at bentley.com
Wed Feb 21 01:19:07 EST 2018


Ok.. I have a number of objects (lines, points, polygons, triangles and quads) I submit to a renderer.
Because there's a large number of objects (20k+) I have had to use a single actor to get any kind of speed out of VTK.

Each of these items has a unique ID internally, and I'm not sure where to store this as I submit each object.
I can submit a FieldData array for each item I guess, but then in my picker - how do I get the appropriate value back for the item that was picked?
In my selection code I'm using vtkCellPicker and using code very similar to: https://www.vtk.org/Wiki/VTK/Examples/Cxx/Picking/CellPicking

But then I don't know how to go the picker to get the FieldData array for the item that was picked.
GetFieldData() seems to return non null, but the value never changes dependent on what I've picked so that's not right either.

I would have thought using CellData would be more appropriate, but I always get back nullptrs at the picker from that too.

--
Jesse Kinross-Smith
Senior Software Engineer - BSW
Bentley Systems, Fremantle


More information about the vtkusers mailing list