------------------------------------------------------------------------------
| 2004 | |
| 2005 | //------------------------------------------------------------------------------ |
| 2006 | int vtkKdTree::SearchRegionForDuplicate(float* point, int* pointsSoFar, int len, float tolerance2) |
| 2007 | { |
| 2008 | int duplicateFound = -1; |
| 2009 | int id; |
| 2010 | |
| 2011 | for (id = 0; id < len; id++) |
| 2012 | { |
| 2013 | int otherId = pointsSoFar[id]; |
| 2014 | |
| 2015 | float* otherPoint = this->LocatorPoints + (otherId * 3); |
| 2016 | |
| 2017 | float distance2 = vtkMath::Distance2BetweenPoints(point, otherPoint); |
| 2018 | |
| 2019 | if (distance2 <= tolerance2) |
| 2020 | { |
| 2021 | duplicateFound = otherId; |
| 2022 | break; |
| 2023 | } |
| 2024 | } |
| 2025 | return duplicateFound; |
| 2026 | } |
| 2027 | |
| 2028 | //------------------------------------------------------------------------------ |
| 2029 | int vtkKdTree::SearchNeighborsForDuplicate( |
no outgoing calls
no test coverage detected