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

Method GetCellBounds

Common/DataModel/vtkPolyData.cxx:281–298  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Fast implementation of GetCellBounds(). Bounds are calculated without constructing a cell. This method is expected to be thread-safe.

Source from the content-addressed store, hash-verified

279// Fast implementation of GetCellBounds(). Bounds are calculated without
280// constructing a cell. This method is expected to be thread-safe.
281void vtkPolyData::GetCellBounds(vtkIdType cellId, double bounds[6])
282{
283 if (!this->Cells)
284 {
285 this->BuildCells();
286 }
287
288 const TaggedCellId tag = this->Cells->GetTag(cellId);
289 if (tag.IsDeleted())
290 {
291 std::fill_n(bounds, 6, 0.);
292 return;
293 }
294
295 vtkCellArray* cells = this->GetCellArrayInternal(tag);
296 const vtkIdType localCellId = tag.GetCellId();
297 cells->Dispatch(ComputeCellBoundsVisitor{}, this->Points, localCellId, bounds);
298}
299
300//------------------------------------------------------------------------------
301// This method only considers points that are used by one or more cells. Thus

Callers

nothing calls this directly

Calls 6

BuildCellsMethod · 0.95
GetCellArrayInternalMethod · 0.95
fill_nFunction · 0.85
GetTagMethod · 0.80
GetCellIdMethod · 0.45
DispatchMethod · 0.45

Tested by

no test coverage detected