VTK
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 
138  void ComputeBounds() override;
139 
146  void Squeeze() override;
147 
151  int GetMaxCellSize() override;
152 
156  void SetVerts(vtkCellArray* v);
157 
162  vtkCellArray* GetVerts();
163 
167  void SetLines(vtkCellArray* l);
168 
173  vtkCellArray* GetLines();
174 
178  void SetPolys(vtkCellArray* p);
179 
184  vtkCellArray* GetPolys();
185 
189  void SetStrips(vtkCellArray* s);
190 
196  vtkCellArray* GetStrips();
197 
199 
202  vtkIdType GetNumberOfVerts() { return (this->Verts ? this->Verts->GetNumberOfCells() : 0); }
203  vtkIdType GetNumberOfLines() { return (this->Lines ? this->Lines->GetNumberOfCells() : 0); }
204  vtkIdType GetNumberOfPolys() { return (this->Polys ? this->Polys->GetNumberOfCells() : 0); }
205  vtkIdType GetNumberOfStrips() { return (this->Strips ? this->Strips->GetNumberOfCells() : 0); }
207 
217  bool AllocateEstimate(vtkIdType numCells, vtkIdType maxCellSize);
218 
228  bool AllocateEstimate(vtkIdType numVerts, vtkIdType maxVertSize, vtkIdType numLines,
229  vtkIdType maxLineSize, vtkIdType numPolys, vtkIdType maxPolySize, vtkIdType numStrips,
230  vtkIdType maxStripSize);
231 
241  bool AllocateExact(vtkIdType numCells, vtkIdType connectivitySize);
242 
253  bool AllocateExact(vtkIdType numVerts, vtkIdType vertConnSize, vtkIdType numLines,
254  vtkIdType lineConnSize, vtkIdType numPolys, vtkIdType polyConnSize, vtkIdType numStrips,
255  vtkIdType stripConnSize);
256 
265  bool AllocateCopy(vtkPolyData* pd);
266 
276  bool AllocateProportional(vtkPolyData* pd, double ratio);
277 
284  void Allocate(vtkIdType numCells = 1000, int vtkNotUsed(extSize) = 1000)
285  {
286  this->AllocateExact(numCells, numCells);
287  }
288 
299  void Allocate(vtkPolyData* inPolyData, vtkIdType numCells = 1000, int vtkNotUsed(extSize) = 1000)
300  {
301  this->AllocateProportional(
302  inPolyData, static_cast<double>(numCells) / inPolyData->GetNumberOfCells());
303  }
304 
312  vtkIdType InsertNextCell(int type, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
313 
321  vtkIdType InsertNextCell(int type, vtkIdList* pts);
322 
327  void Reset();
328 
336  void BuildCells();
337 
341  bool NeedToBuildCells() { return this->Cells == nullptr; }
342 
349  void BuildLinks(int initialSize = 0);
350 
356  void DeleteCells();
357 
361  void DeleteLinks();
362 
364 
368  void GetPointCells(vtkIdType ptId, vtkIdType& ncells, vtkIdType*& cells)
369  VTK_SIZEHINT(cells, ncells);
370 #ifndef VTK_LEGACY_REMOVE
371  VTK_LEGACY(void GetPointCells(vtkIdType ptId, unsigned short& ncells, vtkIdType*& cells))
372  VTK_SIZEHINT(cells, ncells);
373 #endif
374 
375 
381  void GetCellEdgeNeighbors(vtkIdType cellId, vtkIdType p1, vtkIdType p2, vtkIdList* cellIds);
382 
392  unsigned char GetCellPoints(vtkIdType cellId, vtkIdType& npts, vtkIdType const*& pts)
393  VTK_SIZEHINT(pts, npts);
394 
399  int IsTriangle(int v1, int v2, int v3);
400 
408  int IsEdge(vtkIdType p1, vtkIdType p2);
409 
414  int IsPointUsedByCell(vtkIdType ptId, vtkIdType cellId);
415 
424  void ReplaceCell(vtkIdType cellId, vtkIdList* ids);
425  void ReplaceCell(vtkIdType cellId, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
432  void ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId, vtkIdType newPtId);
433 
438  void ReverseCell(vtkIdType cellId);
439 
441 
445  void DeletePoint(vtkIdType ptId);
446  void DeleteCell(vtkIdType cellId);
448 
457  void RemoveDeletedCells();
458 
460 
468  vtkIdType InsertNextLinkedPoint(int numLinks);
469  vtkIdType InsertNextLinkedPoint(double x[3], int numLinks);
471 
478  vtkIdType InsertNextLinkedCell(int type, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
479 
489  void ReplaceLinkedCell(vtkIdType cellId, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
490 
498  void RemoveCellReference(vtkIdType cellId);
499 
507  void AddCellReference(vtkIdType cellId);
508 
516  void RemoveReferenceToCell(vtkIdType ptId, vtkIdType cellId);
517 
525  void AddReferenceToCell(vtkIdType ptId, vtkIdType cellId);
526 
532  void ResizeCellList(vtkIdType ptId, int size);
533 
537  void Initialize() override;
538 
540 
543  virtual int GetPiece();
544  virtual int GetNumberOfPieces();
546 
550  virtual int GetGhostLevel();
551 
560  unsigned long GetActualMemorySize() override;
561 
563 
566  void ShallowCopy(vtkDataObject* src) override;
567  void DeepCopy(vtkDataObject* src) override;
569 
575  void RemoveGhostCells();
576 
578 
582  static vtkPolyData* GetData(vtkInformationVector* v, int i = 0);
584 
603  enum
604  {
605  ERR_NO_SUCH_FIELD = -4,
606  ERR_INCORRECT_FIELD = -3,
607  ERR_NON_MANIFOLD_STAR = -2,
608  REGULAR_POINT = -1,
609  MINIMUM = 0,
610  SADDLE = 1,
611  MAXIMUM = 2
612  };
613 
614  int GetScalarFieldCriticalIndex(vtkIdType pointId, vtkDataArray* scalarField);
615  int GetScalarFieldCriticalIndex(vtkIdType pointId, int fieldId);
616  int GetScalarFieldCriticalIndex(vtkIdType pointId, const char* fieldName);
617 
625  virtual vtkMTimeType GetMeshMTime();
626 
630  vtkMTimeType GetMTime() override;
631 
641  unsigned char GetCell(vtkIdType cellId, const vtkIdType*& pts);
642 
643 protected:
644  vtkPolyData();
645  ~vtkPolyData() override;
646 
649 
650  vtkCellArray* GetCellArrayInternal(TaggedCellId tag);
651 
652  // constant cell objects returned by GetCell called.
662 
663  // points inherited
664  // point data (i.e., scalars, vectors, normals, tcoords) inherited
669 
670  // supporting structures for more complex topological operations
671  // built only when necessary
674 
676 
677  // dummy static member below used as a trick to simplify traversal
678  static vtkPolyDataDummyContainter DummyContainer;
679 
680 private:
681  // Hide these from the user and the compiler.
682 
686  void GetCellNeighbors(vtkIdType cellId, vtkIdList& ptIds, vtkIdList& cellIds)
687  {
688  this->GetCellNeighbors(cellId, &ptIds, &cellIds);
689  }
690 
691  void Cleanup();
692 
693 private:
694  vtkPolyData(const vtkPolyData&) = delete;
695  void operator=(const vtkPolyData&) = delete;
696 };
697 
698 //------------------------------------------------------------------------------
699 inline void vtkPolyData::GetPointCells(vtkIdType ptId, vtkIdType& ncells, vtkIdType*& cells)
700 {
701  ncells = this->Links->GetNcells(ptId);
702  cells = this->Links->GetCells(ptId);
703 }
704 
705 #ifndef VTK_LEGACY_REMOVE
706 inline void vtkPolyData::GetPointCells(vtkIdType ptId, unsigned short& ncells, vtkIdType*& cells)
707 {
708  VTK_LEGACY_BODY(vtkPolyData::GetPointCells, "VTK 9.0");
709  ncells = static_cast<unsigned short>(this->Links->GetNcells(ptId));
710  cells = this->Links->GetCells(ptId);
711 }
712 #endif
713 
714 //------------------------------------------------------------------------------
716 {
717  return (this->GetNumberOfVerts() + this->GetNumberOfLines() + this->GetNumberOfPolys() +
718  this->GetNumberOfStrips());
719 }
720 
721 //------------------------------------------------------------------------------
723 {
724  if (!this->Cells)
725  {
726  this->BuildCells();
727  }
728  return static_cast<int>(this->Cells->GetTag(cellId).GetCellType());
729 }
730 
731 //------------------------------------------------------------------------------
732 inline int vtkPolyData::IsTriangle(int v1, int v2, int v3)
733 {
734  vtkIdType n1;
735  int i, j, tVerts[3];
736  vtkIdType* cells;
737  const vtkIdType* tVerts2;
738  vtkIdType n2;
739 
740  tVerts[0] = v1;
741  tVerts[1] = v2;
742  tVerts[2] = v3;
743 
744  for (i = 0; i < 3; i++)
745  {
746  this->GetPointCells(tVerts[i], n1, cells);
747  for (j = 0; j < n1; j++)
748  {
749  this->GetCellPoints(cells[j], n2, tVerts2);
750  if ((tVerts[0] == tVerts2[0] || tVerts[0] == tVerts2[1] || tVerts[0] == tVerts2[2]) &&
751  (tVerts[1] == tVerts2[0] || tVerts[1] == tVerts2[1] || tVerts[1] == tVerts2[2]) &&
752  (tVerts[2] == tVerts2[0] || tVerts[2] == tVerts2[1] || tVerts[2] == tVerts2[2]))
753  {
754  return 1;
755  }
756  }
757  }
758  return 0;
759 }
760 
761 //------------------------------------------------------------------------------
763 {
764  vtkIdType npts;
765  const vtkIdType* pts;
766 
767  this->GetCellPoints(cellId, npts, pts);
768  for (vtkIdType i = 0; i < npts; i++)
769  {
770  if (pts[i] == ptId)
771  {
772  return 1;
773  }
774  }
775 
776  return 0;
777 }
778 
779 //------------------------------------------------------------------------------
781 {
782  this->Links->DeletePoint(ptId);
783 }
784 
785 //------------------------------------------------------------------------------
787 {
788  this->Cells->GetTag(cellId).MarkDeleted();
789 }
790 
791 //------------------------------------------------------------------------------
793 {
794  const vtkIdType* pts;
795  vtkIdType npts;
796 
797  this->GetCellPoints(cellId, npts, pts);
798  for (vtkIdType i = 0; i < npts; i++)
799  {
800  this->Links->RemoveCellReference(cellId, pts[i]);
801  }
802 }
803 
804 //------------------------------------------------------------------------------
806 {
807  const vtkIdType* pts;
808  vtkIdType npts;
809 
810  this->GetCellPoints(cellId, npts, pts);
811  for (vtkIdType i = 0; i < npts; i++)
812  {
813  this->Links->AddCellReference(cellId, pts[i]);
814  }
815 }
816 
817 //------------------------------------------------------------------------------
819 {
820  this->Links->ResizeCellList(ptId, size);
821 }
822 
823 //------------------------------------------------------------------------------
825 {
826  switch (tag.GetTarget())
827  {
829  return this->Verts;
831  return this->Lines;
833  return this->Polys;
835  return this->Strips;
836  }
837  return nullptr; // unreachable
838 }
839 
840 //------------------------------------------------------------------------------
841 inline void vtkPolyData::ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId, vtkIdType newPtId)
842 {
843  vtkNew<vtkIdList> ids;
844  this->GetCellPoints(cellId, ids);
845  for (vtkIdType i = 0; i < ids->GetNumberOfIds(); i++)
846  {
847  if (ids->GetId(i) == oldPtId)
848  {
849  ids->SetId(i, newPtId);
850  break;
851  }
852  }
853  this->ReplaceCell(cellId, static_cast<int>(ids->GetNumberOfIds()), ids->GetPointer(0));
854 }
855 
856 //------------------------------------------------------------------------------
857 inline unsigned char vtkPolyData::GetCellPoints(
858  vtkIdType cellId, vtkIdType& npts, vtkIdType const*& pts)
859 {
860  if (!this->Cells)
861  {
862  this->BuildCells();
863  }
864 
865  const TaggedCellId tag = this->Cells->GetTag(cellId);
866  if (tag.IsDeleted())
867  {
868  npts = 0;
869  pts = nullptr;
870  return VTK_EMPTY_CELL;
871  }
872 
873  vtkCellArray* cells = this->GetCellArrayInternal(tag);
874  cells->GetCellAtId(tag.GetCellId(), npts, pts);
875  return tag.GetCellType();
876 }
877 
878 #endif
vtkPolyData::Strips
vtkSmartPointer< vtkCellArray > Strips
Definition: vtkPolyData.h:668
vtkPolyData::Polygon
vtkSmartPointer< vtkPolygon > Polygon
Definition: vtkPolyData.h:659
vtkPolyData::Verts
vtkSmartPointer< vtkCellArray > Verts
Definition: vtkPolyData.h:665
vtkPolyData::GetCellType
int GetCellType(vtkIdType cellId) override
Get type of cell with cellId such that: 0 <= cellId < NumberOfCells.
Definition: vtkPolyData.h:722
vtkPolyData::GetCellArrayInternal
vtkCellArray * GetCellArrayInternal(TaggedCellId tag)
Definition: vtkPolyData.h:824
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:841
vtkPolyData::Vertex
vtkSmartPointer< vtkVertex > Vertex
Definition: vtkPolyData.h:653
vtkPointSet.h
vtkX3D::type
Definition: vtkX3D.h:522
vtkIdType
int vtkIdType
Definition: vtkType.h:343
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
vtkPolyData::EmptyCell
vtkSmartPointer< vtkEmptyCell > EmptyCell
Definition: vtkPolyData.h:661
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
vtkCellArray.h
vtkPolyData::PolyLine
vtkSmartPointer< vtkPolyLine > PolyLine
Definition: vtkPolyData.h:656
vtkPolyData::GetNumberOfPolys
vtkIdType GetNumberOfPolys()
Definition: vtkPolyData.h:204
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:792
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:341
vtkPolyData_detail::TaggedCellId::GetCellId
vtkIdType GetCellId() const noexcept
Definition: vtkPolyDataInternals.h:174
vtkPolyData::Links
vtkSmartPointer< vtkCellLinks > Links
Definition: vtkPolyData.h:673
vtkPolyData_detail::Target::Polys
vtkLine
cell represents a 1D line
Definition: vtkLine.h:29
vtkPolyData::PolyVertex
vtkSmartPointer< vtkPolyVertex > PolyVertex
Definition: vtkPolyData.h:654
vtkCellArray::GetCellAtId
void GetCellAtId(vtkIdType cellId, vtkIdType &cellSize, vtkIdType const *&cellPoints)
Return the point ids for the cell at cellId.
Definition: vtkCellArray.h:1409
vtkPolyData::GetNumberOfVerts
vtkIdType GetNumberOfVerts()
Return the number of primitives of a particular type held.
Definition: vtkPolyData.h:202
vtkPolyData::DeletePoint
void DeletePoint(vtkIdType ptId)
Mark a point/cell as deleted from this vtkPolyData.
Definition: vtkPolyData.h:780
vtkPolyData::Triangle
vtkSmartPointer< vtkTriangle > Triangle
Definition: vtkPolyData.h:657
vtkPolyData_detail::Target::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:805
vtkIdList::SetId
void SetId(const vtkIdType i, const vtkIdType vtkid)
Set the id at location i.
Definition: vtkIdList.h:89
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
Definition: vtkCellType.h:46
vtkPolyData_detail::TaggedCellId::IsDeleted
bool IsDeleted() const noexcept
Definition: vtkPolyDataInternals.h:188
vtkPolyData::Polys
vtkSmartPointer< vtkCellArray > Polys
Definition: vtkPolyData.h:667
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:672
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:163
vtkPolyData::IsTriangle
int IsTriangle(int v1, int v2, int v3)
Given three vertices, determine whether it's a triangle.
Definition: vtkPolyData.h:732
vtkPolyData::Quad
vtkSmartPointer< vtkQuad > Quad
Definition: vtkPolyData.h:658
vtkIdList::GetId
vtkIdType GetId(const vtkIdType i)
Return the id at location i.
Definition: vtkIdList.h:62
vtkIncrementalPointLocator
Abstract class in support of both point location and point insertion.
Definition: vtkIncrementalPointLocator.h:51
vtkPolyData::Lines
vtkSmartPointer< vtkCellArray > Lines
Definition: vtkPolyData.h:666
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
Definition: vtkX3D.h:259
vtkNew< vtkIdList >
vtkPolyData::GetNumberOfCells
vtkIdType GetNumberOfCells() override
Standard vtkDataSet interface.
Definition: vtkPolyData.h:715
vtkPolyData::Line
vtkSmartPointer< vtkLine > Line
Definition: vtkPolyData.h:655
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:64
vtkDataSet::GetCellPoints
virtual void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds)=0
Topological inquiry to get points defining cell.
vtkX3D::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:762
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:818
vtkPolyData::GetNumberOfLines
vtkIdType GetNumberOfLines()
Definition: vtkPolyData.h:203
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:284
vtkPolyData::LegacyBuffer
vtkNew< vtkIdList > LegacyBuffer
Definition: vtkPolyData.h:675
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
vtkPolyData::DummyContainer
static vtkPolyDataDummyContainter DummyContainer
Definition: vtkPolyData.h:678
vtkPointSet::ShallowCopy
void ShallowCopy(vtkDataObject *src) override
Shallow and Deep copy.
vtkGenericCell
provides thread-safe access to cells
Definition: vtkGenericCell.h:36
vtkPolyDataInternals.h
vtkIdList::GetPointer
vtkIdType * GetPointer(const vtkIdType i)
Get a pointer to a particular data index.
Definition: vtkIdList.h:120
vtkPolyData::GetNumberOfStrips
vtkIdType GetNumberOfStrips()
Definition: vtkPolyData.h:205
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:299
vtkPolyData_detail::TaggedCellId
Definition: vtkPolyDataInternals.h:145
vtkPolyData::TriangleStrip
vtkSmartPointer< vtkTriangleStrip > TriangleStrip
Definition: vtkPolyData.h:660
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:58
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:786
vtkDataSet::GetCellBounds
virtual void GetCellBounds(vtkIdType cellId, double bounds[6])
Get the bounds of the cell with cellId such that: 0 <= cellId < NumberOfCells.
vtkIdList::GetNumberOfIds
vtkIdType GetNumberOfIds()
Return the number of id's in the list.
Definition: vtkIdList.h:57
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:298
vtkPolyVertex
cell represents a set of 0D vertices
Definition: vtkPolyVertex.h:32