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

Method GetNeighbors

Testing/GenericBridge/vtkBridgeCell.cxx:358–372  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Description: Put into `neighbors' the cells (dimension>boundary->GetDimension()) of the dataset that share the boundary `boundary' of `this'. `this' IS NOT INCLUDED. \pre boundary_exists: boundary!=0 \pre real_boundary: !boundary->IsInDataSet() \pre cell_of_the_dataset: IsInDataSet() \pre boundary: HasBoundary(boundary)

Source from the content-addressed store, hash-verified

356// \pre boundary: HasBoundary(boundary)
357// \pre neighbors_exist: neighbors!=0
358void vtkBridgeCell::GetNeighbors(vtkGenericAdaptorCell* boundary, vtkGenericCellIterator* neighbors)
359{
360 assert("pre: boundary_exists" && boundary != nullptr);
361 assert("pre: real_boundary" && !boundary->IsInDataSet());
362 assert("pre: cell_of_the_dataset" && IsInDataSet());
363 assert("pre: neighbors_exist" && neighbors != nullptr);
364
365 vtkIdList* cells = vtkIdList::New();
366 vtkIdList* pts = static_cast<vtkBridgeCell*>(boundary)->Cell->GetPointIds();
367 this->DataSet->Implementation->GetCellNeighbors(this->Id, pts, cells);
368
369 static_cast<vtkBridgeCellIterator*>(neighbors)->InitWithCells(cells, this->DataSet);
370
371 cells->Delete();
372}
373
374//------------------------------------------------------------------------------
375// Description:

Callers 3

RemoveExistingChairsMethod · 0.45
UpdateChairAtNodeMethod · 0.45

Calls 7

IsInDataSetMethod · 0.80
DeleteMethod · 0.65
assertFunction · 0.50
NewFunction · 0.50
GetPointIdsMethod · 0.45
GetCellNeighborsMethod · 0.45
InitWithCellsMethod · 0.45

Tested by

no test coverage detected