MCPcopy Create free account
hub / github.com/Kitware/VTK / BuildLocatorInternal

Method BuildLocatorInternal

Common/DataModel/vtkKdTreePointLocator.cxx:94–115  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

92
93//------------------------------------------------------------------------------
94void vtkKdTreePointLocator::BuildLocatorInternal()
95{
96 if (!this->DataSet || (this->DataSet->GetNumberOfPoints()) < 1)
97 {
98 vtkErrorMacro(<< "No points to build");
99 return;
100 }
101 // Prepare
102 this->FreeSearchStructure();
103
104 vtkPointSet* pointSet = vtkPointSet::SafeDownCast(this->GetDataSet());
105 if (!pointSet)
106 {
107 vtkErrorMacro("vtkKdTreePointLocator requires a PointSet to build locator.");
108 return;
109 }
110 this->KdTree = vtkKdTree::New();
111 this->KdTree->SetUseExistingSearchStructure(this->UseExistingSearchStructure);
112 this->KdTree->BuildLocatorFromPoints(pointSet);
113 this->KdTree->GetBounds(this->Bounds);
114 this->BuildTime.Modified();
115}
116
117//------------------------------------------------------------------------------
118void vtkKdTreePointLocator::GenerateRepresentation(int level, vtkPolyData* pd)

Callers 2

BuildLocatorMethod · 0.95
ForceBuildLocatorMethod · 0.95

Calls 7

FreeSearchStructureMethod · 0.95
NewFunction · 0.50
GetNumberOfPointsMethod · 0.45
GetDataSetMethod · 0.45
GetBoundsMethod · 0.45
ModifiedMethod · 0.45

Tested by

no test coverage detected