vtkCellPicker::IntersectActorWithLine may use invalid cell id when picking composite data
When vtkCellPicker::IntersectActorWithLine
is called on composite data, minCellId
and minSubId
may be invalid for the data set picked: minCellId
and others are not necessarily updated in the following call to vtkCellPicker::IntersectDataSetWithLine
:
bool ok = this->IntersectDataSetWithLine(ds, p1, p2, t1, t2, tol, loc, minCellId, minSubId, tMin, pDistMin, minXYZ, minPCoords); if ( ok ) { flatIndex = iter->GetCurrentFlatIndex(); data = ds; locator = loc; }
So if two data sets are intersected successfully but only the first intersection updates minCellId and minSubId, and no locator is returned, retrieving the cell later on may result in using a wrong cell or even a crash.