VTK  9.0.1
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 =========================================================================*/
62 #ifndef vtkPolyData_h
63 #define vtkPolyData_h
64 
65 #include "vtkCommonDataModelModule.h" // For export macro
66 #include "vtkPointSet.h"
67 
68 #include "vtkCellArray.h" // Needed for inline methods
69 #include "vtkCellLinks.h" // Needed for inline methods
70 #include "vtkPolyDataInternals.h" // Needed for inline methods
71 
72 class vtkVertex;
73 class vtkPolyVertex;
74 class vtkLine;
75 class vtkPolyLine;
76 class vtkTriangle;
77 class vtkQuad;
78 class vtkPolygon;
79 class vtkTriangleStrip;
80 class vtkEmptyCell;
81 struct vtkPolyDataDummyContainter;
83 
84 class VTKCOMMONDATAMODEL_EXPORT vtkPolyData : public vtkPointSet
85 {
86 public:
87  static vtkPolyData* New();
88 
89  vtkTypeMacro(vtkPolyData, vtkPointSet);
90  void PrintSelf(ostream& os, vtkIndent indent) override;
91 
95  int GetDataObjectType() override { return VTK_POLY_DATA; }
96 
100  void CopyStructure(vtkDataSet* ds) override;
101 
103 
106  vtkIdType GetNumberOfCells() override;
107  using vtkDataSet::GetCell;
108  vtkCell* GetCell(vtkIdType cellId) override;
109  void GetCell(vtkIdType cellId, vtkGenericCell* cell) override;
110  int GetCellType(vtkIdType cellId) override;
111  void GetCellBounds(vtkIdType cellId, double bounds[6]) override;
112  void GetCellNeighbors(vtkIdType cellId, vtkIdList* ptIds, vtkIdList* cellIds) override;
114 
122  void CopyCells(vtkPolyData* pd, vtkIdList* idList, vtkIncrementalPointLocator* locator = nullptr);
123 
127  void GetCellPoints(vtkIdType cellId, vtkIdList* ptIds) override;
128 
133  void GetPointCells(vtkIdType ptId, vtkIdList* cellIds) override;
134 
140  void ComputeBounds() override;
141 
148  void Squeeze() override;
149 
153  int GetMaxCellSize() override;
154 
158  void SetVerts(vtkCellArray* v);
159 
164  vtkCellArray* GetVerts();
165 
169  void SetLines(vtkCellArray* l);
170 
175  vtkCellArray* GetLines();
176 
180  void SetPolys(vtkCellArray* p);
181 
186  vtkCellArray* GetPolys();
187 
191  void SetStrips(vtkCellArray* s);
192 
198  vtkCellArray* GetStrips();
199 
201 
204  vtkIdType GetNumberOfVerts() { return (this->Verts ? this->Verts->GetNumberOfCells() : 0); }
205  vtkIdType GetNumberOfLines() { return (this->Lines ? this->Lines->GetNumberOfCells() : 0); }
206  vtkIdType GetNumberOfPolys() { return (this->Polys ? this->Polys->GetNumberOfCells() : 0); }
207  vtkIdType GetNumberOfStrips() { return (this->Strips ? this->Strips->GetNumberOfCells() : 0); }
209 
219  bool AllocateEstimate(vtkIdType numCells, vtkIdType maxCellSize);
220 
230  bool AllocateEstimate(vtkIdType numVerts, vtkIdType maxVertSize, vtkIdType numLines,
231  vtkIdType maxLineSize, vtkIdType numPolys, vtkIdType maxPolySize, vtkIdType numStrips,
232  vtkIdType maxStripSize);
233 
243  bool AllocateExact(vtkIdType numCells, vtkIdType connectivitySize);
244 
255  bool AllocateExact(vtkIdType numVerts, vtkIdType vertConnSize, vtkIdType numLines,
256  vtkIdType lineConnSize, vtkIdType numPolys, vtkIdType polyConnSize, vtkIdType numStrips,
257  vtkIdType stripConnSize);
258 
267  bool AllocateCopy(vtkPolyData* pd);
268 
278  bool AllocateProportional(vtkPolyData* pd, double ratio);
279 
286  void Allocate(vtkIdType numCells = 1000, int vtkNotUsed(extSize) = 1000)
287  {
288  this->AllocateExact(numCells, numCells);
289  }
290 
301  void Allocate(vtkPolyData* inPolyData, vtkIdType numCells = 1000, int vtkNotUsed(extSize) = 1000)
302  {
303  this->AllocateProportional(
304  inPolyData, static_cast<double>(numCells) / inPolyData->GetNumberOfCells());
305  }
306 
314  vtkIdType InsertNextCell(int type, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
315 
323  vtkIdType InsertNextCell(int type, vtkIdList* pts);
324 
329  void Reset();
330 
338  void BuildCells();
339 
343  bool NeedToBuildCells() { return this->Cells == nullptr; }
344 
351  void BuildLinks(int initialSize = 0);
352 
358  void DeleteCells();
359 
363  void DeleteLinks();
364 
366 
370  void GetPointCells(vtkIdType ptId, vtkIdType& ncells, vtkIdType*& cells)
371  VTK_SIZEHINT(cells, ncells);
372 #ifndef VTK_LEGACY_REMOVE
373  VTK_LEGACY(void GetPointCells(vtkIdType ptId, unsigned short& ncells, vtkIdType*& cells))
374  VTK_SIZEHINT(cells, ncells);
375 #endif
376 
377 
383  void GetCellEdgeNeighbors(vtkIdType cellId, vtkIdType p1, vtkIdType p2, vtkIdList* cellIds);
384 
394  unsigned char GetCellPoints(vtkIdType cellId, vtkIdType& npts, vtkIdType const*& pts)
395  VTK_SIZEHINT(pts, npts);
396 
401  int IsTriangle(int v1, int v2, int v3);
402 
410  int IsEdge(vtkIdType p1, vtkIdType p2);
411 
416  int IsPointUsedByCell(vtkIdType ptId, vtkIdType cellId);
417 
426  void ReplaceCell(vtkIdType cellId, vtkIdList* ids);
427  void ReplaceCell(vtkIdType cellId, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
434  void ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId, vtkIdType newPtId);
435 
440  void ReverseCell(vtkIdType cellId);
441 
443 
447  void DeletePoint(vtkIdType ptId);
448  void DeleteCell(vtkIdType cellId);
450 
459  void RemoveDeletedCells();
460 
462 
470  vtkIdType InsertNextLinkedPoint(int numLinks);
471  vtkIdType InsertNextLinkedPoint(double x[3], int numLinks);
473 
480  vtkIdType InsertNextLinkedCell(int type, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
481 
491  void ReplaceLinkedCell(vtkIdType cellId, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
492 
500  void RemoveCellReference(vtkIdType cellId);
501 
509  void AddCellReference(vtkIdType cellId);
510 
518  void RemoveReferenceToCell(vtkIdType ptId, vtkIdType cellId);
519 
527  void AddReferenceToCell(vtkIdType ptId, vtkIdType cellId);
528 
534  void ResizeCellList(vtkIdType ptId, int size);
535 
539  void Initialize() override;
540 
542 
545  virtual int GetPiece();
546  virtual int GetNumberOfPieces();
548 
552  virtual int GetGhostLevel();
553 
562  unsigned long GetActualMemorySize() override;
563 
565 
568  void ShallowCopy(vtkDataObject* src) override;
569  void DeepCopy(vtkDataObject* src) override;
571 
577  void RemoveGhostCells();
578 
580 
584  static vtkPolyData* GetData(vtkInformationVector* v, int i = 0);
586 
605  enum
606  {
607  ERR_NO_SUCH_FIELD = -4,
608  ERR_INCORRECT_FIELD = -3,
609  ERR_NON_MANIFOLD_STAR = -2,
610  REGULAR_POINT = -1,
611  MINIMUM = 0,
612  SADDLE = 1,
613  MAXIMUM = 2
614  };
615 
616  int GetScalarFieldCriticalIndex(vtkIdType pointId, vtkDataArray* scalarField);
617  int GetScalarFieldCriticalIndex(vtkIdType pointId, int fieldId);
618  int GetScalarFieldCriticalIndex(vtkIdType pointId, const char* fieldName);
619 
627  virtual vtkMTimeType GetMeshMTime();
628 
632  vtkMTimeType GetMTime() override;
633 
643  unsigned char GetCell(vtkIdType cellId, const vtkIdType*& pts);
644 
645 protected:
646  vtkPolyData();
647  ~vtkPolyData() override;
648 
651 
652  vtkCellArray* GetCellArrayInternal(TaggedCellId tag);
653 
654  // constant cell objects returned by GetCell called.
664 
665  // points inherited
666  // point data (i.e., scalars, vectors, normals, tcoords) inherited
671 
672  // supporting structures for more complex topological operations
673  // built only when necessary
676 
678 
679  // dummy static member below used as a trick to simplify traversal
680  static vtkPolyDataDummyContainter DummyContainer;
681 
682 private:
683  // Hide these from the user and the compiler.
684 
688  void GetCellNeighbors(vtkIdType cellId, vtkIdList& ptIds, vtkIdList& cellIds)
689  {
690  this->GetCellNeighbors(cellId, &ptIds, &cellIds);
691  }
692 
693  void Cleanup();
694 
695 private:
696  vtkPolyData(const vtkPolyData&) = delete;
697  void operator=(const vtkPolyData&) = delete;
698 };
699 
700 //------------------------------------------------------------------------------
701 inline void vtkPolyData::GetPointCells(vtkIdType ptId, vtkIdType& ncells, vtkIdType*& cells)
702 {
703  ncells = this->Links->GetNcells(ptId);
704  cells = this->Links->GetCells(ptId);
705 }
706 
707 #ifndef VTK_LEGACY_REMOVE
708 inline void vtkPolyData::GetPointCells(vtkIdType ptId, unsigned short& ncells, vtkIdType*& cells)
709 {
710  VTK_LEGACY_BODY(vtkPolyData::GetPointCells, "VTK 9.0");
711  ncells = static_cast<unsigned short>(this->Links->GetNcells(ptId));
712  cells = this->Links->GetCells(ptId);
713 }
714 #endif
715 
716 //------------------------------------------------------------------------------
718 {
719  return (this->GetNumberOfVerts() + this->GetNumberOfLines() + this->GetNumberOfPolys() +
720  this->GetNumberOfStrips());
721 }
722 
723 //------------------------------------------------------------------------------
725 {
726  if (!this->Cells)
727  {
728  this->BuildCells();
729  }
730  return static_cast<int>(this->Cells->GetTag(cellId).GetCellType());
731 }
732 
733 //------------------------------------------------------------------------------
734 inline int vtkPolyData::IsTriangle(int v1, int v2, int v3)
735 {
736  vtkIdType n1;
737  int i, j, tVerts[3];
738  vtkIdType* cells;
739  const vtkIdType* tVerts2;
740  vtkIdType n2;
741 
742  tVerts[0] = v1;
743  tVerts[1] = v2;
744  tVerts[2] = v3;
745 
746  for (i = 0; i < 3; i++)
747  {
748  this->GetPointCells(tVerts[i], n1, cells);
749  for (j = 0; j < n1; j++)
750  {
751  this->GetCellPoints(cells[j], n2, tVerts2);
752  if ((tVerts[0] == tVerts2[0] || tVerts[0] == tVerts2[1] || tVerts[0] == tVerts2[2]) &&
753  (tVerts[1] == tVerts2[0] || tVerts[1] == tVerts2[1] || tVerts[1] == tVerts2[2]) &&
754  (tVerts[2] == tVerts2[0] || tVerts[2] == tVerts2[1] || tVerts[2] == tVerts2[2]))
755  {
756  return 1;
757  }
758  }
759  }
760  return 0;
761 }
762 
763 //------------------------------------------------------------------------------
765 {
766  vtkIdType npts;
767  const vtkIdType* pts;
768 
769  this->GetCellPoints(cellId, npts, pts);
770  for (vtkIdType i = 0; i < npts; i++)
771  {
772  if (pts[i] == ptId)
773  {
774  return 1;
775  }
776  }
777 
778  return 0;
779 }
780 
781 //------------------------------------------------------------------------------
783 {
784  this->Links->DeletePoint(ptId);
785 }
786 
787 //------------------------------------------------------------------------------
789 {
790  this->Cells->GetTag(cellId).MarkDeleted();
791 }
792 
793 //------------------------------------------------------------------------------
795 {
796  const vtkIdType* pts;
797  vtkIdType npts;
798 
799  this->GetCellPoints(cellId, npts, pts);
800  for (vtkIdType i = 0; i < npts; i++)
801  {
802  this->Links->RemoveCellReference(cellId, pts[i]);
803  }
804 }
805 
806 //------------------------------------------------------------------------------
808 {
809  const vtkIdType* pts;
810  vtkIdType npts;
811 
812  this->GetCellPoints(cellId, npts, pts);
813  for (vtkIdType i = 0; i < npts; i++)
814  {
815  this->Links->AddCellReference(cellId, pts[i]);
816  }
817 }
818 
819 //------------------------------------------------------------------------------
821 {
822  this->Links->ResizeCellList(ptId, size);
823 }
824 
825 //------------------------------------------------------------------------------
827 {
828  switch (tag.GetTarget())
829  {
831  return this->Verts;
833  return this->Lines;
835  return this->Polys;
837  return this->Strips;
838  }
839  return nullptr; // unreachable
840 }
841 
842 //------------------------------------------------------------------------------
843 inline void vtkPolyData::ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId, vtkIdType newPtId)
844 {
845  vtkNew<vtkIdList> ids;
846  this->GetCellPoints(cellId, ids);
847  for (vtkIdType i = 0; i < ids->GetNumberOfIds(); i++)
848  {
849  if (ids->GetId(i) == oldPtId)
850  {
851  ids->SetId(i, newPtId);
852  break;
853  }
854  }
855  this->ReplaceCell(cellId, static_cast<int>(ids->GetNumberOfIds()), ids->GetPointer(0));
856 }
857 
858 //------------------------------------------------------------------------------
859 inline unsigned char vtkPolyData::GetCellPoints(
860  vtkIdType cellId, vtkIdType& npts, vtkIdType const*& pts)
861 {
862  if (!this->Cells)
863  {
864  this->BuildCells();
865  }
866 
867  const TaggedCellId tag = this->Cells->GetTag(cellId);
868  if (tag.IsDeleted())
869  {
870  npts = 0;
871  pts = nullptr;
872  return VTK_EMPTY_CELL;
873  }
874 
875  vtkCellArray* cells = this->GetCellArrayInternal(tag);
876  cells->GetCellAtId(tag.GetCellId(), npts, pts);
877  return tag.GetCellType();
878 }
879 
880 #endif
vtkPolyData::Strips
vtkSmartPointer< vtkCellArray > Strips
Definition: vtkPolyData.h:670
vtkPolyData::Polygon
vtkSmartPointer< vtkPolygon > Polygon
Definition: vtkPolyData.h:661
vtkPolyData::Verts
vtkSmartPointer< vtkCellArray > Verts
Definition: vtkPolyData.h:667
vtkPolyData::GetCellType
int GetCellType(vtkIdType cellId) override
Get type of cell with cellId such that: 0 <= cellId < NumberOfCells.
Definition: vtkPolyData.h:724
vtkPolyData::GetCellArrayInternal
vtkCellArray * GetCellArrayInternal(TaggedCellId tag)
Definition: vtkPolyData.h:826
vtkPolyData::GetPointCells
void GetPointCells(vtkIdType ptId, vtkIdList *cellIds) override
Efficient method to obtain cells using a particular point.
vtkPolyData::ReplaceCellPoint
void ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId, vtkIdType newPtId)
Replace a point in the cell connectivity list with a different point.
Definition: vtkPolyData.h:843
vtkPolyData::Vertex
vtkSmartPointer< vtkVertex > Vertex
Definition: vtkPolyData.h:655
vtkPointSet.h
vtkX3D::type
@ type
Definition: vtkX3D.h:522
vtkIdType
int vtkIdType
Definition: vtkType.h:338
vtkPolygon
a cell that represents an n-sided polygon
Definition: vtkPolygon.h:39
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkPolyData_detail::Target::Verts
@ Verts
vtkPolyData::EmptyCell
vtkSmartPointer< vtkEmptyCell > EmptyCell
Definition: vtkPolyData.h:663
vtkPolyData::ReplaceCell
void ReplaceCell(vtkIdType cellId, vtkIdList *ids)
Replace the points defining cell "cellId" with a new set of points.
vtkEmptyCell
an empty cell used as a place-holder during processing
Definition: vtkEmptyCell.h:29
vtkPolyData_detail::Target::Strips
@ Strips
vtkCellArray.h
vtkPolyData::PolyLine
vtkSmartPointer< vtkPolyLine > PolyLine
Definition: vtkPolyData.h:658
vtkPolyData::GetNumberOfPolys
vtkIdType GetNumberOfPolys()
Definition: vtkPolyData.h:206
vtkSmartPointer< vtkVertex >
vtkPointSet::Squeeze
void Squeeze() override
Reclaim any unused memory.
vtkPolyData::RemoveCellReference
void RemoveCellReference(vtkIdType cellId)
Remove all references to cell in cell structure.
Definition: vtkPolyData.h:794
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:49
vtkPointSet::GetData
static vtkPointSet * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
vtkVertex
a cell that represents a 3D point
Definition: vtkVertex.h:30
vtkPolyData::NeedToBuildCells
bool NeedToBuildCells()
Check if BuildCells is needed.
Definition: vtkPolyData.h:343
vtkPolyData_detail::TaggedCellId::GetCellId
vtkIdType GetCellId() const noexcept
Definition: vtkPolyDataInternals.h:174
vtkPolyData::Links
vtkSmartPointer< vtkCellLinks > Links
Definition: vtkPolyData.h:675
vtkPolyData_detail::Target::Polys
@ Polys
vtkLine
cell represents a 1D line
Definition: vtkLine.h:29
vtkPolyData::PolyVertex
vtkSmartPointer< vtkPolyVertex > PolyVertex
Definition: vtkPolyData.h:656
vtkCellArray::GetCellAtId
void GetCellAtId(vtkIdType cellId, vtkIdType &cellSize, vtkIdType const *&cellPoints)
Return the point ids for the cell at cellId.
Definition: vtkCellArray.h:1453
vtkPolyData::GetNumberOfVerts
vtkIdType GetNumberOfVerts()
Return the number of primitives of a particular type held.
Definition: vtkPolyData.h:204
vtkPolyData::DeletePoint
void DeletePoint(vtkIdType ptId)
Mark a point/cell as deleted from this vtkPolyData.
Definition: vtkPolyData.h:782
vtkPolyData::Triangle
vtkSmartPointer< vtkTriangle > Triangle
Definition: vtkPolyData.h:659
vtkPolyData_detail::Target::Lines
@ Lines
vtkPolyData::GetDataObjectType
int GetDataObjectType() override
Return what type of dataset this is.
Definition: vtkPolyData.h:95
vtkPolyData::AddCellReference
void AddCellReference(vtkIdType cellId)
Add references to cell in cell structure.
Definition: vtkPolyData.h:807
vtkPointSet::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPolyData_detail::TaggedCellId::GetTarget
Target GetTarget() const noexcept
Definition: vtkPolyDataInternals.h:168
VTK_SIZEHINT
#define VTK_SIZEHINT(...)
Definition: vtkWrappingHints.h:45
vtkPolyLine
cell represents a set of 1D lines
Definition: vtkPolyLine.h:36
VTK_EMPTY_CELL
@ VTK_EMPTY_CELL
Definition: vtkCellType.h:46
vtkPolyData_detail::TaggedCellId::IsDeleted
bool IsDeleted() const noexcept
Definition: vtkPolyDataInternals.h:188
vtkPolyData::Polys
vtkSmartPointer< vtkCellArray > Polys
Definition: vtkPolyData.h:669
vtkPointSet::DeepCopy
void DeepCopy(vtkDataObject *src) override
vtkDataSet::GetCellNeighbors
virtual void GetCellNeighbors(vtkIdType cellId, vtkIdList *ptIds, vtkIdList *cellIds)
Topological inquiry to get all cells using list of points exclusive of cell specified (e....
vtkCell
abstract class to specify cell behavior
Definition: vtkCell.h:56
vtkPolyData::Cells
vtkSmartPointer< CellMap > Cells
Definition: vtkPolyData.h:674
vtkNew::GetPointer
T * GetPointer() const noexcept
Get a raw pointer to the contained object.
Definition: vtkNew.h:140
vtkDataSet::GetPointCells
virtual void GetPointCells(vtkIdType ptId, vtkIdList *cellIds)=0
Topological inquiry to get cells using point.
vtkPolyData_detail::TaggedCellId::GetCellType
unsigned char GetCellType() const noexcept
Definition: vtkPolyDataInternals.h:171
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:179
vtkPolyData::IsTriangle
int IsTriangle(int v1, int v2, int v3)
Given three vertices, determine whether it's a triangle.
Definition: vtkPolyData.h:734
vtkPolyData::Quad
vtkSmartPointer< vtkQuad > Quad
Definition: vtkPolyData.h:660
vtkIncrementalPointLocator
Abstract class in support of both point location and point insertion.
Definition: vtkIncrementalPointLocator.h:51
vtkPolyData::Lines
vtkSmartPointer< vtkCellArray > Lines
Definition: vtkPolyData.h:668
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:30
vtkPointSet::Initialize
void Initialize() override
Reset to an empty state and free any memory.
vtkPointSet::GetMTime
vtkMTimeType GetMTime() override
Get MTime which also considers its vtkPoints MTime.
vtkX3D::size
@ size
Definition: vtkX3D.h:259
vtkNew< vtkIdList >
vtkPolyData::GetNumberOfCells
vtkIdType GetNumberOfCells() override
Standard vtkDataSet interface.
Definition: vtkPolyData.h:717
vtkPolyData::Line
vtkSmartPointer< vtkLine > Line
Definition: vtkPolyData.h:657
vtkTriangle
a cell that represents a triangle
Definition: vtkTriangle.h:35
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkDataSet::GetCellPoints
virtual void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds)=0
Topological inquiry to get points defining cell.
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkPolyData::IsPointUsedByCell
int IsPointUsedByCell(vtkIdType ptId, vtkIdType cellId)
Determine whether a point is used by a particular cell.
Definition: vtkPolyData.h:764
vtkPolyData::BuildCells
void BuildCells()
Create data structure that allows random access of cells.
vtkPolyData::ResizeCellList
void ResizeCellList(vtkIdType ptId, int size)
Resize the list of cells using a particular point.
Definition: vtkPolyData.h:820
vtkPolyData::GetNumberOfLines
vtkIdType GetNumberOfLines()
Definition: vtkPolyData.h:205
vtkPointSet
abstract class for specifying dataset behavior
Definition: vtkPointSet.h:62
vtkPolyData::Allocate
void Allocate(vtkIdType numCells=1000, int vtkNotUsed(extSize)=1000)
Method allocates initial storage for vertex, line, polygon, and triangle strip arrays.
Definition: vtkPolyData.h:286
vtkPolyData::LegacyBuffer
vtkNew< vtkIdList > LegacyBuffer
Definition: vtkPolyData.h:677
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
vtkPolyData::DummyContainer
static vtkPolyDataDummyContainter DummyContainer
Definition: vtkPolyData.h:680
vtkPointSet::ShallowCopy
void ShallowCopy(vtkDataObject *src) override
Shallow and Deep copy.
vtkGenericCell
provides thread-safe access to cells
Definition: vtkGenericCell.h:36
vtkPolyDataInternals.h
vtkPolyData::GetNumberOfStrips
vtkIdType GetNumberOfStrips()
Definition: vtkPolyData.h:207
vtkPolyData_detail::CellMap
Definition: vtkPolyDataInternals.h:203
vtkDataSet::GetNumberOfCells
virtual vtkIdType GetNumberOfCells()=0
Determine the number of cells composing the dataset.
vtkPolyData::Allocate
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:301
vtkPolyData_detail::TaggedCellId
Definition: vtkPolyDataInternals.h:145
vtkPolyData::TriangleStrip
vtkSmartPointer< vtkTriangleStrip > TriangleStrip
Definition: vtkPolyData.h:662
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:59
vtkDataSet::GetCellType
virtual int GetCellType(vtkIdType cellId)=0
Get type of cell with cellId such that: 0 <= cellId < NumberOfCells.
vtkPointSet::GetActualMemorySize
unsigned long GetActualMemorySize() override
Return the actual size of the data in kibibytes (1024 bytes).
vtkPolyData::DeleteCell
void DeleteCell(vtkIdType cellId)
Definition: vtkPolyData.h:788
vtkDataSet::GetCellBounds
virtual void GetCellBounds(vtkIdType cellId, double bounds[6])
Get the bounds of the cell with cellId such that: 0 <= cellId < NumberOfCells.
VTK_POLY_DATA
#define VTK_POLY_DATA
Definition: vtkType.h:85
vtkPointSet::CopyStructure
void CopyStructure(vtkDataSet *pd) override
Copy the geometric structure of an input point set object.
vtkDataSet::GetMaxCellSize
virtual int GetMaxCellSize()=0
Convenience method returns largest cell size in dataset.
vtkTriangleStrip
a cell that represents a triangle strip
Definition: vtkTriangleStrip.h:37
vtkPolyData::GetCellPoints
void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds) override
Copy a cells point ids into list provided.
vtkQuad
a cell that represents a 2D quadrilateral
Definition: vtkQuad.h:35
vtkPointSet::ComputeBounds
void ComputeBounds() override
Compute the (X, Y, Z) bounds of the data.
vtkDataObject::New
static vtkDataObject * New()
vtkDataSet::GetCell
virtual vtkCell * GetCell(vtkIdType cellId)=0
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293
vtkPolyVertex
cell represents a set of 0D vertices
Definition: vtkPolyVertex.h:32