VTK  9.3.1
vtkPolyData.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
56 #ifndef vtkPolyData_h
57 #define vtkPolyData_h
58 
59 #include "vtkCommonDataModelModule.h" // For export macro
60 #include "vtkPointSet.h"
61 
62 #include "vtkCellArray.h" // Needed for inline methods
63 #include "vtkCellLinks.h" // Needed for inline methods
64 #include "vtkPolyDataInternals.h" // Needed for inline methods
65 
66 VTK_ABI_NAMESPACE_BEGIN
67 class vtkVertex;
68 class vtkPolyVertex;
69 class vtkLine;
70 class vtkPolyLine;
71 class vtkTriangle;
72 class vtkQuad;
73 class vtkPolygon;
74 class vtkTriangleStrip;
75 class vtkEmptyCell;
76 struct vtkPolyDataDummyContainter;
78 
79 class VTKCOMMONDATAMODEL_EXPORT vtkPolyData : public vtkPointSet
80 {
81 public:
82  static vtkPolyData* New();
83  static vtkPolyData* ExtendedNew();
84 
85  vtkTypeMacro(vtkPolyData, vtkPointSet);
86  void PrintSelf(ostream& os, vtkIndent indent) override;
87 
91  int GetDataObjectType() override { return VTK_POLY_DATA; }
92 
96  void CopyStructure(vtkDataSet* ds) override;
97 
99 
102  vtkIdType GetNumberOfCells() override;
103  using vtkDataSet::GetCell;
104  vtkCell* GetCell(vtkIdType cellId) override;
105  void GetCell(vtkIdType cellId, vtkGenericCell* cell) override;
106  int GetCellType(vtkIdType cellId) override;
107  vtkIdType GetCellSize(vtkIdType cellId) override;
108  void GetCellBounds(vtkIdType cellId, double bounds[6]) override;
109  void GetCellNeighbors(vtkIdType cellId, vtkIdList* ptIds, vtkIdList* cellIds) override;
111 
119  void CopyCells(vtkPolyData* pd, vtkIdList* idList, vtkIncrementalPointLocator* locator = nullptr);
120 
124  void GetCellPoints(vtkIdType cellId, vtkIdList* ptIds) override;
125 
130  void GetPointCells(vtkIdType ptId, vtkIdList* cellIds) override;
131 
150  void ComputeCellsBounds();
151 
157  void GetCellsBounds(double bounds[6]);
158 
165  void Squeeze() override;
166 
170  int GetMaxCellSize() override;
171 
177  vtkIdType GetCellIdRelativeToCellArray(vtkIdType cellId);
178 
182  void SetVerts(vtkCellArray* v);
183 
188  vtkCellArray* GetVerts();
189 
193  void SetLines(vtkCellArray* l);
194 
199  vtkCellArray* GetLines();
200 
204  void SetPolys(vtkCellArray* p);
205 
210  vtkCellArray* GetPolys();
211 
215  void SetStrips(vtkCellArray* s);
216 
222  vtkCellArray* GetStrips();
223 
225 
228  vtkIdType GetNumberOfVerts() { return (this->Verts ? this->Verts->GetNumberOfCells() : 0); }
229  vtkIdType GetNumberOfLines() { return (this->Lines ? this->Lines->GetNumberOfCells() : 0); }
230  vtkIdType GetNumberOfPolys() { return (this->Polys ? this->Polys->GetNumberOfCells() : 0); }
231  vtkIdType GetNumberOfStrips() { return (this->Strips ? this->Strips->GetNumberOfCells() : 0); }
233 
243  bool AllocateEstimate(vtkIdType numCells, vtkIdType maxCellSize);
244 
254  bool AllocateEstimate(vtkIdType numVerts, vtkIdType maxVertSize, vtkIdType numLines,
255  vtkIdType maxLineSize, vtkIdType numPolys, vtkIdType maxPolySize, vtkIdType numStrips,
256  vtkIdType maxStripSize);
257 
267  bool AllocateExact(vtkIdType numCells, vtkIdType connectivitySize);
268 
279  bool AllocateExact(vtkIdType numVerts, vtkIdType vertConnSize, vtkIdType numLines,
280  vtkIdType lineConnSize, vtkIdType numPolys, vtkIdType polyConnSize, vtkIdType numStrips,
281  vtkIdType stripConnSize);
282 
291  bool AllocateCopy(vtkPolyData* pd);
292 
302  bool AllocateProportional(vtkPolyData* pd, double ratio);
303 
310  void Allocate(vtkIdType numCells = 1000, int vtkNotUsed(extSize) = 1000)
311  {
312  this->AllocateExact(numCells, numCells);
313  }
314 
325  void Allocate(vtkPolyData* inPolyData, vtkIdType numCells = 1000, int vtkNotUsed(extSize) = 1000)
326  {
327  this->AllocateProportional(
328  inPolyData, static_cast<double>(numCells) / inPolyData->GetNumberOfCells());
329  }
330 
338  vtkIdType InsertNextCell(int type, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
339 
347  vtkIdType InsertNextCell(int type, vtkIdList* pts);
348 
353  void Reset();
354 
362  void BuildCells();
363 
367  bool NeedToBuildCells() { return this->Cells == nullptr; }
368 
375  void BuildLinks(int initialSize = 0);
376 
378 
383  virtual void SetLinks(vtkAbstractCellLinks* links);
384  vtkGetSmartPointerMacro(Links, vtkAbstractCellLinks);
386 
392  void DeleteCells();
393 
397  void DeleteLinks();
398 
400 
404  void GetPointCells(vtkIdType ptId, vtkIdType& ncells, vtkIdType*& cells)
405  VTK_SIZEHINT(cells, ncells);
407 
413  void GetCellEdgeNeighbors(vtkIdType cellId, vtkIdType p1, vtkIdType p2, vtkIdList* cellIds);
414 
426  unsigned char GetCellPoints(vtkIdType cellId, vtkIdType& npts, vtkIdType const*& pts)
427  VTK_SIZEHINT(pts, npts);
428 
443  void GetCellPoints(vtkIdType cellId, vtkIdType& npts, vtkIdType const*& pts, vtkIdList* ptIds)
444  VTK_SIZEHINT(pts, npts) override;
445 
450  int IsTriangle(int v1, int v2, int v3);
451 
459  int IsEdge(vtkIdType p1, vtkIdType p2);
460 
465  int IsPointUsedByCell(vtkIdType ptId, vtkIdType cellId);
466 
475  void ReplaceCell(vtkIdType cellId, vtkIdList* ids);
476  void ReplaceCell(vtkIdType cellId, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
479 
489  void ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId, vtkIdType newPtId);
490  void ReplaceCellPoint(
491  vtkIdType cellId, vtkIdType oldPtId, vtkIdType newPtId, vtkIdList* cellPointIds);
493 
498  void ReverseCell(vtkIdType cellId);
499 
501 
505  void DeletePoint(vtkIdType ptId);
506  void DeleteCell(vtkIdType cellId);
508 
517  void RemoveDeletedCells();
518 
520 
528  vtkIdType InsertNextLinkedPoint(int numLinks);
529  vtkIdType InsertNextLinkedPoint(double x[3], int numLinks);
531 
538  vtkIdType InsertNextLinkedCell(int type, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
539 
549  void ReplaceLinkedCell(vtkIdType cellId, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
550 
558  void RemoveCellReference(vtkIdType cellId);
559 
567  void AddCellReference(vtkIdType cellId);
568 
576  void RemoveReferenceToCell(vtkIdType ptId, vtkIdType cellId);
577 
585  void AddReferenceToCell(vtkIdType ptId, vtkIdType cellId);
586 
592  void ResizeCellList(vtkIdType ptId, int size);
593 
597  void Initialize() override;
598 
600 
603  virtual int GetPiece();
604  virtual int GetNumberOfPieces();
606 
610  virtual int GetGhostLevel();
611 
620  unsigned long GetActualMemorySize() override;
621 
623 
626  void ShallowCopy(vtkDataObject* src) override;
627  void DeepCopy(vtkDataObject* src) override;
629 
636  void RemoveGhostCells();
637 
639 
643  static vtkPolyData* GetData(vtkInformationVector* v, int i = 0);
645 
664  enum
665  {
666  ERR_NO_SUCH_FIELD = -4,
667  ERR_INCORRECT_FIELD = -3,
668  ERR_NON_MANIFOLD_STAR = -2,
669  REGULAR_POINT = -1,
670  MINIMUM = 0,
671  SADDLE = 1,
672  MAXIMUM = 2
673  };
674 
675  int GetScalarFieldCriticalIndex(vtkIdType pointId, vtkDataArray* scalarField);
676  int GetScalarFieldCriticalIndex(vtkIdType pointId, int fieldId);
677  int GetScalarFieldCriticalIndex(vtkIdType pointId, const char* fieldName);
678 
686  virtual vtkMTimeType GetMeshMTime();
687 
691  vtkMTimeType GetMTime() override;
692 
702  unsigned char GetCell(vtkIdType cellId, const vtkIdType*& pts);
703 
704 protected:
705  vtkPolyData();
706  ~vtkPolyData() override;
707 
708  void ReportReferences(vtkGarbageCollector*) override;
709 
712 
713  vtkCellArray* GetCellArrayInternal(TaggedCellId tag);
714 
715  // constant cell objects returned by GetCell called.
725 
726  // points inherited
727  // point data (i.e., scalars, vectors, normals, tcoords) inherited
732 
733  // supporting structures for more complex topological operations
734  // built only when necessary
737 
739 
740  // dummy static member below used as a trick to simplify traversal
741  static vtkPolyDataDummyContainter DummyContainer;
742 
743  // Take into account only points that belong to at least one cell.
744  double CellsBounds[6];
745 
747 
748 private:
749  void Cleanup();
750 
751  vtkPolyData(const vtkPolyData&) = delete;
752  void operator=(const vtkPolyData&) = delete;
753 };
754 
755 //------------------------------------------------------------------------------
756 inline void vtkPolyData::GetPointCells(vtkIdType ptId, vtkIdType& ncells, vtkIdType*& cells)
757 {
758  ncells = this->Links->GetNcells(ptId);
759  cells = this->Links->GetCells(ptId);
760 }
761 
762 //------------------------------------------------------------------------------
764 {
765  return (this->GetNumberOfVerts() + this->GetNumberOfLines() + this->GetNumberOfPolys() +
766  this->GetNumberOfStrips());
767 }
768 
769 //------------------------------------------------------------------------------
771 {
772  if (!this->Cells)
773  {
774  this->BuildCells();
775  }
776  return static_cast<int>(this->Cells->GetTag(cellId).GetCellType());
777 }
778 
779 //------------------------------------------------------------------------------
781 {
782  if (!this->Cells)
783  {
784  this->BuildCells();
785  }
786  switch (this->GetCellType(cellId))
787  {
788  case VTK_EMPTY_CELL:
789  return 0;
790  case VTK_VERTEX:
791  return 1;
792  case VTK_LINE:
793  return 2;
794  case VTK_TRIANGLE:
795  return 3;
796  case VTK_QUAD:
797  return 4;
798  case VTK_POLY_VERTEX:
799  return this->Verts ? this->Verts->GetCellSize(this->GetCellIdRelativeToCellArray(cellId)) : 0;
800  case VTK_POLY_LINE:
801  return this->Lines ? this->Lines->GetCellSize(this->GetCellIdRelativeToCellArray(cellId)) : 0;
802  case VTK_POLYGON:
803  return this->Polys ? this->Polys->GetCellSize(this->GetCellIdRelativeToCellArray(cellId)) : 0;
804  case VTK_TRIANGLE_STRIP:
805  return this->Strips ? this->Strips->GetCellSize(this->GetCellIdRelativeToCellArray(cellId))
806  : 0;
807  }
808  vtkWarningMacro(<< "Cell type not supported.");
809  return 0;
810 }
811 
812 //------------------------------------------------------------------------------
813 inline int vtkPolyData::IsTriangle(int v1, int v2, int v3)
814 {
815  vtkIdType n1;
816  int i, j, tVerts[3];
817  vtkIdType* cells;
818  const vtkIdType* tVerts2;
819  vtkIdType n2;
820 
821  tVerts[0] = v1;
822  tVerts[1] = v2;
823  tVerts[2] = v3;
824 
825  for (i = 0; i < 3; i++)
826  {
827  this->GetPointCells(tVerts[i], n1, cells);
828  for (j = 0; j < n1; j++)
829  {
830  this->GetCellPoints(cells[j], n2, tVerts2);
831  if ((tVerts[0] == tVerts2[0] || tVerts[0] == tVerts2[1] || tVerts[0] == tVerts2[2]) &&
832  (tVerts[1] == tVerts2[0] || tVerts[1] == tVerts2[1] || tVerts[1] == tVerts2[2]) &&
833  (tVerts[2] == tVerts2[0] || tVerts[2] == tVerts2[1] || tVerts[2] == tVerts2[2]))
834  {
835  return 1;
836  }
837  }
838  }
839  return 0;
840 }
841 
842 //------------------------------------------------------------------------------
844 {
845  vtkIdType npts;
846  const vtkIdType* pts;
847 
848  this->GetCellPoints(cellId, npts, pts);
849  for (vtkIdType i = 0; i < npts; i++)
850  {
851  if (pts[i] == ptId)
852  {
853  return 1;
854  }
855  }
856 
857  return 0;
858 }
859 
860 //------------------------------------------------------------------------------
862 {
863  this->Links->DeletePoint(ptId);
864 }
865 
866 //------------------------------------------------------------------------------
868 {
869  this->Cells->GetTag(cellId).MarkDeleted();
870 }
871 
872 //------------------------------------------------------------------------------
874 {
875  const vtkIdType* pts;
876  vtkIdType npts;
877 
878  this->GetCellPoints(cellId, npts, pts);
879  for (vtkIdType i = 0; i < npts; i++)
880  {
881  this->Links->RemoveCellReference(cellId, pts[i]);
882  }
883 }
884 
885 //------------------------------------------------------------------------------
887 {
888  const vtkIdType* pts;
889  vtkIdType npts;
890 
891  this->GetCellPoints(cellId, npts, pts);
892  for (vtkIdType i = 0; i < npts; i++)
893  {
894  this->Links->AddCellReference(cellId, pts[i]);
895  }
896 }
897 
898 //------------------------------------------------------------------------------
900 {
901  this->Links->ResizeCellList(ptId, size);
902 }
903 
904 //------------------------------------------------------------------------------
906 {
907  switch (tag.GetTarget())
908  {
910  return this->Verts;
912  return this->Lines;
914  return this->Polys;
916  return this->Strips;
917  }
918  return nullptr; // unreachable
919 }
920 
921 //------------------------------------------------------------------------------
922 inline void vtkPolyData::ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId, vtkIdType newPtId)
923 {
924  vtkNew<vtkIdList> ids;
925  this->ReplaceCellPoint(cellId, oldPtId, newPtId, ids);
926 }
927 
928 //------------------------------------------------------------------------------
930  vtkIdType cellId, vtkIdType oldPtId, vtkIdType newPtId, vtkIdList* cellPointIds)
931 {
932  if (!this->Cells)
933  {
934  this->BuildCells();
935  }
936  vtkIdType npts;
937  const vtkIdType* pts;
938  this->GetCellPoints(cellId, npts, pts, cellPointIds);
939  for (vtkIdType i = 0; i < npts; i++)
940  {
941  if (pts[i] == oldPtId)
942  {
943  const TaggedCellId tag = this->Cells->GetTag(cellId);
944  vtkCellArray* cells = this->GetCellArrayInternal(tag);
945  cells->ReplaceCellPointAtId(tag.GetCellId(), i, newPtId);
946  break;
947  }
948  }
949 }
950 
951 //------------------------------------------------------------------------------
952 inline unsigned char vtkPolyData::GetCellPoints(
953  vtkIdType cellId, vtkIdType& npts, vtkIdType const*& pts)
954 {
955  if (!this->Cells)
956  {
957  this->BuildCells();
958  }
959 
960  const TaggedCellId tag = this->Cells->GetTag(cellId);
961  if (tag.IsDeleted())
962  {
963  npts = 0;
964  pts = nullptr;
965  return VTK_EMPTY_CELL;
966  }
967 
968  vtkCellArray* cells = this->GetCellArrayInternal(tag);
969  cells->GetCellAtId(tag.GetCellId(), npts, pts);
970  return tag.GetCellType();
971 }
972 
973 //------------------------------------------------------------------------------
975  vtkIdType cellId, vtkIdType& npts, vtkIdType const*& pts, vtkIdList* ptIds)
976 {
977  if (!this->Cells)
978  {
979  this->BuildCells();
980  }
981 
982  const TaggedCellId tag = this->Cells->GetTag(cellId);
983  if (tag.IsDeleted())
984  {
985  npts = 0;
986  pts = nullptr;
987  }
988 
989  vtkCellArray* cells = this->GetCellArrayInternal(tag);
990  cells->GetCellAtId(tag.GetCellId(), npts, pts, ptIds);
991 }
992 
993 VTK_ABI_NAMESPACE_END
994 #endif
void ReplaceCellPointAtId(vtkIdType cellId, vtkIdType cellPointIndex, vtkIdType newPointId)
Replaces the pointId at cellPointIndex of a cell with newPointId.
vtkIdType GetCellSize(vtkIdType cellId) override
Standard vtkDataSet interface.
Definition: vtkPolyData.h:780
vtkIdType GetCellSize(vtkIdType) override
This method always returns 1, as all cells are point in a pure vtkPointSet.
Definition: vtkPointSet.h:158
vtkSmartPointer< vtkCellArray > Verts
Definition: vtkPolyData.h:728
vtkSmartPointer< vtkEmptyCell > EmptyCell
Definition: vtkPolyData.h:724
vtkIdType GetCellSize(vtkIdType cellId) const
Return the size of the cell at cellId.
int GetCellType(vtkIdType cellId) override
Standard vtkDataSet interface.
Definition: vtkPolyData.h:770
vtkSmartPointer< vtkPolygon > Polygon
Definition: vtkPolyData.h:722
void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds) override
Copy a cells point ids into list provided.
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
void ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId, vtkIdType newPtId)
Replace a point in the cell connectivity list with a different point.
Definition: vtkPolyData.h:922
abstract class to specify dataset behavior
Definition: vtkDataSet.h:52
a cell that represents a 3D point
Definition: vtkVertex.h:22
vtkSmartPointer< vtkPolyLine > PolyLine
Definition: vtkPolyData.h:719
unsigned char GetCellType() const noexcept
vtkTimeStamp CellsBoundsTime
Definition: vtkPolyData.h:746
record modification and/or execution time
Definition: vtkTimeStamp.h:24
vtkIdType GetCellIdRelativeToCellArray(vtkIdType cellId)
Maps the cell at position cellId inside the vtkPolyData to its location in the corresponding cell arr...
Abstract class in support of both point location and point insertion.
vtkCellArray * GetCellArrayInternal(TaggedCellId tag)
Definition: vtkPolyData.h:905
void GetCellPoints(vtkIdType, vtkIdList *idList) override
Topological inquiry to get points defining cell.
Definition: vtkPointSet.h:139
void GetPointCells(vtkIdType ptId, vtkIdList *cellIds) override
Efficient method to obtain cells using a particular point.
static vtkPointSet * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
void AddCellReference(vtkIdType cellId)
Add references to cell in cell structure.
Definition: vtkPolyData.h:886
a cell that represents a 2D quadrilateral
Definition: vtkQuad.h:27
concrete class for storing a set of points
Definition: vtkPointSet.h:58
vtkIdType GetNumberOfPolys()
Return the number of primitives of a particular type held.
Definition: vtkPolyData.h:230
vtkSmartPointer< vtkCellLinks > Links
Definition: vtkPolyData.h:736
vtkIdType GetNumberOfCells() override
This method always returns 0, as there are no cells in a vtkPointSet.
Definition: vtkPointSet.h:123
an empty cell used as a place-holder during processing
Definition: vtkEmptyCell.h:21
int vtkIdType
Definition: vtkType.h:315
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
cell represents a set of 0D vertices
Definition: vtkPolyVertex.h:24
void Squeeze() override
Reclaim any unused memory.
void RemoveCellReference(vtkIdType cellId)
Remove all references to cell in cell structure.
Definition: vtkPolyData.h:873
void DeletePoint(vtkIdType ptId)
Mark a point/cell as deleted from this vtkPolyData.
Definition: vtkPolyData.h:861
int GetCellType(vtkIdType) override
This method always returns VTK_EMPTY_CELL, as there is no cell in a vtkPointSet.
Definition: vtkPointSet.h:152
vtkSmartPointer< vtkCellArray > Polys
Definition: vtkPolyData.h:730
Detect and break reference loops.
provides thread-safe access to cells
int GetDataObjectType() override
Return what type of dataset this is.
Definition: vtkPolyData.h:91
vtkSmartPointer< vtkPolyVertex > PolyVertex
Definition: vtkPolyData.h:717
a cell that represents a triangle strip
cell represents a 1D line
Definition: vtkLine.h:22
abstract class to specify cell behavior
Definition: vtkCell.h:49
void DeepCopy(vtkDataObject *src) override
Shallow and Deep copy.
vtkSmartPointer< vtkTriangle > Triangle
Definition: vtkPolyData.h:720
bool NeedToBuildCells()
Check if BuildCells is needed.
Definition: vtkPolyData.h:367
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for type information and printing.
a simple class to control print indentation
Definition: vtkIndent.h:28
int IsTriangle(int v1, int v2, int v3)
Given three vertices, determine whether it's a triangle.
Definition: vtkPolyData.h:813
static vtkPointSet * New()
Standard instantiation method.
vtkSmartPointer< vtkCellArray > Lines
Definition: vtkPolyData.h:729
list of point or cell ids
Definition: vtkIdList.h:22
vtkIdType GetNumberOfVerts()
Return the number of primitives of a particular type held.
Definition: vtkPolyData.h:228
void Initialize() override
Reset to an empty state and free any memory.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:44
vtkSmartPointer< CellMap > Cells
Definition: vtkPolyData.h:735
vtkIdType GetNumberOfCells() override
Standard vtkDataSet interface.
Definition: vtkPolyData.h:763
a cell that represents an n-sided polygon
Definition: vtkPolygon.h:31
void ResizeCellList(vtkIdType ptId, int size)
Resize the list of cells using a particular point.
Definition: vtkPolyData.h:899
vtkSmartPointer< vtkQuad > Quad
Definition: vtkPolyData.h:721
vtkIdType GetNumberOfLines()
Return the number of primitives of a particular type held.
Definition: vtkPolyData.h:229
virtual void GetCellNeighbors(vtkIdType cellId, vtkIdList *ptIds, vtkIdList *cellIds)
Topological inquiry to get all cells using list of points exclusive of cell specified (e...
#define VTK_SIZEHINT(...)
vtkMTimeType GetMTime() override
Get MTime which also considers its vtkPoints MTime.
int GetMaxCellSize() override
This method always returns 0, as there are no cells in a vtkPointSet.
Definition: vtkPointSet.h:124
static vtkPointSet * ExtendedNew()
int IsPointUsedByCell(vtkIdType ptId, vtkIdType cellId)
Determine whether a point is used by a particular cell.
Definition: vtkPolyData.h:843
vtkSmartPointer< vtkLine > Line
Definition: vtkPolyData.h:718
object to represent cell connectivity
Definition: vtkCellArray.h:175
void Allocate(vtkPolyData *inPolyData, vtkIdType numCells=1000, int vtkNotUsed(extSize)=1000)
Similar to the method above, this method allocates initial storage for vertex, line, polygon, and triangle strip arrays.
Definition: vtkPolyData.h:325
vtkSmartPointer< vtkTriangleStrip > TriangleStrip
Definition: vtkPolyData.h:723
a cell that represents a triangle
Definition: vtkTriangle.h:27
void GetPointCells(vtkIdType, vtkIdList *idList) override
Topological inquiry to get cells using point.
Definition: vtkPointSet.h:140
void BuildCells()
Create data structure that allows random access of cells.
Store zero or more vtkInformation instances.
void Allocate(vtkIdType numCells=1000, int vtkNotUsed(extSize)=1000)
Method allocates initial storage for vertex, line, polygon, and triangle strip arrays.
Definition: vtkPolyData.h:310
unsigned long GetActualMemorySize() override
Return the actual size of the data in kibibytes (1024 bytes).
void ShallowCopy(vtkDataObject *src) override
Shallow and Deep copy.
void DeleteCell(vtkIdType cellId)
Mark a point/cell as deleted from this vtkPolyData.
Definition: vtkPolyData.h:867
static vtkPolyDataDummyContainter DummyContainer
Definition: vtkPolyData.h:741
void GetCellAtId(vtkIdType cellId, vtkIdType &cellSize, vtkIdType const *&cellPoints)
Return the point ids for the cell at cellId.
vtkCell * GetCell(vtkIdType) override
This method always return a vtkEmptyCell, as there is no cell in a vtkPointSet.
vtkIdType GetCellId() const noexcept
void CopyStructure(vtkDataSet *pd) override
Copy the geometric structure of an input point set object.
#define VTK_POLY_DATA
Definition: vtkType.h:65
general representation of visualization data
Definition: vtkDataObject.h:54
void ReportReferences(vtkGarbageCollector *) override
vtkNew< vtkIdList > LegacyBuffer
Definition: vtkPolyData.h:738
virtual vtkCell * GetCell(vtkIdType cellId)=0
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
vtkSmartPointer< vtkCellArray > Strips
Definition: vtkPolyData.h:731
virtual void GetCellBounds(vtkIdType cellId, double bounds[6])
Get the bounds of the cell with cellId such that: 0 <= cellId < NumberOfCells.
vtkSmartPointer< vtkVertex > Vertex
Definition: vtkPolyData.h:716
cell represents a set of 1D lines
Definition: vtkPolyLine.h:29
vtkIdType GetNumberOfStrips()
Return the number of primitives of a particular type held.
Definition: vtkPolyData.h:231