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

Method GetCellNumberOfFaces

Common/DataModel/vtkDataSet.cxx:371–406  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

369
370//------------------------------------------------------------------------------
371int vtkDataSet::GetCellNumberOfFaces(
372 vtkIdType cellId, unsigned char& cellType, vtkGenericCell* cell)
373{
374 // Handles only the most common cell types, otherwise calls GetCell to get the number of faces.
375 // See vtkUnstructuredGrid::GetCellNumberOfFaces for the complete list of cell types.
376 cellType = static_cast<unsigned char>(this->GetCellType(cellId));
377 switch (cellType)
378 {
379 case VTK_EMPTY_CELL:
380 case VTK_VERTEX:
381 case VTK_POLY_VERTEX:
382 case VTK_LINE:
383 case VTK_POLY_LINE:
384 case VTK_TRIANGLE:
385 case VTK_TRIANGLE_STRIP:
386 case VTK_POLYGON:
387 case VTK_PIXEL:
388 case VTK_QUAD:
389 return 0;
390 case VTK_TETRA:
391 return 4;
392 case VTK_PYRAMID:
393 case VTK_WEDGE:
394 return 5;
395 case VTK_VOXEL:
396 case VTK_HEXAHEDRON:
397 return 6;
398 case VTK_PENTAGONAL_PRISM:
399 return 7;
400 case VTK_HEXAGONAL_PRISM:
401 return 8;
402 default:
403 this->GetCell(cellId, cell);
404 return cell->GetNumberOfFaces();
405 }
406}
407
408namespace
409{

Callers

nothing calls this directly

Calls 3

GetCellTypeMethod · 0.45
GetCellMethod · 0.45
GetNumberOfFacesMethod · 0.45

Tested by

no test coverage detected