------------------------------------------------------------------------------
| 753 | |
| 754 | //------------------------------------------------------------------------------ |
| 755 | inline 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 | //------------------------------------------------------------------------------ |
| 788 | inline int vtkPolyData::IsPointUsedByCell(vtkIdType ptId, vtkIdType cellId) |