Dear ParaView community,
I am implementing a feature to select the whole polydata. In this example, an actor is highlighted by vtkPolyDataSilhouette
by left click. I would like to do the same thing in Paraview.
I already implemented the the UI part in pqStandardViewFrameActionsImplementation
I have a toolbar button inside ViewFrame. If togged, it enters interaction mode and allows me to pick the whole polydata where my cursor location belongs.
My understanding is that in pqRenderViewSelectionReaction.cxx
, I need to call status = rmp->SelectActors(region, selectedRepresentations, selectionSources);
, where SelectActors() is my own implementation in vtkSMRenderViewProxy
which returns selectedRepresentations and selectionSources. But I don’t really understand how to use vtkClientServerStream stream;
to return
this->SelectInternal(stream, selectedRepresentations, selectionSources,
multiple_selections, modifier, select_blocks);
I was hoping that using
vtkNew<vtkPropPicker> picker;
int isPicked = picker->Pick(region[0], region[1], 0, this->GetRenderer());
picker->GetActor();
to get the actor where my cursor location belongs. But I am not sure how to convert this to selectedRepresentations and selectionSources as requested in the pqRenderViewSelectionReaction
workflow.
Any help is appreciated.
Thanks,
Cam