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

Method SetCalculator

Common/DataModel/vtkKdTree.cxx:324–351  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

322
323//------------------------------------------------------------------------------
324void vtkKdTree::SetCalculator(vtkKdNode* kd)
325{
326 if (this->BSPCalculator)
327 {
328 this->BSPCalculator->Delete();
329 this->BSPCalculator = nullptr;
330 }
331
332 if (!this->UserDefinedCuts)
333 {
334 this->SetCuts(nullptr, 0);
335 }
336
337 if (kd == nullptr)
338 {
339 return;
340 }
341
342 if (!this->UserDefinedCuts)
343 {
344 vtkBSPCuts* cuts = vtkBSPCuts::New();
345 cuts->CreateCuts(kd);
346 this->SetCuts(cuts, 0);
347 }
348
349 this->BSPCalculator = vtkBSPIntersections::New();
350 this->BSPCalculator->SetCuts(this->Cuts);
351}
352
353//------------------------------------------------------------------------------
354void vtkKdTree::SetCuts(vtkBSPCuts* cuts)

Callers 4

~vtkKdTreeMethod · 0.95
BuildLocatorInternalMethod · 0.95
BuildLocatorMethod · 0.80

Calls 4

SetCutsMethod · 0.95
CreateCutsMethod · 0.80
DeleteMethod · 0.65
NewFunction · 0.50

Tested by

no test coverage detected