------------------------------------------------------------------------------ Build the kdtree structure based on location of cell centroids.
| 745 | //------------------------------------------------------------------------------ |
| 746 | // Build the kdtree structure based on location of cell centroids. |
| 747 | void vtkKdTree::BuildLocator() |
| 748 | { |
| 749 | // don't rebuild if build time is newer than modified and dataset modified time |
| 750 | if (this->Top && this->BuildTime > this->MTime && this->NewGeometry() == 0) |
| 751 | { |
| 752 | return; |
| 753 | } |
| 754 | // don't rebuild if UseExistingSearchStructure is ON and a search structure already exists |
| 755 | if (this->Top && this->UseExistingSearchStructure) |
| 756 | { |
| 757 | this->BuildTime.Modified(); |
| 758 | vtkDebugMacro(<< "BuildLocator exited - UseExistingSearchStructure"); |
| 759 | return; |
| 760 | } |
| 761 | this->BuildLocatorInternal(); |
| 762 | } |
| 763 | |
| 764 | //------------------------------------------------------------------------------ |
| 765 | void vtkKdTree::ForceBuildLocator() |