vtkCellPicker incorrectly determines PointId
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
This code snippet below is from vtkCellPicker line 577. It should set iMaxWeight to i for the point i with the largest weight, but instead it always sets iMaxWeight to the last i with a positive weight.
Solution: in the if-branch the line maxWeight = weights[i]; should be added...
double maxWeight = 0;
vtkIdType iMaxWeight = -1;
for (vtkIdType i = 0; i < numPoints; i++)
{
if (weights[i] > maxWeight)
{
iMaxWeight = i;
}
}