VTK  9.1.0
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 =========================================================================*/
171 #ifndef vtkPolyData_h
172 #define vtkPolyData_h
173 
174 #include "vtkCommonDataModelModule.h" // For export macro
175 #include "vtkDeprecation.h" // for VTK_DEPRECATED_IN_9_0_0
176 #include "vtkPointSet.h"
177 
178 #include "vtkCellArray.h" // Needed for inline methods
179 #include "vtkCellLinks.h" // Needed for inline methods
180 #include "vtkPolyDataInternals.h" // Needed for inline methods
181 
182 class vtkVertex;
183 class vtkPolyVertex;
184 class vtkLine;
185 class vtkPolyLine;
186 class vtkTriangle;
187 class vtkQuad;
188 class vtkPolygon;
189 class vtkTriangleStrip;
190 class vtkEmptyCell;
191 struct vtkPolyDataDummyContainter;
193 
194 class VTKCOMMONDATAMODEL_EXPORT vtkPolyData : public vtkPointSet
195 {
196 public:
197  static vtkPolyData* New();
199 
200  vtkTypeMacro(vtkPolyData, vtkPointSet);
201  void PrintSelf(ostream& os, vtkIndent indent) override;
202 
206  int GetDataObjectType() override { return VTK_POLY_DATA; }
207 
211  void CopyStructure(vtkDataSet* ds) override;
212 
214 
217  vtkIdType GetNumberOfCells() override;
218  using vtkDataSet::GetCell;
219  vtkCell* GetCell(vtkIdType cellId) override;
220  void GetCell(vtkIdType cellId, vtkGenericCell* cell) override;
221  int GetCellType(vtkIdType cellId) override;
222  void GetCellBounds(vtkIdType cellId, double bounds[6]) override;
223  void GetCellNeighbors(vtkIdType cellId, vtkIdList* ptIds, vtkIdList* cellIds) override;
225 
233  void CopyCells(vtkPolyData* pd, vtkIdList* idList, vtkIncrementalPointLocator* locator = nullptr);
234 
238  void GetCellPoints(vtkIdType cellId, vtkIdList* ptIds) override;
239 
244  void GetPointCells(vtkIdType ptId, vtkIdList* cellIds) override;
245 
265 
271  void GetCellsBounds(double bounds[6]);
272 
279  void Squeeze() override;
280 
284  int GetMaxCellSize() override;
285 
292 
297 
303 
308 
314 
319 
325 
330 
337 
339 
342  vtkIdType GetNumberOfVerts() { return (this->Verts ? this->Verts->GetNumberOfCells() : 0); }
343  vtkIdType GetNumberOfLines() { return (this->Lines ? this->Lines->GetNumberOfCells() : 0); }
344  vtkIdType GetNumberOfPolys() { return (this->Polys ? this->Polys->GetNumberOfCells() : 0); }
345  vtkIdType GetNumberOfStrips() { return (this->Strips ? this->Strips->GetNumberOfCells() : 0); }
347 
357  bool AllocateEstimate(vtkIdType numCells, vtkIdType maxCellSize);
358 
368  bool AllocateEstimate(vtkIdType numVerts, vtkIdType maxVertSize, vtkIdType numLines,
369  vtkIdType maxLineSize, vtkIdType numPolys, vtkIdType maxPolySize, vtkIdType numStrips,
370  vtkIdType maxStripSize);
371 
381  bool AllocateExact(vtkIdType numCells, vtkIdType connectivitySize);
382 
393  bool AllocateExact(vtkIdType numVerts, vtkIdType vertConnSize, vtkIdType numLines,
394  vtkIdType lineConnSize, vtkIdType numPolys, vtkIdType polyConnSize, vtkIdType numStrips,
395  vtkIdType stripConnSize);
396 
406 
416  bool AllocateProportional(vtkPolyData* pd, double ratio);
417 
424  void Allocate(vtkIdType numCells = 1000, int vtkNotUsed(extSize) = 1000)
425  {
426  this->AllocateExact(numCells, numCells);
427  }
428 
439  void Allocate(vtkPolyData* inPolyData, vtkIdType numCells = 1000, int vtkNotUsed(extSize) = 1000)
440  {
441  this->AllocateProportional(
442  inPolyData, static_cast<double>(numCells) / inPolyData->GetNumberOfCells());
443  }
444 
452  vtkIdType InsertNextCell(int type, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
453 
462 
467  void Reset();
468 
476  void BuildCells();
477 
481  bool NeedToBuildCells() { return this->Cells == nullptr; }
482 
489  void BuildLinks(int initialSize = 0);
490 
496  void DeleteCells();
497 
501  void DeleteLinks();
502 
504 
508  void GetPointCells(vtkIdType ptId, vtkIdType& ncells, vtkIdType*& cells)
509  VTK_SIZEHINT(cells, ncells);
510  VTK_DEPRECATED_IN_9_0_0("Use vtkPolyData::GetPointCells::vtkIdType, vtkIdType&, vtkIdType*&)")
511  void GetPointCells(vtkIdType ptId, unsigned short& ncells, vtkIdType*& cells)
512  VTK_SIZEHINT(cells, ncells);
514 
520  void GetCellEdgeNeighbors(vtkIdType cellId, vtkIdType p1, vtkIdType p2, vtkIdList* cellIds);
521 
531  unsigned char GetCellPoints(vtkIdType cellId, vtkIdType& npts, vtkIdType const*& pts)
532  VTK_SIZEHINT(pts, npts);
533 
538  int IsTriangle(int v1, int v2, int v3);
539 
547  int IsEdge(vtkIdType p1, vtkIdType p2);
548 
553  int IsPointUsedByCell(vtkIdType ptId, vtkIdType cellId);
554 
563  void ReplaceCell(vtkIdType cellId, vtkIdList* ids);
564  void ReplaceCell(vtkIdType cellId, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
571  void ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId, vtkIdType newPtId);
572 
577  void ReverseCell(vtkIdType cellId);
578 
580 
584  void DeletePoint(vtkIdType ptId);
585  void DeleteCell(vtkIdType cellId);
587 
596  void RemoveDeletedCells();
597 
599 
607  vtkIdType InsertNextLinkedPoint(int numLinks);
608  vtkIdType InsertNextLinkedPoint(double x[3], int numLinks);
610 
617  vtkIdType InsertNextLinkedCell(int type, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
618 
628  void ReplaceLinkedCell(vtkIdType cellId, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
629 
637  void RemoveCellReference(vtkIdType cellId);
638 
646  void AddCellReference(vtkIdType cellId);
647 
655  void RemoveReferenceToCell(vtkIdType ptId, vtkIdType cellId);
656 
664  void AddReferenceToCell(vtkIdType ptId, vtkIdType cellId);
665 
671  void ResizeCellList(vtkIdType ptId, int size);
672 
676  void Initialize() override;
677 
679 
682  virtual int GetPiece();
683  virtual int GetNumberOfPieces();
685 
689  virtual int GetGhostLevel();
690 
699  unsigned long GetActualMemorySize() override;
700 
702 
705  void ShallowCopy(vtkDataObject* src) override;
706  void DeepCopy(vtkDataObject* src) override;
708 
715  void RemoveGhostCells();
716 
718 
722  static vtkPolyData* GetData(vtkInformationVector* v, int i = 0);
724 
743  enum
744  {
745  ERR_NO_SUCH_FIELD = -4,
746  ERR_INCORRECT_FIELD = -3,
747  ERR_NON_MANIFOLD_STAR = -2,
748  REGULAR_POINT = -1,
749  MINIMUM = 0,
750  SADDLE = 1,
751  MAXIMUM = 2
752  };
753 
755  int GetScalarFieldCriticalIndex(vtkIdType pointId, int fieldId);
756  int GetScalarFieldCriticalIndex(vtkIdType pointId, const char* fieldName);
757 
766 
770  vtkMTimeType GetMTime() override;
771 
781  unsigned char GetCell(vtkIdType cellId, const vtkIdType*& pts);
782 
783 protected:
785  ~vtkPolyData() override;
786 
789 
790  vtkCellArray* GetCellArrayInternal(TaggedCellId tag);
791 
792  // constant cell objects returned by GetCell called.
802 
803  // points inherited
804  // point data (i.e., scalars, vectors, normals, tcoords) inherited
809 
810  // supporting structures for more complex topological operations
811  // built only when necessary
814 
816 
817  // dummy static member below used as a trick to simplify traversal
818  static vtkPolyDataDummyContainter DummyContainer;
819 
820  // Take into account only points that belong to at least one cell.
821  double CellsBounds[6];
822 
824 
825 private:
826  // Hide these from the user and the compiler.
827 
831  void GetCellNeighbors(vtkIdType cellId, vtkIdList& ptIds, vtkIdList& cellIds)
832  {
833  this->GetCellNeighbors(cellId, &ptIds, &cellIds);
834  }
835 
836  void Cleanup();
837 
838 private:
839  vtkPolyData(const vtkPolyData&) = delete;
840  void operator=(const vtkPolyData&) = delete;
841 };
842 
843 //------------------------------------------------------------------------------
844 inline void vtkPolyData::GetPointCells(vtkIdType ptId, vtkIdType& ncells, vtkIdType*& cells)
845 {
846  ncells = this->Links->GetNcells(ptId);
847  cells = this->Links->GetCells(ptId);
848 }
849 
850 inline void vtkPolyData::GetPointCells(vtkIdType ptId, unsigned short& ncells, vtkIdType*& cells)
851 {
852  VTK_LEGACY_BODY(vtkPolyData::GetPointCells, "VTK 9.0");
853  ncells = static_cast<unsigned short>(this->Links->GetNcells(ptId));
854  cells = this->Links->GetCells(ptId);
855 }
856 
857 //------------------------------------------------------------------------------
859 {
860  return (this->GetNumberOfVerts() + this->GetNumberOfLines() + this->GetNumberOfPolys() +
861  this->GetNumberOfStrips());
862 }
863 
864 //------------------------------------------------------------------------------
866 {
867  if (!this->Cells)
868  {
869  this->BuildCells();
870  }
871  return static_cast<int>(this->Cells->GetTag(cellId).GetCellType());
872 }
873 
874 //------------------------------------------------------------------------------
875 inline int vtkPolyData::IsTriangle(int v1, int v2, int v3)
876 {
877  vtkIdType n1;
878  int i, j, tVerts[3];
879  vtkIdType* cells;
880  const vtkIdType* tVerts2;
881  vtkIdType n2;
882 
883  tVerts[0] = v1;
884  tVerts[1] = v2;
885  tVerts[2] = v3;
886 
887  for (i = 0; i < 3; i++)
888  {
889  this->GetPointCells(tVerts[i], n1, cells);
890  for (j = 0; j < n1; j++)
891  {
892  this->GetCellPoints(cells[j], n2, tVerts2);
893  if ((tVerts[0] == tVerts2[0] || tVerts[0] == tVerts2[1] || tVerts[0] == tVerts2[2]) &&
894  (tVerts[1] == tVerts2[0] || tVerts[1] == tVerts2[1] || tVerts[1] == tVerts2[2]) &&
895  (tVerts[2] == tVerts2[0] || tVerts[2] == tVerts2[1] || tVerts[2] == tVerts2[2]))
896  {
897  return 1;
898  }
899  }
900  }
901  return 0;
902 }
903 
904 //------------------------------------------------------------------------------
906 {
907  vtkIdType npts;
908  const vtkIdType* pts;
909 
910  this->GetCellPoints(cellId, npts, pts);
911  for (vtkIdType i = 0; i < npts; i++)
912  {
913  if (pts[i] == ptId)
914  {
915  return 1;
916  }
917  }
918 
919  return 0;
920 }
921 
922 //------------------------------------------------------------------------------
924 {
925  this->Links->DeletePoint(ptId);
926 }
927 
928 //------------------------------------------------------------------------------
930 {
931  this->Cells->GetTag(cellId).MarkDeleted();
932 }
933 
934 //------------------------------------------------------------------------------
936 {
937  const vtkIdType* pts;
938  vtkIdType npts;
939 
940  this->GetCellPoints(cellId, npts, pts);
941  for (vtkIdType i = 0; i < npts; i++)
942  {
943  this->Links->RemoveCellReference(cellId, pts[i]);
944  }
945 }
946 
947 //------------------------------------------------------------------------------
949 {
950  const vtkIdType* pts;
951  vtkIdType npts;
952 
953  this->GetCellPoints(cellId, npts, pts);
954  for (vtkIdType i = 0; i < npts; i++)
955  {
956  this->Links->AddCellReference(cellId, pts[i]);
957  }
958 }
959 
960 //------------------------------------------------------------------------------
962 {
963  this->Links->ResizeCellList(ptId, size);
964 }
965 
966 //------------------------------------------------------------------------------
968 {
969  switch (tag.GetTarget())
970  {
972  return this->Verts;
974  return this->Lines;
976  return this->Polys;
978  return this->Strips;
979  }
980  return nullptr; // unreachable
981 }
982 
983 //------------------------------------------------------------------------------
984 inline void vtkPolyData::ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId, vtkIdType newPtId)
985 {
986  vtkNew<vtkIdList> ids;
987  this->GetCellPoints(cellId, ids);
988  for (vtkIdType i = 0; i < ids->GetNumberOfIds(); i++)
989  {
990  if (ids->GetId(i) == oldPtId)
991  {
992  ids->SetId(i, newPtId);
993  break;
994  }
995  }
996  this->ReplaceCell(cellId, static_cast<int>(ids->GetNumberOfIds()), ids->GetPointer(0));
997 }
998 
999 //------------------------------------------------------------------------------
1000 inline unsigned char vtkPolyData::GetCellPoints(
1001  vtkIdType cellId, vtkIdType& npts, vtkIdType const*& pts)
1002 {
1003  if (!this->Cells)
1004  {
1005  this->BuildCells();
1006  }
1007 
1008  const TaggedCellId tag = this->Cells->GetTag(cellId);
1009  if (tag.IsDeleted())
1010  {
1011  npts = 0;
1012  pts = nullptr;
1013  return VTK_EMPTY_CELL;
1014  }
1015 
1016  vtkCellArray* cells = this->GetCellArrayInternal(tag);
1017  cells->GetCellAtId(tag.GetCellId(), npts, pts);
1018  return tag.GetCellType();
1019 }
1020 
1021 #endif
object to represent cell connectivity
Definition: vtkCellArray.h:290
void GetCellAtId(vtkIdType cellId, vtkIdType &cellSize, vtkIdType const *&cellPoints)
Return the point ids for the cell at cellId.
abstract class to specify cell behavior
Definition: vtkCell.h:147
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:159
general representation of visualization data
abstract class to specify dataset behavior
Definition: vtkDataSet.h:166
virtual vtkCell * GetCell(vtkIdType cellId)=0
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
virtual void GetCellNeighbors(vtkIdType cellId, vtkIdList *ptIds, vtkIdList *cellIds)
Topological inquiry to get all cells using list of points exclusive of cell specified (e....
an empty cell used as a place-holder during processing
Definition: vtkEmptyCell.h:30
provides thread-safe access to cells
list of point or cell ids
Definition: vtkIdList.h:140
vtkIdType * GetPointer(const vtkIdType i)
Get a pointer to a particular data index.
Definition: vtkIdList.h:235
vtkIdType GetNumberOfIds() const noexcept
Return the number of id's in the list.
Definition: vtkIdList.h:166
void SetId(const vtkIdType i, const vtkIdType vtkid)
Set the id at location i.
Definition: vtkIdList.h:198
vtkIdType GetId(const vtkIdType i)
Return the id at location i.
Definition: vtkIdList.h:171
Abstract class in support of both point location and point insertion.
a simple class to control print indentation
Definition: vtkIndent.h:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
cell represents a 1D line
Definition: vtkLine.h:140
concrete class for storing a set of points
Definition: vtkPointSet.h:106
void GetPointCells(vtkIdType, vtkIdList *idList) override
This method resets parameter idList, as there is no cell in a vtkPointSet.
Definition: vtkPointSet.h:181
vtkIdType GetNumberOfCells() override
This method always returns 0, as there are no cells in a vtkPointSet.
Definition: vtkPointSet.h:165
int GetCellType(vtkIdType) override
This method always returns VTK_EMPTY_CELL, as there is no cell in a vtkPointSet.
Definition: vtkPointSet.h:193
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:195
vtkIdType InsertNextCell(int type, int npts, const vtkIdType pts[])
Insert a cell of type VTK_VERTEX, VTK_POLY_VERTEX, VTK_LINE, VTK_POLY_LINE, VTK_TRIANGLE,...
vtkSmartPointer< vtkPolyVertex > PolyVertex
Definition: vtkPolyData.h:794
void GetCell(vtkIdType cellId, vtkGenericCell *cell) override
Standard vtkDataSet interface.
void Squeeze() override
Recover extra allocated memory when creating data whose initial size is unknown.
bool NeedToBuildCells()
Check if BuildCells is needed.
Definition: vtkPolyData.h:481
bool AllocateEstimate(vtkIdType numCells, vtkIdType maxCellSize)
Preallocate memory for the internal cell arrays.
int GetScalarFieldCriticalIndex(vtkIdType pointId, const char *fieldName)
void SetPolys(vtkCellArray *p)
Set the cell array defining polygons.
vtkCellArray * GetCellArrayInternal(TaggedCellId tag)
Definition: vtkPolyData.h:967
vtkIdType GetCellIdRelativeToCellArray(vtkIdType cellId)
Maps the cell at position cellId inside the vtkPolyData to its location in the corresponding cell arr...
vtkCellArray * GetStrips()
Get the cell array defining triangle strips.
void GetCellsBounds(double bounds[6])
Get the cells bounds.
void RemoveCellReference(vtkIdType cellId)
Remove all references to cell in cell structure.
Definition: vtkPolyData.h:935
void ComputeCellsBounds()
Compute the (X, Y, Z) bounds of the data.
vtkIdType GetNumberOfLines()
Return the number of primitives of a particular type held.
Definition: vtkPolyData.h:343
bool AllocateEstimate(vtkIdType numVerts, vtkIdType maxVertSize, vtkIdType numLines, vtkIdType maxLineSize, vtkIdType numPolys, vtkIdType maxPolySize, vtkIdType numStrips, vtkIdType maxStripSize)
Preallocate memory for the internal cell arrays.
void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds) override
Copy a cells point ids into list provided.
int IsTriangle(int v1, int v2, int v3)
Given three vertices, determine whether it's a triangle.
Definition: vtkPolyData.h:875
void SetLines(vtkCellArray *l)
Set the cell array defining lines.
void SetVerts(vtkCellArray *v)
Set the cell array defining vertices.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methdos for type information and printing.
vtkSmartPointer< vtkCellLinks > Links
Definition: vtkPolyData.h:813
bool AllocateExact(vtkIdType numVerts, vtkIdType vertConnSize, vtkIdType numLines, vtkIdType lineConnSize, vtkIdType numPolys, vtkIdType polyConnSize, vtkIdType numStrips, vtkIdType stripConnSize)
Preallocate memory for the internal cell arrays.
void GetCellNeighbors(vtkIdType cellId, vtkIdList *ptIds, vtkIdList *cellIds) override
Standard vtkDataSet interface.
~vtkPolyData() override
int GetScalarFieldCriticalIndex(vtkIdType pointId, int fieldId)
void CopyStructure(vtkDataSet *ds) override
Copy the geometric and topological structure of an input poly data object.
vtkNew< vtkIdList > LegacyBuffer
Definition: vtkPolyData.h:815
int GetCellType(vtkIdType cellId) override
Standard vtkDataSet interface.
Definition: vtkPolyData.h:865
void GetCellBounds(vtkIdType cellId, double bounds[6]) override
Standard vtkDataSet interface.
void ReplaceCell(vtkIdType cellId, vtkIdList *ids)
Replace the points defining cell "cellId" with a new set of points.
vtkMTimeType GetMTime() override
Get MTime which also considers its cell array MTime.
vtkSmartPointer< vtkCellArray > Verts
Definition: vtkPolyData.h:805
vtkSmartPointer< vtkPolyLine > PolyLine
Definition: vtkPolyData.h:796
vtkIdType GetNumberOfStrips()
Return the number of primitives of a particular type held.
Definition: vtkPolyData.h:345
int GetScalarFieldCriticalIndex(vtkIdType pointId, vtkDataArray *scalarField)
vtkCellArray * GetVerts()
Get the cell array defining vertices.
static vtkPolyData * ExtendedNew()
bool AllocateCopy(vtkPolyData *pd)
Preallocate memory for the internal cell arrays such that they are the same size as those in pd.
vtkIdType InsertNextCell(int type, vtkIdList *pts)
Insert a cell of type VTK_VERTEX, VTK_POLY_VERTEX, VTK_LINE, VTK_POLY_LINE, VTK_TRIANGLE,...
vtkIdType GetNumberOfPolys()
Return the number of primitives of a particular type held.
Definition: vtkPolyData.h:344
vtkSmartPointer< vtkCellArray > Strips
Definition: vtkPolyData.h:808
vtkSmartPointer< vtkQuad > Quad
Definition: vtkPolyData.h:798
vtkCell * GetCell(vtkIdType cellId) override
Standard vtkDataSet interface.
void DeleteCell(vtkIdType cellId)
Mark a point/cell as deleted from this vtkPolyData.
Definition: vtkPolyData.h:929
vtkSmartPointer< vtkPolygon > Polygon
Definition: vtkPolyData.h:799
int GetMaxCellSize() override
Return the maximum cell size in this poly data.
vtkSmartPointer< vtkLine > Line
Definition: vtkPolyData.h:795
void ResizeCellList(vtkIdType ptId, int size)
Resize the list of cells using a particular point.
Definition: vtkPolyData.h:961
vtkTimeStamp CellsBoundsTime
Definition: vtkPolyData.h:823
vtkCellArray * GetPolys()
Get the cell array defining polygons.
vtkIdType GetNumberOfCells() override
Standard vtkDataSet interface.
Definition: vtkPolyData.h:858
bool AllocateExact(vtkIdType numCells, vtkIdType connectivitySize)
Preallocate memory for the internal cell arrays.
unsigned char GetCell(vtkIdType cellId, const vtkIdType *&pts)
Get a pointer to the cell, ie [npts pid1 .
vtkSmartPointer< vtkCellArray > Polys
Definition: vtkPolyData.h:807
void Reset()
Begin inserting data all over again.
static vtkPolyData * New()
static vtkPolyDataDummyContainter DummyContainer
Definition: vtkPolyData.h:818
void AddCellReference(vtkIdType cellId)
Add references to cell in cell structure.
Definition: vtkPolyData.h:948
int GetDataObjectType() override
Return what type of dataset this is.
Definition: vtkPolyData.h:206
vtkSmartPointer< vtkCellArray > Lines
Definition: vtkPolyData.h:806
vtkSmartPointer< vtkEmptyCell > EmptyCell
Definition: vtkPolyData.h:801
vtkIdType GetNumberOfVerts()
Return the number of primitives of a particular type held.
Definition: vtkPolyData.h:342
void DeleteCells()
Release data structure that allows random access of the cells.
virtual vtkMTimeType GetMeshMTime()
Return the mesh (geometry/topology) modification time.
vtkSmartPointer< vtkVertex > Vertex
Definition: vtkPolyData.h:793
int IsPointUsedByCell(vtkIdType ptId, vtkIdType cellId)
Determine whether a point is used by a particular cell.
Definition: vtkPolyData.h:905
void ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId, vtkIdType newPtId)
Replace a point in the cell connectivity list with a different point.
Definition: vtkPolyData.h:984
vtkSmartPointer< CellMap > Cells
Definition: vtkPolyData.h:812
void GetPointCells(vtkIdType ptId, vtkIdList *cellIds) override
Efficient method to obtain cells using a particular point.
vtkCellArray * GetLines()
Get the cell array defining lines.
vtkSmartPointer< vtkTriangle > Triangle
Definition: vtkPolyData.h:797
void BuildCells()
Create data structure that allows random access of cells.
void DeletePoint(vtkIdType ptId)
Mark a point/cell as deleted from this vtkPolyData.
Definition: vtkPolyData.h:923
void CopyCells(vtkPolyData *pd, vtkIdList *idList, vtkIncrementalPointLocator *locator=nullptr)
Copy cells listed in idList from pd, including points, point data, and cell data.
void Allocate(vtkIdType numCells=1000, int vtkNotUsed(extSize)=1000)
Method allocates initial storage for vertex, line, polygon, and triangle strip arrays.
Definition: vtkPolyData.h:424
void BuildLinks(int initialSize=0)
Create upward links from points to cells that use each point.
void Allocate(vtkPolyData *inPolyData, vtkIdType numCells=1000, int vtkNotUsed(extSize)=1000)
Similar to the method above, this method allocates initial storage for vertex, line,...
Definition: vtkPolyData.h:439
void DeleteLinks()
Release the upward links from point to cells that use each point.
vtkSmartPointer< vtkTriangleStrip > TriangleStrip
Definition: vtkPolyData.h:800
void SetStrips(vtkCellArray *s)
Set the cell array defining triangle strips.
bool AllocateProportional(vtkPolyData *pd, double ratio)
Preallocate memory for the internal cell arrays such that they are proportional to those in pd by a f...
cell represents a set of 1D lines
Definition: vtkPolyLine.h:146
cell represents a set of 0D vertices
Definition: vtkPolyVertex.h:72
a cell that represents an n-sided polygon
Definition: vtkPolygon.h:149
a cell that represents a 2D quadrilateral
Definition: vtkQuad.h:95
record modification and/or execution time
Definition: vtkTimeStamp.h:52
a cell that represents a triangle strip
a cell that represents a triangle
Definition: vtkTriangle.h:145
a cell that represents a 3D point
Definition: vtkVertex.h:100
vtkSmartPointer< vtkDataArray > GetData(const Ioss::GroupingEntity *entity, const std::string &fieldname, Ioss::Transform *transform=nullptr, Cache *cache=nullptr, const std::string &cachekey=std::string())
Returns a VTK array for a given field (fieldname) on the chosen block (or set) entity.
@ info
Definition: vtkX3D.h:382
@ type
Definition: vtkX3D.h:522
@ size
Definition: vtkX3D.h:259
unsigned char GetCellType() const noexcept
vtkIdType GetCellId() const noexcept
@ VTK_EMPTY_CELL
Definition: vtkCellType.h:85
#define VTK_DEPRECATED_IN_9_0_0(reason)
int vtkIdType
Definition: vtkType.h:332
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
#define VTK_POLY_DATA
Definition: vtkType.h:77
#define VTK_SIZEHINT(...)