------------------------------------------------------------------------------ Description: Number of 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) \post positive
| 304 | // \pre boundary: HasBoundary(boundary) |
| 305 | // \post positive_result: result>=0 |
| 306 | int vtkBridgeCell::CountNeighbors(vtkGenericAdaptorCell* boundary) |
| 307 | { |
| 308 | assert("pre: boundary_exists" && boundary != nullptr); |
| 309 | assert("pre: real_boundary" && !boundary->IsInDataSet()); |
| 310 | assert("pre: cell_of_the_dataset" && IsInDataSet()); |
| 311 | |
| 312 | vtkIdList* cells = vtkIdList::New(); |
| 313 | vtkBridgeCell* b = static_cast<vtkBridgeCell*>(boundary); |
| 314 | vtkIdList* pts = b->Cell->GetPointIds(); |
| 315 | this->DataSet->Implementation->GetCellNeighbors(this->Id, pts, cells); |
| 316 | int result = cells->GetNumberOfIds(); |
| 317 | cells->Delete(); |
| 318 | |
| 319 | assert("post: positive_result" && result >= 0); |
| 320 | |
| 321 | return result; |
| 322 | } |
| 323 | |
| 324 | //------------------------------------------------------------------------------ |
| 325 | // \pre large_enough: GetDimension()>=2 |
no test coverage detected