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

Method GetCellSize

Common/DataModel/vtkPolyData.h:755–785  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

753
754//------------------------------------------------------------------------------
755inline vtkIdType vtkPolyData::GetCellSize(vtkIdType cellId)
756{
757 if (!this->Cells)
758 {
759 this->BuildCells();
760 }
761 switch (this->GetCellType(cellId))
762 {
763 case VTK_EMPTY_CELL:
764 return 0;
765 case VTK_VERTEX:
766 return 1;
767 case VTK_LINE:
768 return 2;
769 case VTK_TRIANGLE:
770 return 3;
771 case VTK_QUAD:
772 return 4;
773 case VTK_POLY_VERTEX:
774 return this->Verts ? this->Verts->GetCellSize(this->GetCellIdRelativeToCellArray(cellId)) : 0;
775 case VTK_POLY_LINE:
776 return this->Lines ? this->Lines->GetCellSize(this->GetCellIdRelativeToCellArray(cellId)) : 0;
777 case VTK_POLYGON:
778 return this->Polys ? this->Polys->GetCellSize(this->GetCellIdRelativeToCellArray(cellId)) : 0;
779 case VTK_TRIANGLE_STRIP:
780 return this->Strips ? this->Strips->GetCellSize(this->GetCellIdRelativeToCellArray(cellId))
781 : 0;
782 }
783 vtkWarningMacro(<< "Cell type not supported.");
784 return 0;
785}
786
787//------------------------------------------------------------------------------
788inline int vtkPolyData::IsPointUsedByCell(vtkIdType ptId, vtkIdType cellId)

Callers 15

InsertCellsToGridMethod · 0.45
InsertFacesToGridMethod · 0.45
MakeBoundaryMeshMethod · 0.45
ReadPieceDataMethod · 0.45
CombineTopologiesMethod · 0.45
WriteDataMethod · 0.45
FillMixedShapeFunction · 0.45
FillTopologyFunction · 0.45
FillFieldArrayValuesFunction · 0.45
AddLassoBrushPointMethod · 0.45
GetCellBoundsMethod · 0.45

Calls 3

BuildCellsMethod · 0.95
GetCellTypeMethod · 0.95

Tested by 15

TestGetCellSizeFunction · 0.36
test_rg3dFunction · 0.36
test_rg2d_xyFunction · 0.36
test_rg2d_xzFunction · 0.36
test_rg2d_yzFunction · 0.36
test_rg1d_xFunction · 0.36
test_rg1d_yFunction · 0.36
test_rg1d_zFunction · 0.36
test_rg0dFunction · 0.36
TestOIDFunction · 0.36
TestOSG_0dFunction · 0.36
TestOSG_1dxFunction · 0.36