rockydut
(Rockydut)
3
vtkDataSetMapper* mapper = dynamic_cast<vtkDataSetMapper*>(actor->GetMapper());
vtkDataSet* data = mapper->GetInput();
vtkNew<vtkExtractEdges> edges;
edges->SetInputData(data);
edges->Update();
vtkPolyData *poly = edges->GetOutput();
int* clickpos = this->GetInteractor()->GetEventPosition();
vtkNew<vtkPropPicker> picker;
picker->Pick(clickpos[0], clickpos[1], 0, GetRenderer());
double *clickedcoord = picker->GetPickPosition();
///////////
//Then, I want to selectithe line from "poly" which near the "clickedcoord".