VTK  9.0.20201031
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 
579  void RemoveGhostCells();
580 
582 
586  static vtkPolyData* GetData(vtkInformationVector* v, int i = 0);
588 
607  enum
608  {
609  ERR_NO_SUCH_FIELD = -4,
610  ERR_INCORRECT_FIELD = -3,
611  ERR_NON_MANIFOLD_STAR = -2,
612  REGULAR_POINT = -1,
613  MINIMUM = 0,
614  SADDLE = 1,
615  MAXIMUM = 2
616  };
617 
618  int GetScalarFieldCriticalIndex(vtkIdType pointId, vtkDataArray* scalarField);
619  int GetScalarFieldCriticalIndex(vtkIdType pointId, int fieldId);
620  int GetScalarFieldCriticalIndex(vtkIdType pointId, const char* fieldName);
621 
629  virtual vtkMTimeType GetMeshMTime();
630 
634  vtkMTimeType GetMTime() override;
635 
645  unsigned char GetCell(vtkIdType cellId, const vtkIdType*& pts);
646 
647 protected:
648  vtkPolyData();
649  ~vtkPolyData() override;
650 
653 
654  vtkCellArray* GetCellArrayInternal(TaggedCellId tag);
655 
656  // constant cell objects returned by GetCell called.
666 
667  // points inherited
668  // point data (i.e., scalars, vectors, normals, tcoords) inherited
673 
674  // supporting structures for more complex topological operations
675  // built only when necessary
678 
680 
681  // dummy static member below used as a trick to simplify traversal
682  static vtkPolyDataDummyContainter DummyContainer;
683 
684 private:
685  // Hide these from the user and the compiler.
686 
690  void GetCellNeighbors(vtkIdType cellId, vtkIdList& ptIds, vtkIdList& cellIds)
691  {
692  this->GetCellNeighbors(cellId, &ptIds, &cellIds);
693  }
694 
695  void Cleanup();
696 
697 private:
698  vtkPolyData(const vtkPolyData&) = delete;
699  void operator=(const vtkPolyData&) = delete;
700 };
701 
702 //------------------------------------------------------------------------------
703 inline void vtkPolyData::GetPointCells(vtkIdType ptId, vtkIdType& ncells, vtkIdType*& cells)
704 {
705  ncells = this->Links->GetNcells(ptId);
706  cells = this->Links->GetCells(ptId);
707 }
708 
709 inline void vtkPolyData::GetPointCells(vtkIdType ptId, unsigned short& ncells, vtkIdType*& cells)
710 {
711  VTK_LEGACY_BODY(vtkPolyData::GetPointCells, "VTK 9.0");
712  ncells = static_cast<unsigned short>(this->Links->GetNcells(ptId));
713  cells = this->Links->GetCells(ptId);
714 }
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 
876  cells->GetCellAtId(tag.GetCellId(), npts, pts);
877  return tag.GetCellType();
878 }
879 
880 #endif
vtkPolyData::Strips
vtkSmartPointer< vtkCellArray > Strips
Definition: vtkPolyData.h:672
vtkPolyData::Polygon
vtkSmartPointer< vtkPolygon > Polygon
Definition: vtkPolyData.h:663
vtkPolyData::Verts
vtkSmartPointer< vtkCellArray > Verts
Definition: vtkPolyData.h:669
vtkPolyData::GetCellType
int GetCellType(vtkIdType cellId) override
This method always returns VTK_EMPTY_CELL, as there is no cell in a vtkPointSet.
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:657
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:665
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:660
vtkPolyData::GetNumberOfPolys
vtkIdType GetNumberOfPolys()
Definition: vtkPolyData.h:208
vtkPointSet::GetNumberOfCells
vtkIdType GetNumberOfCells() override
This method always returns 0, as there are no cells in a vtkPointSet.
Definition: vtkPointSet.h:126
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::GetCellPoints
void GetCellPoints(vtkIdType, vtkIdList *idList) override
This method resets parameter idList, as there is no cell in a vtkPointSet.
Definition: vtkPointSet.h:141
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:677
vtkPolyData_detail::Target::Polys
vtkLine
cell represents a 1D line
Definition: vtkLine.h:29
vtkPolyData::PolyVertex
vtkSmartPointer< vtkPolyVertex > PolyVertex
Definition: vtkPolyData.h:658
vtkPolyData::GetNumberOfVerts
vtkIdType GetNumberOfVerts()
Return the number of primitives of a particular type held.
Definition: vtkPolyData.h:206
vtkPointSet::GetCellType
int GetCellType(vtkIdType) override
This method always returns VTK_EMPTY_CELL, as there is no cell in a vtkPointSet.
Definition: vtkPointSet.h:154
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:661
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:807
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:671
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:676
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:734
VTK_DEPRECATED_IN_9_0_0
#define VTK_DEPRECATED_IN_9_0_0(reason)
Definition: vtkDeprecation.h:83
vtkPolyData::Quad
vtkSmartPointer< vtkQuad > Quad
Definition: vtkPolyData.h:662
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
vtkPointSet::New
static vtkPointSet * New()
Standard instantiation method.
vtkPolyData::Lines
vtkSmartPointer< vtkCellArray > Lines
Definition: vtkPolyData.h:670
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:717
vtkPolyData::Line
vtkSmartPointer< vtkLine > Line
Definition: vtkPolyData.h:659
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
vtkX3D::info
Definition: vtkX3D.h:382
vtkPointSet::GetMaxCellSize
int GetMaxCellSize() override
Convenience method returns largest cell size in dataset.
Definition: vtkPointSet.h:127
vtkPointSet::ExtendedNew
static vtkPointSet * ExtendedNew()
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.
vtkDeprecation.h
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:207
vtkPointSet
concrete class for storing a set of points
Definition: vtkPointSet.h:66
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:679
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
vtkPolyData::DummyContainer
static vtkPolyDataDummyContainter DummyContainer
Definition: vtkPolyData.h:682
vtkPointSet::GetCell
vtkCell * GetCell(vtkIdType) override
This method always return a vtkEmptyCell, as there is no cell in a vtkPointSet.
Definition: vtkPointSet.h:135
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
vtkPointSet::GetPointCells
void GetPointCells(vtkIdType, vtkIdList *idList) override
Topological inquiry to get cells using point.
Definition: vtkPointSet.h:142
vtkPolyData::GetNumberOfStrips
vtkIdType GetNumberOfStrips()
Definition: vtkPolyData.h:209
vtkPolyData_detail::CellMap
Definition: vtkPolyDataInternals.h:206
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:664
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:59
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.
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.
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.
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