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

Method BuildCellLocator

Common/DataModel/vtkPointSet.cxx:160–185  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Build the cell locator (if needed)

Source from the content-addressed store, hash-verified

158//------------------------------------------------------------------------------
159// Build the cell locator (if needed)
160void vtkPointSet::BuildCellLocator()
161{
162 if (!this->Points)
163 {
164 return;
165 }
166
167 if (!this->CellLocator)
168 {
169 if (this->Editable || !this->Points->GetData()->HasStandardMemoryLayout())
170 {
171 this->CellLocator = vtkCellLocator::New();
172 }
173 else
174 {
175 this->CellLocator = vtkStaticCellLocator::New();
176 }
177 this->CellLocator->SetDataSet(this);
178 }
179 else if (this->Points->GetMTime() > this->CellLocator->GetMTime())
180 {
181 this->CellLocator->SetDataSet(this);
182 }
183
184 this->CellLocator->BuildLocator();
185}
186
187//------------------------------------------------------------------------------
188vtkIdType vtkPointSet::FindPoint(double x[3])

Callers 2

InitializeMethod · 0.80
CreateLocatorsMethod · 0.80

Calls 6

NewFunction · 0.50
GetDataMethod · 0.45
SetDataSetMethod · 0.45
GetMTimeMethod · 0.45
BuildLocatorMethod · 0.45

Tested by

no test coverage detected