I am using vtkMultiBlockDataSet with vtkDataSetSurfaceFilter and vtkCompositePolyDataMapper to build a rendering pipeline. I want to implement functionality to hide the block that is picked. To achieve this, I use vtkCellPicker->GetFlatBlockIndex() and vtkCompositePolyDataMapper->SetBlockVisibility().
However, I found that the result is not ideal because, although I managed to hide the block, vtkCellPicker can still pick it. This prevents me from hiding the block behind the previously hidden one. Is there any method to solve this problem?
Thanks in advance
The vtkCellPicker has code to handle vtkCompositeDataSet, but it has no code for vtkCompositePolyDataMapper. Therefore the picker doesn’t know whether the blocks are visible or not.
For this to work, someone would need to add a block visibility check to vtkCellPicker.cxx.
Thank you very much for your reply! I have resolved the issue by inheriting from vtkCellPicker and overriding its IntersectActorWithLine. However, I found that when using a large number of blocks (around 8000, each block containing approximately 2500 cells) and trying to update their coordinates, the performance of vtkCompositePolyDataMapper is quite poor. Therefore, I plan to abandon this approach and try a different path. I would greatly appreciate it if anyone could offer a better solution.