VTK  9.2.6
vtkPolyData.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPolyData.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
68 #ifndef vtkPolyData_h
69 #define vtkPolyData_h
70 
71 #include "vtkCommonDataModelModule.h" // For export macro
72 #include "vtkPointSet.h"
73 
74 #include "vtkCellArray.h" // Needed for inline methods
75 #include "vtkCellLinks.h" // Needed for inline methods
76 #include "vtkPolyDataInternals.h" // Needed for inline methods
77 
78 class vtkVertex;
79 class vtkPolyVertex;
80 class vtkLine;
81 class vtkPolyLine;
82 class vtkTriangle;
83 class vtkQuad;
84 class vtkPolygon;
85 class vtkTriangleStrip;
86 class vtkEmptyCell;
87 struct vtkPolyDataDummyContainter;
89 
90 class VTKCOMMONDATAMODEL_EXPORT vtkPolyData : public vtkPointSet
91 {
92 public:
93  static vtkPolyData* New();
94  static vtkPolyData* ExtendedNew();
95 
96  vtkTypeMacro(vtkPolyData, vtkPointSet);
97  void PrintSelf(ostream& os, vtkIndent indent) override;
98 
102  int GetDataObjectType() override { return VTK_POLY_DATA; }
103 
107  void CopyStructure(vtkDataSet* ds) override;
108 
110 
113  vtkIdType GetNumberOfCells() override;
114  using vtkDataSet::GetCell;
115  vtkCell* GetCell(vtkIdType cellId) override;
116  void GetCell(vtkIdType cellId, vtkGenericCell* cell) override;
117  int GetCellType(vtkIdType cellId) override;
118  vtkIdType GetCellSize(vtkIdType cellId) override;
119  void GetCellBounds(vtkIdType cellId, double bounds[6]) override;
120  void GetCellNeighbors(vtkIdType cellId, vtkIdList* ptIds, vtkIdList* cellIds) override;
122 
130  void CopyCells(vtkPolyData* pd, vtkIdList* idList, vtkIncrementalPointLocator* locator = nullptr);
131 
135  void GetCellPoints(vtkIdType cellId, vtkIdList* ptIds) override;
136 
141  void GetPointCells(vtkIdType ptId, vtkIdList* cellIds) override;
142 
161  void ComputeCellsBounds();
162 
168  void GetCellsBounds(double bounds[6]);
169 
176  void Squeeze() override;
177 
181  int GetMaxCellSize() override;
182 
188  vtkIdType GetCellIdRelativeToCellArray(vtkIdType cellId);
189 
193  void SetVerts(vtkCellArray* v);
194 
199  vtkCellArray* GetVerts();
200 
204  void SetLines(vtkCellArray* l);
205 
210  vtkCellArray* GetLines();
211 
215  void SetPolys(vtkCellArray* p);
216 
221  vtkCellArray* GetPolys();
222 
226  void SetStrips(vtkCellArray* s);
227 
233  vtkCellArray* GetStrips();
234 
236 
239  vtkIdType GetNumberOfVerts() { return (this->Verts ? this->Verts->GetNumberOfCells() : 0); }
240  vtkIdType GetNumberOfLines() { return (this->Lines ? this->Lines->GetNumberOfCells() : 0); }
241  vtkIdType GetNumberOfPolys() { return (this->Polys ? this->Polys->GetNumberOfCells() : 0); }
242  vtkIdType GetNumberOfStrips() { return (this->Strips ? this->Strips->GetNumberOfCells() : 0); }
244 
254  bool AllocateEstimate(vtkIdType numCells, vtkIdType maxCellSize);
255 
265  bool AllocateEstimate(vtkIdType numVerts, vtkIdType maxVertSize, vtkIdType numLines,
266  vtkIdType maxLineSize, vtkIdType numPolys, vtkIdType maxPolySize, vtkIdType numStrips,
267  vtkIdType maxStripSize);
268 
278  bool AllocateExact(vtkIdType numCells, vtkIdType connectivitySize);
279 
290  bool AllocateExact(vtkIdType numVerts, vtkIdType vertConnSize, vtkIdType numLines,
291  vtkIdType lineConnSize, vtkIdType numPolys, vtkIdType polyConnSize, vtkIdType numStrips,
292  vtkIdType stripConnSize);
293 
302  bool AllocateCopy(vtkPolyData* pd);
303 
313  bool AllocateProportional(vtkPolyData* pd, double ratio);
314 
321  void Allocate(vtkIdType numCells = 1000, int vtkNotUsed(extSize) = 1000)
322  {
323  this->AllocateExact(numCells, numCells);
324  }
325 
336  void Allocate(vtkPolyData* inPolyData, vtkIdType numCells = 1000, int vtkNotUsed(extSize) = 1000)
337  {
338  this->AllocateProportional(
339  inPolyData, static_cast<double>(numCells) / inPolyData->GetNumberOfCells());
340  }
341 
349  vtkIdType InsertNextCell(int type, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
350 
358  vtkIdType InsertNextCell(int type, vtkIdList* pts);
359 
364  void Reset();
365 
373  void BuildCells();
374 
378  bool NeedToBuildCells() { return this->Cells == nullptr; }
379 
386  void BuildLinks(int initialSize = 0);
387 
389 
394  virtual void SetLinks(vtkAbstractCellLinks* links);
395  vtkGetSmartPointerMacro(Links, vtkAbstractCellLinks);
397 
403  void DeleteCells();
404 
408  void DeleteLinks();
409 
411 
415  void GetPointCells(vtkIdType ptId, vtkIdType& ncells, vtkIdType*& cells)
416  VTK_SIZEHINT(cells, ncells);
418 
424  void GetCellEdgeNeighbors(vtkIdType cellId, vtkIdType p1, vtkIdType p2, vtkIdList* cellIds);
425 
437  unsigned char GetCellPoints(vtkIdType cellId, vtkIdType& npts, vtkIdType const*& pts)
438  VTK_SIZEHINT(pts, npts);
439 
454  void GetCellPoints(vtkIdType cellId, vtkIdType& npts, vtkIdType const*& pts, vtkIdList* ptIds)
455  VTK_SIZEHINT(pts, npts) override;
456 
461  int IsTriangle(int v1, int v2, int v3);
462 
470  int IsEdge(vtkIdType p1, vtkIdType p2);
471 
476  int IsPointUsedByCell(vtkIdType ptId, vtkIdType cellId);
477 
486  void ReplaceCell(vtkIdType cellId, vtkIdList* ids);
487  void ReplaceCell(vtkIdType cellId, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
494  void ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId, vtkIdType newPtId);
495 
500  void ReverseCell(vtkIdType cellId);
501 
503 
507  void DeletePoint(vtkIdType ptId);
508  void DeleteCell(vtkIdType cellId);
510 
519  void RemoveDeletedCells();
520 
522 
530  vtkIdType InsertNextLinkedPoint(int numLinks);
531  vtkIdType InsertNextLinkedPoint(double x[3], int numLinks);
533 
540  vtkIdType InsertNextLinkedCell(int type, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
541 
551  void ReplaceLinkedCell(vtkIdType cellId, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
552 
560  void RemoveCellReference(vtkIdType cellId);
561 
569  void AddCellReference(vtkIdType cellId);
570 
578  void RemoveReferenceToCell(vtkIdType ptId, vtkIdType cellId);
579 
587  void AddReferenceToCell(vtkIdType ptId, vtkIdType cellId);
588 
594  void ResizeCellList(vtkIdType ptId, int size);
595 
599  void Initialize() override;
600 
602 
605  virtual int GetPiece();
606  virtual int GetNumberOfPieces();
608 
612  virtual int GetGhostLevel();
613 
622  unsigned long GetActualMemorySize() override;
623 
625 
628  void ShallowCopy(vtkDataObject* src) override;
629  void DeepCopy(vtkDataObject* src) override;
631 
638  void RemoveGhostCells();
639 
641 
645  static vtkPolyData* GetData(vtkInformationVector* v, int i = 0);
647 
666  enum
667  {
668  ERR_NO_SUCH_FIELD = -4,
669  ERR_INCORRECT_FIELD = -3,
670  ERR_NON_MANIFOLD_STAR = -2,
671  REGULAR_POINT = -1,
672  MINIMUM = 0,
673  SADDLE = 1,
674  MAXIMUM = 2
675  };
676 
677  int GetScalarFieldCriticalIndex(vtkIdType pointId, vtkDataArray* scalarField);
678  int GetScalarFieldCriticalIndex(vtkIdType pointId, int fieldId);
679  int GetScalarFieldCriticalIndex(vtkIdType pointId, const char* fieldName);
680 
688  virtual vtkMTimeType GetMeshMTime();
689 
693  vtkMTimeType GetMTime() override;
694 
704  unsigned char GetCell(vtkIdType cellId, const vtkIdType*& pts);
705 
706 protected:
707  vtkPolyData();
708  ~vtkPolyData() 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 private:
752  vtkPolyData(const vtkPolyData&) = delete;
753  void operator=(const vtkPolyData&) = delete;
754 };
755 
756 //------------------------------------------------------------------------------
757 inline void vtkPolyData::GetPointCells(vtkIdType ptId, vtkIdType& ncells, vtkIdType*& cells)
758 {
759  ncells = this->Links->GetNcells(ptId);
760  cells = this->Links->GetCells(ptId);
761 }
762 
763 //------------------------------------------------------------------------------
765 {
766  return (this->GetNumberOfVerts() + this->GetNumberOfLines() + this->GetNumberOfPolys() +
767  this->GetNumberOfStrips());
768 }
769 
770 //------------------------------------------------------------------------------
772 {
773  if (!this->Cells)
774  {
775  this->BuildCells();
776  }
777  return static_cast<int>(this->Cells->GetTag(cellId).GetCellType());
778 }
779 
780 //------------------------------------------------------------------------------
782 {
783  if (!this->Cells)
784  {
785  this->BuildCells();
786  }
787  switch (this->GetCellType(cellId))
788  {
789  case VTK_EMPTY_CELL:
790  return 0;
791  case VTK_VERTEX:
792  return 1;
793  case VTK_LINE:
794  return 2;
795  case VTK_TRIANGLE:
796  return 3;
797  case VTK_QUAD:
798  return 4;
799  case VTK_POLY_VERTEX:
800  return this->Verts ? this->Verts->GetCellSize(this->GetCellIdRelativeToCellArray(cellId)) : 0;
801  case VTK_POLY_LINE:
802  return this->Lines ? this->Lines->GetCellSize(this->GetCellIdRelativeToCellArray(cellId)) : 0;
803  case VTK_POLYGON:
804  return this->Polys ? this->Polys->GetCellSize(this->GetCellIdRelativeToCellArray(cellId)) : 0;
805  case VTK_TRIANGLE_STRIP:
806  return this->Strips ? this->Strips->GetCellSize(this->GetCellIdRelativeToCellArray(cellId))
807  : 0;
808  }
809  vtkWarningMacro(<< "Cell type not supported.");
810  return 0;
811 }
812 
813 //------------------------------------------------------------------------------
814 inline int vtkPolyData::IsTriangle(int v1, int v2, int v3)
815 {
816  vtkIdType n1;
817  int i, j, tVerts[3];
818  vtkIdType* cells;
819  const vtkIdType* tVerts2;
820  vtkIdType n2;
821 
822  tVerts[0] = v1;
823  tVerts[1] = v2;
824  tVerts[2] = v3;
825 
826  for (i = 0; i < 3; i++)
827  {
828  this->GetPointCells(tVerts[i], n1, cells);
829  for (j = 0; j < n1; j++)
830  {
831  this->GetCellPoints(cells[j], n2, tVerts2);
832  if ((tVerts[0] == tVerts2[0] || tVerts[0] == tVerts2[1] || tVerts[0] == tVerts2[2]) &&
833  (tVerts[1] == tVerts2[0] || tVerts[1] == tVerts2[1] || tVerts[1] == tVerts2[2]) &&
834  (tVerts[2] == tVerts2[0] || tVerts[2] == tVerts2[1] || tVerts[2] == tVerts2[2]))
835  {
836  return 1;
837  }
838  }
839  }
840  return 0;
841 }
842 
843 //------------------------------------------------------------------------------
845 {
846  vtkIdType npts;
847  const vtkIdType* pts;
848 
849  this->GetCellPoints(cellId, npts, pts);
850  for (vtkIdType i = 0; i < npts; i++)
851  {
852  if (pts[i] == ptId)
853  {
854  return 1;
855  }
856  }
857 
858  return 0;
859 }
860 
861 //------------------------------------------------------------------------------
863 {
864  this->Links->DeletePoint(ptId);
865 }
866 
867 //------------------------------------------------------------------------------
869 {
870  this->Cells->GetTag(cellId).MarkDeleted();
871 }
872 
873 //------------------------------------------------------------------------------
875 {
876  const vtkIdType* pts;
877  vtkIdType npts;
878 
879  this->GetCellPoints(cellId, npts, pts);
880  for (vtkIdType i = 0; i < npts; i++)
881  {
882  this->Links->RemoveCellReference(cellId, pts[i]);
883  }
884 }
885 
886 //------------------------------------------------------------------------------
888 {
889  const vtkIdType* pts;
890  vtkIdType npts;
891 
892  this->GetCellPoints(cellId, npts, pts);
893  for (vtkIdType i = 0; i < npts; i++)
894  {
895  this->Links->AddCellReference(cellId, pts[i]);
896  }
897 }
898 
899 //------------------------------------------------------------------------------
901 {
902  this->Links->ResizeCellList(ptId, size);
903 }
904 
905 //------------------------------------------------------------------------------
907 {
908  switch (tag.GetTarget())
909  {
911  return this->Verts;
913  return this->Lines;
915  return this->Polys;
917  return this->Strips;
918  }
919  return nullptr; // unreachable
920 }
921 
922 //------------------------------------------------------------------------------
923 inline void vtkPolyData::ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId, vtkIdType newPtId)
924 {
925  vtkNew<vtkIdList> ids;
926  this->GetCellPoints(cellId, ids);
927  for (vtkIdType i = 0; i < ids->GetNumberOfIds(); i++)
928  {
929  if (ids->GetId(i) == oldPtId)
930  {
931  ids->SetId(i, newPtId);
932  break;
933  }
934  }
935  this->ReplaceCell(cellId, static_cast<int>(ids->GetNumberOfIds()), ids->GetPointer(0));
936 }
937 
938 //------------------------------------------------------------------------------
939 inline unsigned char vtkPolyData::GetCellPoints(
940  vtkIdType cellId, vtkIdType& npts, vtkIdType const*& pts)
941 {
942  if (!this->Cells)
943  {
944  this->BuildCells();
945  }
946 
947  const TaggedCellId tag = this->Cells->GetTag(cellId);
948  if (tag.IsDeleted())
949  {
950  npts = 0;
951  pts = nullptr;
952  return VTK_EMPTY_CELL;
953  }
954 
955  vtkCellArray* cells = this->GetCellArrayInternal(tag);
956  cells->GetCellAtId(tag.GetCellId(), npts, pts);
957  return tag.GetCellType();
958 }
959 
960 //------------------------------------------------------------------------------
962  vtkIdType cellId, vtkIdType& npts, vtkIdType const*& pts, vtkIdList* ptIds)
963 {
964  if (!this->Cells)
965  {
966  this->BuildCells();
967  }
968 
969  const TaggedCellId tag = this->Cells->GetTag(cellId);
970  if (tag.IsDeleted())
971  {
972  npts = 0;
973  pts = nullptr;
974  }
975 
976  vtkCellArray* cells = this->GetCellArrayInternal(tag);
977  cells->GetCellAtId(tag.GetCellId(), npts, pts, ptIds);
978 }
979 
980 #endif
vtkIdType GetCellSize(vtkIdType cellId) override
Standard vtkDataSet interface.
Definition: vtkPolyData.h:781
vtkIdType GetCellSize(vtkIdType) override
This method always returns 1, as all cells are point in a pure vtkPointSet.
Definition: vtkPointSet.h:164
vtkSmartPointer< vtkCellArray > Verts
Definition: vtkPolyData.h:728
vtkSmartPointer< vtkEmptyCell > EmptyCell
Definition: vtkPolyData.h:724
int GetCellType(vtkIdType cellId) override
Standard vtkDataSet interface.
Definition: vtkPolyData.h:771
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:287
void ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId, vtkIdType newPtId)
Replace a point in the cell connectivity list with a different point.
Definition: vtkPolyData.h:923
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
a cell that represents a 3D point
Definition: vtkVertex.h:33
void SetId(const vtkIdType i, const vtkIdType vtkid)
Set the id at location i.
Definition: vtkIdList.h:92
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:35
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.
void ReplaceCell(vtkIdType cellId, vtkIdList *ids)
Replace the points defining cell "cellId" with a new set of points.
vtkCellArray * GetCellArrayInternal(TaggedCellId tag)
Definition: vtkPolyData.h:906
void GetCellPoints(vtkIdType, vtkIdList *idList) override
Topological inquiry to get points defining cell.
Definition: vtkPointSet.h:145
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:887
a cell that represents a 2D quadrilateral
Definition: vtkQuad.h:38
concrete class for storing a set of points
Definition: vtkPointSet.h:69
vtkIdType GetNumberOfPolys()
Return the number of primitives of a particular type held.
Definition: vtkPolyData.h:241
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:129
an empty cell used as a place-holder during processing
Definition: vtkEmptyCell.h:32
int vtkIdType
Definition: vtkType.h:332
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:90
cell represents a set of 0D vertices
Definition: vtkPolyVertex.h:35
void Squeeze() override
Reclaim any unused memory.
void RemoveCellReference(vtkIdType cellId)
Remove all references to cell in cell structure.
Definition: vtkPolyData.h:874
void DeletePoint(vtkIdType ptId)
Mark a point/cell as deleted from this vtkPolyData.
Definition: vtkPolyData.h:862
int GetCellType(vtkIdType) override
This method always returns VTK_EMPTY_CELL, as there is no cell in a vtkPointSet.
Definition: vtkPointSet.h:158
vtkSmartPointer< vtkCellArray > Polys
Definition: vtkPolyData.h:730
provides thread-safe access to cells
int GetDataObjectType() override
Return what type of dataset this is.
Definition: vtkPolyData.h:102
vtkSmartPointer< vtkPolyVertex > PolyVertex
Definition: vtkPolyData.h:717
a cell that represents a triangle strip
cell represents a 1D line
Definition: vtkLine.h:33
abstract class to specify cell behavior
Definition: vtkCell.h:60
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:378
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for type information and printing.
a simple class to control print indentation
Definition: vtkIndent.h:39
int IsTriangle(int v1, int v2, int v3)
Given three vertices, determine whether it's a triangle.
Definition: vtkPolyData.h:814
static vtkPointSet * New()
Standard instantiation method.
vtkSmartPointer< vtkCellArray > Lines
Definition: vtkPolyData.h:729
list of point or cell ids
Definition: vtkIdList.h:33
vtkIdType GetNumberOfVerts()
Return the number of primitives of a particular type held.
Definition: vtkPolyData.h:239
void Initialize() override
Reset to an empty state and free any memory.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
vtkSmartPointer< CellMap > Cells
Definition: vtkPolyData.h:735
vtkIdType GetNumberOfCells() override
Standard vtkDataSet interface.
Definition: vtkPolyData.h:764
a cell that represents an n-sided polygon
Definition: vtkPolygon.h:42
void ResizeCellList(vtkIdType ptId, int size)
Resize the list of cells using a particular point.
Definition: vtkPolyData.h:900
vtkIdType GetNumberOfIds() const noexcept
Return the number of id's in the list.
Definition: vtkIdList.h:60
vtkSmartPointer< vtkQuad > Quad
Definition: vtkPolyData.h:721
vtkIdType GetNumberOfLines()
Return the number of primitives of a particular type held.
Definition: vtkPolyData.h:240
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:130
static vtkPointSet * ExtendedNew()
int IsPointUsedByCell(vtkIdType ptId, vtkIdType cellId)
Determine whether a point is used by a particular cell.
Definition: vtkPolyData.h:844
vtkIdType GetId(const vtkIdType i)
Return the id at location i.
Definition: vtkIdList.h:65
vtkSmartPointer< vtkLine > Line
Definition: vtkPolyData.h:718
object to represent cell connectivity
Definition: vtkCellArray.h:186
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:336
vtkSmartPointer< vtkTriangleStrip > TriangleStrip
Definition: vtkPolyData.h:723
a cell that represents a triangle
Definition: vtkTriangle.h:38
void GetPointCells(vtkIdType, vtkIdList *idList) override
Topological inquiry to get cells using point.
Definition: vtkPointSet.h:146
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:321
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:868
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.
Definition: vtkPointSet.h:138
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:77
general representation of visualization data
Definition: vtkDataObject.h:65
vtkIdType * GetPointer(const vtkIdType i)
Get a pointer to a particular data index.
Definition: vtkIdList.h:129
vtkNew< vtkIdList > LegacyBuffer
Definition: vtkPolyData.h:738
virtual vtkCell * GetCell(vtkIdType cellId)=0
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
vtkIdType GetCellSize(const vtkIdType cellId) const
Return the size of the cell at cellId.
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:39
vtkIdType GetNumberOfStrips()
Return the number of primitives of a particular type held.
Definition: vtkPolyData.h:242