VTK  9.0.20210622
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();
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 
156 
162  void GetCellsBounds(double bounds[6]);
163 
170  void Squeeze() override;
171 
175  int GetMaxCellSize() override;
176 
181 
187 
192 
198 
203 
209 
214 
221 
223 
226  vtkIdType GetNumberOfVerts() { return (this->Verts ? this->Verts->GetNumberOfCells() : 0); }
227  vtkIdType GetNumberOfLines() { return (this->Lines ? this->Lines->GetNumberOfCells() : 0); }
228  vtkIdType GetNumberOfPolys() { return (this->Polys ? this->Polys->GetNumberOfCells() : 0); }
229  vtkIdType GetNumberOfStrips() { return (this->Strips ? this->Strips->GetNumberOfCells() : 0); }
231 
241  bool AllocateEstimate(vtkIdType numCells, vtkIdType maxCellSize);
242 
252  bool AllocateEstimate(vtkIdType numVerts, vtkIdType maxVertSize, vtkIdType numLines,
253  vtkIdType maxLineSize, vtkIdType numPolys, vtkIdType maxPolySize, vtkIdType numStrips,
254  vtkIdType maxStripSize);
255 
265  bool AllocateExact(vtkIdType numCells, vtkIdType connectivitySize);
266 
277  bool AllocateExact(vtkIdType numVerts, vtkIdType vertConnSize, vtkIdType numLines,
278  vtkIdType lineConnSize, vtkIdType numPolys, vtkIdType polyConnSize, vtkIdType numStrips,
279  vtkIdType stripConnSize);
280 
290 
300  bool AllocateProportional(vtkPolyData* pd, double ratio);
301 
308  void Allocate(vtkIdType numCells = 1000, int vtkNotUsed(extSize) = 1000)
309  {
310  this->AllocateExact(numCells, numCells);
311  }
312 
323  void Allocate(vtkPolyData* inPolyData, vtkIdType numCells = 1000, int vtkNotUsed(extSize) = 1000)
324  {
325  this->AllocateProportional(
326  inPolyData, static_cast<double>(numCells) / inPolyData->GetNumberOfCells());
327  }
328 
336  vtkIdType InsertNextCell(int type, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
337 
346 
351  void Reset();
352 
360  void BuildCells();
361 
365  bool NeedToBuildCells() { return this->Cells == nullptr; }
366 
373  void BuildLinks(int initialSize = 0);
374 
380  void DeleteCells();
381 
385  void DeleteLinks();
386 
388 
392  void GetPointCells(vtkIdType ptId, vtkIdType& ncells, vtkIdType*& cells)
393  VTK_SIZEHINT(cells, ncells);
394  VTK_DEPRECATED_IN_9_0_0("Use vtkPolyData::GetPointCells::vtkIdType, vtkIdType&, vtkIdType*&)")
395  void GetPointCells(vtkIdType ptId, unsigned short& ncells, vtkIdType*& cells)
396  VTK_SIZEHINT(cells, ncells);
398 
404  void GetCellEdgeNeighbors(vtkIdType cellId, vtkIdType p1, vtkIdType p2, vtkIdList* cellIds);
405 
415  unsigned char GetCellPoints(vtkIdType cellId, vtkIdType& npts, vtkIdType const*& pts)
416  VTK_SIZEHINT(pts, npts);
417 
422  int IsTriangle(int v1, int v2, int v3);
423 
431  int IsEdge(vtkIdType p1, vtkIdType p2);
432 
437  int IsPointUsedByCell(vtkIdType ptId, vtkIdType cellId);
438 
447  void ReplaceCell(vtkIdType cellId, vtkIdList* ids);
448  void ReplaceCell(vtkIdType cellId, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
455  void ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId, vtkIdType newPtId);
456 
461  void ReverseCell(vtkIdType cellId);
462 
464 
468  void DeletePoint(vtkIdType ptId);
469  void DeleteCell(vtkIdType cellId);
471 
480  void RemoveDeletedCells();
481 
483 
491  vtkIdType InsertNextLinkedPoint(int numLinks);
492  vtkIdType InsertNextLinkedPoint(double x[3], int numLinks);
494 
501  vtkIdType InsertNextLinkedCell(int type, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
502 
512  void ReplaceLinkedCell(vtkIdType cellId, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
513 
521  void RemoveCellReference(vtkIdType cellId);
522 
530  void AddCellReference(vtkIdType cellId);
531 
539  void RemoveReferenceToCell(vtkIdType ptId, vtkIdType cellId);
540 
548  void AddReferenceToCell(vtkIdType ptId, vtkIdType cellId);
549 
555  void ResizeCellList(vtkIdType ptId, int size);
556 
560  void Initialize() override;
561 
563 
566  virtual int GetPiece();
567  virtual int GetNumberOfPieces();
569 
573  virtual int GetGhostLevel();
574 
583  unsigned long GetActualMemorySize() override;
584 
586 
589  void ShallowCopy(vtkDataObject* src) override;
590  void DeepCopy(vtkDataObject* src) override;
592 
599  void RemoveGhostCells();
600 
602 
606  static vtkPolyData* GetData(vtkInformationVector* v, int i = 0);
608 
627  enum
628  {
629  ERR_NO_SUCH_FIELD = -4,
630  ERR_INCORRECT_FIELD = -3,
631  ERR_NON_MANIFOLD_STAR = -2,
632  REGULAR_POINT = -1,
633  MINIMUM = 0,
634  SADDLE = 1,
635  MAXIMUM = 2
636  };
637 
639  int GetScalarFieldCriticalIndex(vtkIdType pointId, int fieldId);
640  int GetScalarFieldCriticalIndex(vtkIdType pointId, const char* fieldName);
641 
650 
654  vtkMTimeType GetMTime() override;
655 
665  unsigned char GetCell(vtkIdType cellId, const vtkIdType*& pts);
666 
667 protected:
669  ~vtkPolyData() override;
670 
673 
674  vtkCellArray* GetCellArrayInternal(TaggedCellId tag);
675 
676  // constant cell objects returned by GetCell called.
686 
687  // points inherited
688  // point data (i.e., scalars, vectors, normals, tcoords) inherited
693 
694  // supporting structures for more complex topological operations
695  // built only when necessary
698 
700 
701  // dummy static member below used as a trick to simplify traversal
702  static vtkPolyDataDummyContainter DummyContainer;
703 
704  // Take into account only points that belong to at least one cell.
705  double CellsBounds[6];
706 
708 
709 private:
710  // Hide these from the user and the compiler.
711 
715  void GetCellNeighbors(vtkIdType cellId, vtkIdList& ptIds, vtkIdList& cellIds)
716  {
717  this->GetCellNeighbors(cellId, &ptIds, &cellIds);
718  }
719 
720  void Cleanup();
721 
722 private:
723  vtkPolyData(const vtkPolyData&) = delete;
724  void operator=(const vtkPolyData&) = delete;
725 };
726 
727 //------------------------------------------------------------------------------
728 inline void vtkPolyData::GetPointCells(vtkIdType ptId, vtkIdType& ncells, vtkIdType*& cells)
729 {
730  ncells = this->Links->GetNcells(ptId);
731  cells = this->Links->GetCells(ptId);
732 }
733 
734 inline void vtkPolyData::GetPointCells(vtkIdType ptId, unsigned short& ncells, vtkIdType*& cells)
735 {
736  VTK_LEGACY_BODY(vtkPolyData::GetPointCells, "VTK 9.0");
737  ncells = static_cast<unsigned short>(this->Links->GetNcells(ptId));
738  cells = this->Links->GetCells(ptId);
739 }
740 
741 //------------------------------------------------------------------------------
743 {
744  return (this->GetNumberOfVerts() + this->GetNumberOfLines() + this->GetNumberOfPolys() +
745  this->GetNumberOfStrips());
746 }
747 
748 //------------------------------------------------------------------------------
750 {
751  if (!this->Cells)
752  {
753  this->BuildCells();
754  }
755  return static_cast<int>(this->Cells->GetTag(cellId).GetCellType());
756 }
757 
758 //------------------------------------------------------------------------------
759 inline int vtkPolyData::IsTriangle(int v1, int v2, int v3)
760 {
761  vtkIdType n1;
762  int i, j, tVerts[3];
763  vtkIdType* cells;
764  const vtkIdType* tVerts2;
765  vtkIdType n2;
766 
767  tVerts[0] = v1;
768  tVerts[1] = v2;
769  tVerts[2] = v3;
770 
771  for (i = 0; i < 3; i++)
772  {
773  this->GetPointCells(tVerts[i], n1, cells);
774  for (j = 0; j < n1; j++)
775  {
776  this->GetCellPoints(cells[j], n2, tVerts2);
777  if ((tVerts[0] == tVerts2[0] || tVerts[0] == tVerts2[1] || tVerts[0] == tVerts2[2]) &&
778  (tVerts[1] == tVerts2[0] || tVerts[1] == tVerts2[1] || tVerts[1] == tVerts2[2]) &&
779  (tVerts[2] == tVerts2[0] || tVerts[2] == tVerts2[1] || tVerts[2] == tVerts2[2]))
780  {
781  return 1;
782  }
783  }
784  }
785  return 0;
786 }
787 
788 //------------------------------------------------------------------------------
790 {
791  vtkIdType npts;
792  const vtkIdType* pts;
793 
794  this->GetCellPoints(cellId, npts, pts);
795  for (vtkIdType i = 0; i < npts; i++)
796  {
797  if (pts[i] == ptId)
798  {
799  return 1;
800  }
801  }
802 
803  return 0;
804 }
805 
806 //------------------------------------------------------------------------------
808 {
809  this->Links->DeletePoint(ptId);
810 }
811 
812 //------------------------------------------------------------------------------
814 {
815  this->Cells->GetTag(cellId).MarkDeleted();
816 }
817 
818 //------------------------------------------------------------------------------
820 {
821  const vtkIdType* pts;
822  vtkIdType npts;
823 
824  this->GetCellPoints(cellId, npts, pts);
825  for (vtkIdType i = 0; i < npts; i++)
826  {
827  this->Links->RemoveCellReference(cellId, pts[i]);
828  }
829 }
830 
831 //------------------------------------------------------------------------------
833 {
834  const vtkIdType* pts;
835  vtkIdType npts;
836 
837  this->GetCellPoints(cellId, npts, pts);
838  for (vtkIdType i = 0; i < npts; i++)
839  {
840  this->Links->AddCellReference(cellId, pts[i]);
841  }
842 }
843 
844 //------------------------------------------------------------------------------
846 {
847  this->Links->ResizeCellList(ptId, size);
848 }
849 
850 //------------------------------------------------------------------------------
852 {
853  switch (tag.GetTarget())
854  {
856  return this->Verts;
858  return this->Lines;
860  return this->Polys;
862  return this->Strips;
863  }
864  return nullptr; // unreachable
865 }
866 
867 //------------------------------------------------------------------------------
868 inline void vtkPolyData::ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId, vtkIdType newPtId)
869 {
870  vtkNew<vtkIdList> ids;
871  this->GetCellPoints(cellId, ids);
872  for (vtkIdType i = 0; i < ids->GetNumberOfIds(); i++)
873  {
874  if (ids->GetId(i) == oldPtId)
875  {
876  ids->SetId(i, newPtId);
877  break;
878  }
879  }
880  this->ReplaceCell(cellId, static_cast<int>(ids->GetNumberOfIds()), ids->GetPointer(0));
881 }
882 
883 //------------------------------------------------------------------------------
884 inline unsigned char vtkPolyData::GetCellPoints(
885  vtkIdType cellId, vtkIdType& npts, vtkIdType const*& pts)
886 {
887  if (!this->Cells)
888  {
889  this->BuildCells();
890  }
891 
892  const TaggedCellId tag = this->Cells->GetTag(cellId);
893  if (tag.IsDeleted())
894  {
895  npts = 0;
896  pts = nullptr;
897  return VTK_EMPTY_CELL;
898  }
899 
900  vtkCellArray* cells = this->GetCellArrayInternal(tag);
901  cells->GetCellAtId(tag.GetCellId(), npts, pts);
902  return tag.GetCellType();
903 }
904 
905 #endif
vtkPolyData::Strips
vtkSmartPointer< vtkCellArray > Strips
Definition: vtkPolyData.h:692
vtkPolyData::GetScalarFieldCriticalIndex
int GetScalarFieldCriticalIndex(vtkIdType pointId, const char *fieldName)
vtkPolyData::InsertNextCell
vtkIdType InsertNextCell(int type, int npts, const vtkIdType pts[])
Insert a cell of type VTK_VERTEX, VTK_POLY_VERTEX, VTK_LINE, VTK_POLY_LINE, VTK_TRIANGLE,...
vtkPolyData::SetStrips
void SetStrips(vtkCellArray *s)
Set the cell array defining triangle strips.
vtkPolyData::New
static vtkPolyData * New()
vtkPolyData::Polygon
vtkSmartPointer< vtkPolygon > Polygon
Definition: vtkPolyData.h:683
vtkPolyData::CellsBoundsTime
vtkTimeStamp CellsBoundsTime
Definition: vtkPolyData.h:707
vtkPolyData::Verts
vtkSmartPointer< vtkCellArray > Verts
Definition: vtkPolyData.h:689
vtkPolyData::GetCellType
int GetCellType(vtkIdType cellId) override
Standard vtkDataSet interface.
Definition: vtkPolyData.h:749
vtkPolyData::GetCellArrayInternal
vtkCellArray * GetCellArrayInternal(TaggedCellId tag)
Definition: vtkPolyData.h:851
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:868
vtkPolyData::AllocateProportional
bool AllocateProportional(vtkPolyData *pd, double ratio)
Preallocate memory for the internal cell arrays such that they are proportional to those in pd by a f...
vtkPolyData::Vertex
vtkSmartPointer< vtkVertex > Vertex
Definition: vtkPolyData.h:677
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
@ type
Definition: vtkX3D.h:522
vtkIdType
int vtkIdType
Definition: vtkType.h:332
vtkPolygon
a cell that represents an n-sided polygon
Definition: vtkPolygon.h:40
vtkPolyData::AllocateEstimate
bool AllocateEstimate(vtkIdType numVerts, vtkIdType maxVertSize, vtkIdType numLines, vtkIdType maxLineSize, vtkIdType numPolys, vtkIdType maxPolySize, vtkIdType numStrips, vtkIdType maxStripSize)
Preallocate memory for the internal cell arrays.
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:36
vtkPolyData_detail::Target::Verts
@ Verts
vtkPolyData::EmptyCell
vtkSmartPointer< vtkEmptyCell > EmptyCell
Definition: vtkPolyData.h:685
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:30
vtkPolyData_detail::Target::Strips
@ Strips
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:33
vtkPolyData::GetScalarFieldCriticalIndex
int GetScalarFieldCriticalIndex(vtkIdType pointId, vtkDataArray *scalarField)
vtkPolyData::SetPolys
void SetPolys(vtkCellArray *p)
Set the cell array defining polygons.
vtkCellArray.h
vtkPolyData::PolyLine
vtkSmartPointer< vtkPolyLine > PolyLine
Definition: vtkPolyData.h:680
vtkPolyData::GetNumberOfPolys
vtkIdType GetNumberOfPolys()
Return the number of primitives of a particular type held.
Definition: vtkPolyData.h:228
vtkPointSet::GetNumberOfCells
vtkIdType GetNumberOfCells() override
This method always returns 0, as there are no cells in a vtkPointSet.
Definition: vtkPointSet.h:126
vtkSmartPointer< vtkVertex >
vtkPolyData::SetLines
void SetLines(vtkCellArray *l)
Set the cell array defining lines.
vtkPolyData::RemoveCellReference
void RemoveCellReference(vtkIdType cellId)
Remove all references to cell in cell structure.
Definition: vtkPolyData.h:819
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:50
vtkPolyData::GetStrips
vtkCellArray * GetStrips()
Get the cell array defining triangle strips.
vtkVertex
a cell that represents a 3D point
Definition: vtkVertex.h:31
vtkPolyData::NeedToBuildCells
bool NeedToBuildCells()
Check if BuildCells is needed.
Definition: vtkPolyData.h:365
vtkPolyData::InsertNextCell
vtkIdType InsertNextCell(int type, vtkIdList *pts)
Insert a cell of type VTK_VERTEX, VTK_POLY_VERTEX, VTK_LINE, VTK_POLY_LINE, VTK_TRIANGLE,...
vtkPolyData_detail::TaggedCellId::GetCellId
vtkIdType GetCellId() const noexcept
Definition: vtkPolyDataInternals.h:177
vtkPolyData::Links
vtkSmartPointer< vtkCellLinks > Links
Definition: vtkPolyData.h:697
vtkPolyData::AllocateExact
bool AllocateExact(vtkIdType numVerts, vtkIdType vertConnSize, vtkIdType numLines, vtkIdType lineConnSize, vtkIdType numPolys, vtkIdType polyConnSize, vtkIdType numStrips, vtkIdType stripConnSize)
Preallocate memory for the internal cell arrays.
vtkPolyData_detail::Target::Polys
@ Polys
vtkPolyData::Squeeze
void Squeeze() override
Recover extra allocated memory when creating data whose initial size is unknown.
vtkLine
cell represents a 1D line
Definition: vtkLine.h:31
vtkPolyData::PolyVertex
vtkSmartPointer< vtkPolyVertex > PolyVertex
Definition: vtkPolyData.h:678
vtkCellArray::GetCellAtId
void GetCellAtId(vtkIdType cellId, vtkIdType &cellSize, vtkIdType const *&cellPoints)
Return the point ids for the cell at cellId.
Definition: vtkCellArray.h:1531
vtkPolyData::GetNumberOfVerts
vtkIdType GetNumberOfVerts()
Return the number of primitives of a particular type held.
Definition: vtkPolyData.h:226
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::Reset
void Reset()
Begin inserting data all over again.
vtkPolyData::DeletePoint
void DeletePoint(vtkIdType ptId)
Mark a point/cell as deleted from this vtkPolyData.
Definition: vtkPolyData.h:807
vtkPolyData::GetLines
vtkCellArray * GetLines()
Get the cell array defining lines.
vtkPolyData::CopyStructure
void CopyStructure(vtkDataSet *ds) override
Copy the geometric and topological structure of an input poly data object.
vtkPolyData::GetCellNeighbors
void GetCellNeighbors(vtkIdType cellId, vtkIdList *ptIds, vtkIdList *cellIds) override
Standard vtkDataSet interface.
vtkPolyData::Triangle
vtkSmartPointer< vtkTriangle > Triangle
Definition: vtkPolyData.h:681
vtkPolyData_detail::Target::Lines
@ Lines
vtkPolyData::AllocateExact
bool AllocateExact(vtkIdType numCells, vtkIdType connectivitySize)
Preallocate memory for the internal cell arrays.
vtkPolyData::GetCell
vtkCell * GetCell(vtkIdType cellId) override
Standard vtkDataSet interface.
vtkPolyData::GetScalarFieldCriticalIndex
int GetScalarFieldCriticalIndex(vtkIdType pointId, int fieldId)
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:832
vtkIdList::SetId
void SetId(const vtkIdType i, const vtkIdType vtkid)
Set the id at location i.
Definition: vtkIdList.h:89
vtkPolyData_detail::TaggedCellId::GetTarget
Target GetTarget() const noexcept
Definition: vtkPolyDataInternals.h:171
VTK_SIZEHINT
#define VTK_SIZEHINT(...)
Definition: vtkWrappingHints.h:48
vtkPolyLine
cell represents a set of 1D lines
Definition: vtkPolyLine.h:37
vtkPolyData::AllocateCopy
bool AllocateCopy(vtkPolyData *pd)
Preallocate memory for the internal cell arrays such that they are the same size as those in pd.
VTK_EMPTY_CELL
@ 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:691
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....
vtkPolyData::ComputeCellsBounds
void ComputeCellsBounds()
Compute the (X, Y, Z) bounds of the data.
vtkCell
abstract class to specify cell behavior
Definition: vtkCell.h:58
vtkPolyData::GetVerts
vtkCellArray * GetVerts()
Get the cell array defining vertices.
vtkPolyData::Cells
vtkSmartPointer< CellMap > Cells
Definition: vtkPolyData.h:696
vtkPolyData_detail::TaggedCellId::GetCellType
unsigned char GetCellType() const noexcept
Definition: vtkPolyDataInternals.h:174
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:181
vtkPolyData::IsTriangle
int IsTriangle(int v1, int v2, int v3)
Given three vertices, determine whether it's a triangle.
Definition: vtkPolyData.h:759
VTK_DEPRECATED_IN_9_0_0
#define VTK_DEPRECATED_IN_9_0_0(reason)
Definition: vtkDeprecation.h:126
vtkPolyData::Quad
vtkSmartPointer< vtkQuad > Quad
Definition: vtkPolyData.h:682
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:52
vtkPolyData::Lines
vtkSmartPointer< vtkCellArray > Lines
Definition: vtkPolyData.h:690
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:31
vtkX3D::size
@ size
Definition: vtkX3D.h:259
vtkNew< vtkIdList >
vtkPolyData::SetVerts
void SetVerts(vtkCellArray *v)
Set the cell array defining vertices.
vtkPolyData::~vtkPolyData
~vtkPolyData() override
vtkPolyData::GetCell
unsigned char GetCell(vtkIdType cellId, const vtkIdType *&pts)
Get a pointer to the cell, ie [npts pid1 .
vtkPolyData::ExtendedNew
static vtkPolyData * ExtendedNew()
vtkPolyData::GetNumberOfCells
vtkIdType GetNumberOfCells() override
Standard vtkDataSet interface.
Definition: vtkPolyData.h:742
vtkIdList::GetNumberOfIds
vtkIdType GetNumberOfIds() const noexcept
Return the number of id's in the list.
Definition: vtkIdList.h:57
vtkPolyData::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methdos for type information and printing.
vtkPolyData::GetCellsBounds
void GetCellsBounds(double bounds[6])
Get the cells bounds.
vtkPolyData::Line
vtkSmartPointer< vtkLine > Line
Definition: vtkPolyData.h:679
vtkTriangle
a cell that represents a triangle
Definition: vtkTriangle.h:36
vtkPolyData::GetMeshMTime
virtual vtkMTimeType GetMeshMTime()
Return the mesh (geometry/topology) modification time.
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:57
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:74
vtkPolyData::DeleteLinks
void DeleteLinks()
Release the upward links from point to cells that use each point.
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkPolyData::BuildLinks
void BuildLinks(int initialSize=0)
Create upward links from points to cells that use each point.
vtkPolyData::IsPointUsedByCell
int IsPointUsedByCell(vtkIdType ptId, vtkIdType cellId)
Determine whether a point is used by a particular cell.
Definition: vtkPolyData.h:789
vtkPolyData::BuildCells
void BuildCells()
Create data structure that allows random access of cells.
vtkPolyData::AllocateEstimate
bool AllocateEstimate(vtkIdType numCells, vtkIdType maxCellSize)
Preallocate memory for the internal cell arrays.
vtkDeprecation.h
vtkPolyData::ResizeCellList
void ResizeCellList(vtkIdType ptId, int size)
Resize the list of cells using a particular point.
Definition: vtkPolyData.h:845
vtkPolyData::GetCell
void GetCell(vtkIdType cellId, vtkGenericCell *cell) override
Standard vtkDataSet interface.
vtkPolyData::GetNumberOfLines
vtkIdType GetNumberOfLines()
Return the number of primitives of a particular type held.
Definition: vtkPolyData.h:227
vtkPolyData::GetMTime
vtkMTimeType GetMTime() override
Get MTime which also considers its cell array MTime.
vtkPointSet
concrete class for storing a set of points
Definition: vtkPointSet.h:67
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:308
vtkPolyData::LegacyBuffer
vtkNew< vtkIdList > LegacyBuffer
Definition: vtkPolyData.h:699
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
vtkPolyData::DummyContainer
static vtkPolyDataDummyContainter DummyContainer
Definition: vtkPolyData.h:702
vtkGenericCell
provides thread-safe access to cells
Definition: vtkGenericCell.h:37
vtkPolyData::GetPolys
vtkCellArray * GetPolys()
Get the cell array defining polygons.
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
This method resets parameter idList, as there is no cell in a vtkPointSet.
Definition: vtkPointSet.h:142
vtkPolyData::GetNumberOfStrips
vtkIdType GetNumberOfStrips()
Return the number of primitives of a particular type held.
Definition: vtkPolyData.h:229
vtkPolyData_detail::CellMap
Definition: vtkPolyDataInternals.h:207
vtkPolyData::GetCellBounds
void GetCellBounds(vtkIdType cellId, double bounds[6]) override
Standard vtkDataSet interface.
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:323
vtkPolyData_detail::TaggedCellId
Definition: vtkPolyDataInternals.h:146
vtkPolyData::DeleteCells
void DeleteCells()
Release data structure that allows random access of the cells.
vtkPolyData::GetMaxCellSize
int GetMaxCellSize() override
Return the maximum cell size in this poly data.
vtkPolyData::TriangleStrip
vtkSmartPointer< vtkTriangleStrip > TriangleStrip
Definition: vtkPolyData.h:684
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:60
vtkPolyData::DeleteCell
void DeleteCell(vtkIdType cellId)
Mark a point/cell as deleted from this vtkPolyData.
Definition: vtkPolyData.h:813
VTK_POLY_DATA
#define VTK_POLY_DATA
Definition: vtkType.h:77
vtkTriangleStrip
a cell that represents a triangle strip
Definition: vtkTriangleStrip.h:38
vtkPolyData::vtkPolyData
vtkPolyData()
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:36
vtkPolyData::CopyCells
void CopyCells(vtkPolyData *pd, vtkIdList *idList, vtkIncrementalPointLocator *locator=nullptr)
Copy cells listed in idList from pd, including points, point data, and cell data.
vtkDataSet::GetCell
virtual vtkCell * GetCell(vtkIdType cellId)=0
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
vtkPolyVertex
cell represents a set of 0D vertices
Definition: vtkPolyVertex.h:33