VTK  9.0.20200602
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 "vtkDeprecation.h" // for VTK_DEPRECATED_IN_9_0_0
67 #include "vtkPointSet.h"
68 
69 #include "vtkCellArray.h" // Needed for inline methods
70 #include "vtkCellLinks.h" // Needed for inline methods
71 #include "vtkPolyDataInternals.h" // Needed for inline methods
72 
73 class vtkVertex;
74 class vtkPolyVertex;
75 class vtkLine;
76 class vtkPolyLine;
77 class vtkTriangle;
78 class vtkQuad;
79 class vtkPolygon;
80 class vtkTriangleStrip;
81 class vtkEmptyCell;
82 struct vtkPolyDataDummyContainter;
84 
85 class VTKCOMMONDATAMODEL_EXPORT vtkPolyData : public vtkPointSet
86 {
87 public:
88  static vtkPolyData* New();
89  static vtkPolyData* ExtendedNew();
90 
91  vtkTypeMacro(vtkPolyData, vtkPointSet);
92  void PrintSelf(ostream& os, vtkIndent indent) override;
93 
97  int GetDataObjectType() override { return VTK_POLY_DATA; }
98 
102  void CopyStructure(vtkDataSet* ds) override;
103 
105 
108  vtkIdType GetNumberOfCells() override;
109  using vtkDataSet::GetCell;
110  vtkCell* GetCell(vtkIdType cellId) override;
111  void GetCell(vtkIdType cellId, vtkGenericCell* cell) override;
112  int GetCellType(vtkIdType cellId) override;
113  void GetCellBounds(vtkIdType cellId, double bounds[6]) override;
114  void GetCellNeighbors(vtkIdType cellId, vtkIdList* ptIds, vtkIdList* cellIds) override;
116 
124  void CopyCells(vtkPolyData* pd, vtkIdList* idList, vtkIncrementalPointLocator* locator = nullptr);
125 
129  void GetCellPoints(vtkIdType cellId, vtkIdList* ptIds) override;
130 
135  void GetPointCells(vtkIdType ptId, vtkIdList* cellIds) override;
136 
142  void ComputeBounds() override;
143 
150  void Squeeze() override;
151 
155  int GetMaxCellSize() override;
156 
160  void SetVerts(vtkCellArray* v);
161 
166  vtkCellArray* GetVerts();
167 
171  void SetLines(vtkCellArray* l);
172 
177  vtkCellArray* GetLines();
178 
182  void SetPolys(vtkCellArray* p);
183 
188  vtkCellArray* GetPolys();
189 
193  void SetStrips(vtkCellArray* s);
194 
200  vtkCellArray* GetStrips();
201 
203 
206  vtkIdType GetNumberOfVerts() { return (this->Verts ? this->Verts->GetNumberOfCells() : 0); }
207  vtkIdType GetNumberOfLines() { return (this->Lines ? this->Lines->GetNumberOfCells() : 0); }
208  vtkIdType GetNumberOfPolys() { return (this->Polys ? this->Polys->GetNumberOfCells() : 0); }
209  vtkIdType GetNumberOfStrips() { return (this->Strips ? this->Strips->GetNumberOfCells() : 0); }
211 
221  bool AllocateEstimate(vtkIdType numCells, vtkIdType maxCellSize);
222 
232  bool AllocateEstimate(vtkIdType numVerts, vtkIdType maxVertSize, vtkIdType numLines,
233  vtkIdType maxLineSize, vtkIdType numPolys, vtkIdType maxPolySize, vtkIdType numStrips,
234  vtkIdType maxStripSize);
235 
245  bool AllocateExact(vtkIdType numCells, vtkIdType connectivitySize);
246 
257  bool AllocateExact(vtkIdType numVerts, vtkIdType vertConnSize, vtkIdType numLines,
258  vtkIdType lineConnSize, vtkIdType numPolys, vtkIdType polyConnSize, vtkIdType numStrips,
259  vtkIdType stripConnSize);
260 
269  bool AllocateCopy(vtkPolyData* pd);
270 
280  bool AllocateProportional(vtkPolyData* pd, double ratio);
281 
288  void Allocate(vtkIdType numCells = 1000, int vtkNotUsed(extSize) = 1000)
289  {
290  this->AllocateExact(numCells, numCells);
291  }
292 
303  void Allocate(vtkPolyData* inPolyData, vtkIdType numCells = 1000, int vtkNotUsed(extSize) = 1000)
304  {
305  this->AllocateProportional(
306  inPolyData, static_cast<double>(numCells) / inPolyData->GetNumberOfCells());
307  }
308 
316  vtkIdType InsertNextCell(int type, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
317 
325  vtkIdType InsertNextCell(int type, vtkIdList* pts);
326 
331  void Reset();
332 
340  void BuildCells();
341 
345  bool NeedToBuildCells() { return this->Cells == nullptr; }
346 
353  void BuildLinks(int initialSize = 0);
354 
360  void DeleteCells();
361 
365  void DeleteLinks();
366 
368 
372  void GetPointCells(vtkIdType ptId, vtkIdType& ncells, vtkIdType*& cells)
373  VTK_SIZEHINT(cells, ncells);
374  VTK_DEPRECATED_IN_9_0_0("Use vtkPolyData::GetPointCells::vtkIdType, vtkIdType&, vtkIdType*&)")
375  void GetPointCells(vtkIdType ptId, unsigned short& ncells, vtkIdType*& cells)
376  VTK_SIZEHINT(cells, ncells);
378 
384  void GetCellEdgeNeighbors(vtkIdType cellId, vtkIdType p1, vtkIdType p2, vtkIdList* cellIds);
385 
395  unsigned char GetCellPoints(vtkIdType cellId, vtkIdType& npts, vtkIdType const*& pts)
396  VTK_SIZEHINT(pts, npts);
397 
402  int IsTriangle(int v1, int v2, int v3);
403 
411  int IsEdge(vtkIdType p1, vtkIdType p2);
412 
417  int IsPointUsedByCell(vtkIdType ptId, vtkIdType cellId);
418 
427  void ReplaceCell(vtkIdType cellId, vtkIdList* ids);
428  void ReplaceCell(vtkIdType cellId, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
435  void ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId, vtkIdType newPtId);
436 
441  void ReverseCell(vtkIdType cellId);
442 
444 
448  void DeletePoint(vtkIdType ptId);
449  void DeleteCell(vtkIdType cellId);
451 
460  void RemoveDeletedCells();
461 
463 
471  vtkIdType InsertNextLinkedPoint(int numLinks);
472  vtkIdType InsertNextLinkedPoint(double x[3], int numLinks);
474 
481  vtkIdType InsertNextLinkedCell(int type, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
482 
492  void ReplaceLinkedCell(vtkIdType cellId, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
493 
501  void RemoveCellReference(vtkIdType cellId);
502 
510  void AddCellReference(vtkIdType cellId);
511 
519  void RemoveReferenceToCell(vtkIdType ptId, vtkIdType cellId);
520 
528  void AddReferenceToCell(vtkIdType ptId, vtkIdType cellId);
529 
535  void ResizeCellList(vtkIdType ptId, int size);
536 
540  void Initialize() override;
541 
543 
546  virtual int GetPiece();
547  virtual int GetNumberOfPieces();
549 
553  virtual int GetGhostLevel();
554 
563  unsigned long GetActualMemorySize() override;
564 
566 
569  void ShallowCopy(vtkDataObject* src) override;
570  void DeepCopy(vtkDataObject* src) override;
572 
578  void RemoveGhostCells();
579 
581 
585  static vtkPolyData* GetData(vtkInformationVector* v, int i = 0);
587 
606  enum
607  {
608  ERR_NO_SUCH_FIELD = -4,
609  ERR_INCORRECT_FIELD = -3,
610  ERR_NON_MANIFOLD_STAR = -2,
611  REGULAR_POINT = -1,
612  MINIMUM = 0,
613  SADDLE = 1,
614  MAXIMUM = 2
615  };
616 
617  int GetScalarFieldCriticalIndex(vtkIdType pointId, vtkDataArray* scalarField);
618  int GetScalarFieldCriticalIndex(vtkIdType pointId, int fieldId);
619  int GetScalarFieldCriticalIndex(vtkIdType pointId, const char* fieldName);
620 
628  virtual vtkMTimeType GetMeshMTime();
629 
633  vtkMTimeType GetMTime() override;
634 
644  unsigned char GetCell(vtkIdType cellId, const vtkIdType*& pts);
645 
646 protected:
647  vtkPolyData();
648  ~vtkPolyData() override;
649 
652 
653  vtkCellArray* GetCellArrayInternal(TaggedCellId tag);
654 
655  // constant cell objects returned by GetCell called.
665 
666  // points inherited
667  // point data (i.e., scalars, vectors, normals, tcoords) inherited
672 
673  // supporting structures for more complex topological operations
674  // built only when necessary
677 
679 
680  // dummy static member below used as a trick to simplify traversal
681  static vtkPolyDataDummyContainter DummyContainer;
682 
683 private:
684  // Hide these from the user and the compiler.
685 
689  void GetCellNeighbors(vtkIdType cellId, vtkIdList& ptIds, vtkIdList& cellIds)
690  {
691  this->GetCellNeighbors(cellId, &ptIds, &cellIds);
692  }
693 
694  void Cleanup();
695 
696 private:
697  vtkPolyData(const vtkPolyData&) = delete;
698  void operator=(const vtkPolyData&) = delete;
699 };
700 
701 //------------------------------------------------------------------------------
702 inline void vtkPolyData::GetPointCells(vtkIdType ptId, vtkIdType& ncells, vtkIdType*& cells)
703 {
704  ncells = this->Links->GetNcells(ptId);
705  cells = this->Links->GetCells(ptId);
706 }
707 
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 
715 //------------------------------------------------------------------------------
717 {
718  return (this->GetNumberOfVerts() + this->GetNumberOfLines() + this->GetNumberOfPolys() +
719  this->GetNumberOfStrips());
720 }
721 
722 //------------------------------------------------------------------------------
724 {
725  if (!this->Cells)
726  {
727  this->BuildCells();
728  }
729  return static_cast<int>(this->Cells->GetTag(cellId).GetCellType());
730 }
731 
732 //------------------------------------------------------------------------------
733 inline int vtkPolyData::IsTriangle(int v1, int v2, int v3)
734 {
735  vtkIdType n1;
736  int i, j, tVerts[3];
737  vtkIdType* cells;
738  const vtkIdType* tVerts2;
739  vtkIdType n2;
740 
741  tVerts[0] = v1;
742  tVerts[1] = v2;
743  tVerts[2] = v3;
744 
745  for (i = 0; i < 3; i++)
746  {
747  this->GetPointCells(tVerts[i], n1, cells);
748  for (j = 0; j < n1; j++)
749  {
750  this->GetCellPoints(cells[j], n2, tVerts2);
751  if ((tVerts[0] == tVerts2[0] || tVerts[0] == tVerts2[1] || tVerts[0] == tVerts2[2]) &&
752  (tVerts[1] == tVerts2[0] || tVerts[1] == tVerts2[1] || tVerts[1] == tVerts2[2]) &&
753  (tVerts[2] == tVerts2[0] || tVerts[2] == tVerts2[1] || tVerts[2] == tVerts2[2]))
754  {
755  return 1;
756  }
757  }
758  }
759  return 0;
760 }
761 
762 //------------------------------------------------------------------------------
764 {
765  vtkIdType npts;
766  const vtkIdType* pts;
767 
768  this->GetCellPoints(cellId, npts, pts);
769  for (vtkIdType i = 0; i < npts; i++)
770  {
771  if (pts[i] == ptId)
772  {
773  return 1;
774  }
775  }
776 
777  return 0;
778 }
779 
780 //------------------------------------------------------------------------------
782 {
783  this->Links->DeletePoint(ptId);
784 }
785 
786 //------------------------------------------------------------------------------
788 {
789  this->Cells->GetTag(cellId).MarkDeleted();
790 }
791 
792 //------------------------------------------------------------------------------
794 {
795  const vtkIdType* pts;
796  vtkIdType npts;
797 
798  this->GetCellPoints(cellId, npts, pts);
799  for (vtkIdType i = 0; i < npts; i++)
800  {
801  this->Links->RemoveCellReference(cellId, pts[i]);
802  }
803 }
804 
805 //------------------------------------------------------------------------------
807 {
808  const vtkIdType* pts;
809  vtkIdType npts;
810 
811  this->GetCellPoints(cellId, npts, pts);
812  for (vtkIdType i = 0; i < npts; i++)
813  {
814  this->Links->AddCellReference(cellId, pts[i]);
815  }
816 }
817 
818 //------------------------------------------------------------------------------
820 {
821  this->Links->ResizeCellList(ptId, size);
822 }
823 
824 //------------------------------------------------------------------------------
826 {
827  switch (tag.GetTarget())
828  {
830  return this->Verts;
832  return this->Lines;
834  return this->Polys;
836  return this->Strips;
837  }
838  return nullptr; // unreachable
839 }
840 
841 //------------------------------------------------------------------------------
842 inline void vtkPolyData::ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId, vtkIdType newPtId)
843 {
844  vtkNew<vtkIdList> ids;
845  this->GetCellPoints(cellId, ids);
846  for (vtkIdType i = 0; i < ids->GetNumberOfIds(); i++)
847  {
848  if (ids->GetId(i) == oldPtId)
849  {
850  ids->SetId(i, newPtId);
851  break;
852  }
853  }
854  this->ReplaceCell(cellId, static_cast<int>(ids->GetNumberOfIds()), ids->GetPointer(0));
855 }
856 
857 //------------------------------------------------------------------------------
858 inline unsigned char vtkPolyData::GetCellPoints(
859  vtkIdType cellId, vtkIdType& npts, vtkIdType const*& pts)
860 {
861  if (!this->Cells)
862  {
863  this->BuildCells();
864  }
865 
866  const TaggedCellId tag = this->Cells->GetTag(cellId);
867  if (tag.IsDeleted())
868  {
869  npts = 0;
870  pts = nullptr;
871  return VTK_EMPTY_CELL;
872  }
873 
875  cells->GetCellAtId(tag.GetCellId(), npts, pts);
876  return tag.GetCellType();
877 }
878 
879 #endif
vtkPolyData::Strips
vtkSmartPointer< vtkCellArray > Strips
Definition: vtkPolyData.h:671
vtkPolyData::Polygon
vtkSmartPointer< vtkPolygon > Polygon
Definition: vtkPolyData.h:662
vtkPolyData::Verts
vtkSmartPointer< vtkCellArray > Verts
Definition: vtkPolyData.h:668
vtkPolyData::GetCellType
int GetCellType(vtkIdType cellId) override
Get type of cell with cellId such that: 0 <= cellId < NumberOfCells.
Definition: vtkPolyData.h:723
vtkPolyData::GetCellArrayInternal
vtkCellArray * GetCellArrayInternal(TaggedCellId tag)
Definition: vtkPolyData.h:825
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:842
vtkPolyData::Vertex
vtkSmartPointer< vtkVertex > Vertex
Definition: vtkPolyData.h:656
vtkPolyData::ncells
unsigned short & ncells
Definition: vtkPolyData.h:375
vtkPointSet.h
vtkIossUtilities::GetData
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.
vtkX3D::type
Definition: vtkX3D.h:522
vtkIdType
int vtkIdType
Definition: vtkType.h:330
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:664
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:659
vtkPolyData::GetNumberOfPolys
vtkIdType GetNumberOfPolys()
Definition: vtkPolyData.h:208
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:793
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:49
vtkVertex
a cell that represents a 3D point
Definition: vtkVertex.h:30
vtkPolyData::NeedToBuildCells
bool NeedToBuildCells()
Check if BuildCells is needed.
Definition: vtkPolyData.h:345
vtkPolyData_detail::TaggedCellId::GetCellId
vtkIdType GetCellId() const noexcept
Definition: vtkPolyDataInternals.h:177
vtkPolyData::Links
vtkSmartPointer< vtkCellLinks > Links
Definition: vtkPolyData.h:676
vtkPolyData_detail::Target::Polys
vtkLine
cell represents a 1D line
Definition: vtkLine.h:29
vtkPolyData::PolyVertex
vtkSmartPointer< vtkPolyVertex > PolyVertex
Definition: vtkPolyData.h:657
vtkPolyData::GetNumberOfVerts
vtkIdType GetNumberOfVerts()
Return the number of primitives of a particular type held.
Definition: vtkPolyData.h:206
vtkPolyData::DeletePoint
void DeletePoint(vtkIdType ptId)
Mark a point/cell as deleted from this vtkPolyData.
Definition: vtkPolyData.h:781
vtkPolyData::Triangle
vtkSmartPointer< vtkTriangle > Triangle
Definition: vtkPolyData.h:660
vtkPolyData_detail::Target::Lines
vtkPolyData::GetDataObjectType
int GetDataObjectType() override
Return what type of dataset this is.
Definition: vtkPolyData.h:97
vtkPolyData::AddCellReference
void AddCellReference(vtkIdType cellId)
Add references to cell in cell structure.
Definition: vtkPolyData.h:806
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:171
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:191
vtkPolyData::Polys
vtkSmartPointer< vtkCellArray > Polys
Definition: vtkPolyData.h:670
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:57
vtkPolyData::Cells
vtkSmartPointer< CellMap > Cells
Definition: vtkPolyData.h:675
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:174
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:180
vtkPolyData::IsTriangle
int IsTriangle(int v1, int v2, int v3)
Given three vertices, determine whether it's a triangle.
Definition: vtkPolyData.h:733
VTK_DEPRECATED_IN_9_0_0
#define VTK_DEPRECATED_IN_9_0_0(reason)
Definition: vtkDeprecation.h:85
vtkPolyData::Quad
vtkSmartPointer< vtkQuad > Quad
Definition: vtkPolyData.h:661
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:669
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:30
vtkPolyData::cells
unsigned short vtkIdType *& cells
Definition: vtkPolyData.h:375
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:716
vtkPolyData::Line
vtkSmartPointer< vtkLine > Line
Definition: vtkPolyData.h:658
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
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:763
vtkPolyData::BuildCells
void BuildCells()
Create data structure that allows random access of cells.
vtkDeprecation.h
vtkPolyData::ResizeCellList
void ResizeCellList(vtkIdType ptId, int size)
Resize the list of cells using a particular point.
Definition: vtkPolyData.h:819
vtkPolyData::GetNumberOfLines
vtkIdType GetNumberOfLines()
Definition: vtkPolyData.h:207
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:288
vtkPolyData::LegacyBuffer
vtkNew< vtkIdList > LegacyBuffer
Definition: vtkPolyData.h:678
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
vtkPolyData::DummyContainer
static vtkPolyDataDummyContainter DummyContainer
Definition: vtkPolyData.h:681
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:209
vtkPolyData_detail::CellMap
Definition: vtkPolyDataInternals.h:206
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:303
vtkPolyData_detail::TaggedCellId
Definition: vtkPolyDataInternals.h:145
vtkPolyData::TriangleStrip
vtkSmartPointer< vtkTriangleStrip > TriangleStrip
Definition: vtkPolyData.h:663
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.
vtkPolyData::DeleteCell
void DeleteCell(vtkIdType cellId)
Definition: vtkPolyData.h:787
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:77
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:285
vtkPolyVertex
cell represents a set of 0D vertices
Definition: vtkPolyVertex.h:32