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