Commit 17c972d1 authored by Andy Bauer's avatar Andy Bauer
Browse files

BUG: Fixed problem where we were getting false positives for searches due to...

BUG: Fixed problem where we were getting false positives for searches due to not properly checking against search distance.
parent 9a2c14ef
......@@ -51,7 +51,7 @@
#include <vtkstd/queue>
#include <vtkstd/set>
vtkCxxRevisionMacro(vtkKdTree, "1.6");
vtkCxxRevisionMacro(vtkKdTree, "1.7");
// Timing data ---------------------------------------------
......@@ -2430,7 +2430,7 @@ int vtkKdTree::FindClosestPointInSphere(double x, double y, double z,
int newLocalCloseId = this->_FindClosestPointInRegion(neighbor,
x, y, z, newDistance2);
if (newDistance2 < minDistance2)
if (newDistance2 < minDistance2 && newDistance2 <= radius*radius)
{
minDistance2 = newDistance2;
localCloseId = newLocalCloseId;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment