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

Method AddAllPointsInRegion

Common/DataModel/vtkKdTree.cxx:4674–4692  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

4672
4673//------------------------------------------------------------------------------
4674void vtkKdTree::AddAllPointsInRegion(vtkKdNode* node, vtkIdTypeArray* ids)
4675{
4676 if (node->GetLeft() == nullptr)
4677 {
4678 int regionID = node->GetID();
4679 int regionLoc = this->LocatorRegionLocation[regionID];
4680 vtkIdType numPoints = this->RegionList[regionID]->GetNumberOfPoints();
4681 for (vtkIdType i = 0; i < numPoints; i++)
4682 {
4683 vtkIdType ptId = static_cast<vtkIdType>(this->LocatorIds[regionLoc + i]);
4684 ids->InsertNextValue(ptId);
4685 }
4686 }
4687 else
4688 {
4689 this->AddAllPointsInRegion(node->GetLeft(), ids);
4690 this->AddAllPointsInRegion(node->GetRight(), ids);
4691 }
4692}
4693
4694//------------------------------------------------------------------------------
4695void vtkKdTree::AddAllPointsInRegion(vtkKdNode* node, vtkIdList* ids)

Callers 2

FindPointsInAreaMethod · 0.95

Calls 3

InsertNextIdMethod · 0.80
GetNumberOfPointsMethod · 0.45
InsertNextValueMethod · 0.45

Tested by

no test coverage detected