VTK  9.1.0
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
73class vtkVertex;
74class vtkPolyVertex;
75class vtkLine;
76class vtkPolyLine;
77class vtkTriangle;
78class vtkQuad;
79class vtkPolygon;
81class vtkEmptyCell;
82struct vtkPolyDataDummyContainter;
84
85class VTKCOMMONDATAMODEL_EXPORT vtkPolyData : public vtkPointSet
86{
87public:
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;
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
183
188
194
199
205
210
216
221
228
230
233 vtkIdType GetNumberOfVerts() { return (this->Verts ? this->Verts->GetNumberOfCells() : 0); }
234 vtkIdType GetNumberOfLines() { return (this->Lines ? this->Lines->GetNumberOfCells() : 0); }
235 vtkIdType GetNumberOfPolys() { return (this->Polys ? this->Polys->GetNumberOfCells() : 0); }
236 vtkIdType GetNumberOfStrips() { return (this->Strips ? this->Strips->GetNumberOfCells() : 0); }
238
248 bool AllocateEstimate(vtkIdType numCells, vtkIdType maxCellSize);
249
259 bool AllocateEstimate(vtkIdType numVerts, vtkIdType maxVertSize, vtkIdType numLines,
260 vtkIdType maxLineSize, vtkIdType numPolys, vtkIdType maxPolySize, vtkIdType numStrips,
261 vtkIdType maxStripSize);
262
272 bool AllocateExact(vtkIdType numCells, vtkIdType connectivitySize);
273
284 bool AllocateExact(vtkIdType numVerts, vtkIdType vertConnSize, vtkIdType numLines,
285 vtkIdType lineConnSize, vtkIdType numPolys, vtkIdType polyConnSize, vtkIdType numStrips,
286 vtkIdType stripConnSize);
287
297
307 bool AllocateProportional(vtkPolyData* pd, double ratio);
308
315 void Allocate(vtkIdType numCells = 1000, int vtkNotUsed(extSize) = 1000)
316 {
317 this->AllocateExact(numCells, numCells);
318 }
319
330 void Allocate(vtkPolyData* inPolyData, vtkIdType numCells = 1000, int vtkNotUsed(extSize) = 1000)
331 {
332 this->AllocateProportional(
333 inPolyData, static_cast<double>(numCells) / inPolyData->GetNumberOfCells());
334 }
335
343 vtkIdType InsertNextCell(int type, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
344
353
358 void Reset();
359
368
372 bool NeedToBuildCells() { return this->Cells == nullptr; }
373
380 void BuildLinks(int initialSize = 0);
381
388
393
395
399 void GetPointCells(vtkIdType ptId, vtkIdType& ncells, vtkIdType*& cells)
400 VTK_SIZEHINT(cells, ncells);
401 VTK_DEPRECATED_IN_9_0_0("Use vtkPolyData::GetPointCells::vtkIdType, vtkIdType&, vtkIdType*&)")
402 void GetPointCells(vtkIdType ptId, unsigned short& ncells, vtkIdType*& cells)
403 VTK_SIZEHINT(cells, ncells);
405
411 void GetCellEdgeNeighbors(vtkIdType cellId, vtkIdType p1, vtkIdType p2, vtkIdList* cellIds);
412
422 unsigned char GetCellPoints(vtkIdType cellId, vtkIdType& npts, vtkIdType const*& pts)
423 VTK_SIZEHINT(pts, npts);
424
429 int IsTriangle(int v1, int v2, int v3);
430
438 int IsEdge(vtkIdType p1, vtkIdType p2);
439
444 int IsPointUsedByCell(vtkIdType ptId, vtkIdType cellId);
445
454 void ReplaceCell(vtkIdType cellId, vtkIdList* ids);
455 void ReplaceCell(vtkIdType cellId, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
462 void ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId, vtkIdType newPtId);
463
468 void ReverseCell(vtkIdType cellId);
469
471
475 void DeletePoint(vtkIdType ptId);
476 void DeleteCell(vtkIdType cellId);
478
487 void RemoveDeletedCells();
488
490
498 vtkIdType InsertNextLinkedPoint(int numLinks);
499 vtkIdType InsertNextLinkedPoint(double x[3], int numLinks);
501
508 vtkIdType InsertNextLinkedCell(int type, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
509
519 void ReplaceLinkedCell(vtkIdType cellId, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
520
528 void RemoveCellReference(vtkIdType cellId);
529
537 void AddCellReference(vtkIdType cellId);
538
546 void RemoveReferenceToCell(vtkIdType ptId, vtkIdType cellId);
547
555 void AddReferenceToCell(vtkIdType ptId, vtkIdType cellId);
556
562 void ResizeCellList(vtkIdType ptId, int size);
563
567 void Initialize() override;
568
570
573 virtual int GetPiece();
574 virtual int GetNumberOfPieces();
576
580 virtual int GetGhostLevel();
581
590 unsigned long GetActualMemorySize() override;
591
593
596 void ShallowCopy(vtkDataObject* src) override;
597 void DeepCopy(vtkDataObject* src) override;
599
606 void RemoveGhostCells();
607
609
615
634 enum
635 {
636 ERR_NO_SUCH_FIELD = -4,
637 ERR_INCORRECT_FIELD = -3,
638 ERR_NON_MANIFOLD_STAR = -2,
639 REGULAR_POINT = -1,
640 MINIMUM = 0,
641 SADDLE = 1,
642 MAXIMUM = 2
643 };
644
646 int GetScalarFieldCriticalIndex(vtkIdType pointId, int fieldId);
647 int GetScalarFieldCriticalIndex(vtkIdType pointId, const char* fieldName);
648
657
662
672 unsigned char GetCell(vtkIdType cellId, const vtkIdType*& pts);
673
674protected:
676 ~vtkPolyData() override;
677
680
681 vtkCellArray* GetCellArrayInternal(TaggedCellId tag);
682
683 // constant cell objects returned by GetCell called.
693
694 // points inherited
695 // point data (i.e., scalars, vectors, normals, tcoords) inherited
700
701 // supporting structures for more complex topological operations
702 // built only when necessary
705
707
708 // dummy static member below used as a trick to simplify traversal
709 static vtkPolyDataDummyContainter DummyContainer;
710
711 // Take into account only points that belong to at least one cell.
712 double CellsBounds[6];
713
715
716private:
717 // Hide these from the user and the compiler.
718
722 void GetCellNeighbors(vtkIdType cellId, vtkIdList& ptIds, vtkIdList& cellIds)
723 {
724 this->GetCellNeighbors(cellId, &ptIds, &cellIds);
725 }
726
727 void Cleanup();
728
729private:
730 vtkPolyData(const vtkPolyData&) = delete;
731 void operator=(const vtkPolyData&) = delete;
732};
733
734//------------------------------------------------------------------------------
735inline void vtkPolyData::GetPointCells(vtkIdType ptId, vtkIdType& ncells, vtkIdType*& cells)
736{
737 ncells = this->Links->GetNcells(ptId);
738 cells = this->Links->GetCells(ptId);
739}
740
741inline void vtkPolyData::GetPointCells(vtkIdType ptId, unsigned short& ncells, vtkIdType*& cells)
742{
743 VTK_LEGACY_BODY(vtkPolyData::GetPointCells, "VTK 9.0");
744 ncells = static_cast<unsigned short>(this->Links->GetNcells(ptId));
745 cells = this->Links->GetCells(ptId);
746}
747
748//------------------------------------------------------------------------------
750{
751 return (this->GetNumberOfVerts() + this->GetNumberOfLines() + this->GetNumberOfPolys() +
752 this->GetNumberOfStrips());
753}
754
755//------------------------------------------------------------------------------
757{
758 if (!this->Cells)
759 {
760 this->BuildCells();
761 }
762 return static_cast<int>(this->Cells->GetTag(cellId).GetCellType());
763}
764
765//------------------------------------------------------------------------------
766inline int vtkPolyData::IsTriangle(int v1, int v2, int v3)
767{
768 vtkIdType n1;
769 int i, j, tVerts[3];
770 vtkIdType* cells;
771 const vtkIdType* tVerts2;
772 vtkIdType n2;
773
774 tVerts[0] = v1;
775 tVerts[1] = v2;
776 tVerts[2] = v3;
777
778 for (i = 0; i < 3; i++)
779 {
780 this->GetPointCells(tVerts[i], n1, cells);
781 for (j = 0; j < n1; j++)
782 {
783 this->GetCellPoints(cells[j], n2, tVerts2);
784 if ((tVerts[0] == tVerts2[0] || tVerts[0] == tVerts2[1] || tVerts[0] == tVerts2[2]) &&
785 (tVerts[1] == tVerts2[0] || tVerts[1] == tVerts2[1] || tVerts[1] == tVerts2[2]) &&
786 (tVerts[2] == tVerts2[0] || tVerts[2] == tVerts2[1] || tVerts[2] == tVerts2[2]))
787 {
788 return 1;
789 }
790 }
791 }
792 return 0;
793}
794
795//------------------------------------------------------------------------------
797{
798 vtkIdType npts;
799 const vtkIdType* pts;
800
801 this->GetCellPoints(cellId, npts, pts);
802 for (vtkIdType i = 0; i < npts; i++)
803 {
804 if (pts[i] == ptId)
805 {
806 return 1;
807 }
808 }
809
810 return 0;
811}
812
813//------------------------------------------------------------------------------
815{
816 this->Links->DeletePoint(ptId);
817}
818
819//------------------------------------------------------------------------------
821{
822 this->Cells->GetTag(cellId).MarkDeleted();
823}
824
825//------------------------------------------------------------------------------
827{
828 const vtkIdType* pts;
829 vtkIdType npts;
830
831 this->GetCellPoints(cellId, npts, pts);
832 for (vtkIdType i = 0; i < npts; i++)
833 {
834 this->Links->RemoveCellReference(cellId, pts[i]);
835 }
836}
837
838//------------------------------------------------------------------------------
840{
841 const vtkIdType* pts;
842 vtkIdType npts;
843
844 this->GetCellPoints(cellId, npts, pts);
845 for (vtkIdType i = 0; i < npts; i++)
846 {
847 this->Links->AddCellReference(cellId, pts[i]);
848 }
849}
850
851//------------------------------------------------------------------------------
853{
854 this->Links->ResizeCellList(ptId, size);
855}
856
857//------------------------------------------------------------------------------
859{
860 switch (tag.GetTarget())
861 {
863 return this->Verts;
865 return this->Lines;
867 return this->Polys;
869 return this->Strips;
870 }
871 return nullptr; // unreachable
872}
873
874//------------------------------------------------------------------------------
875inline void vtkPolyData::ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId, vtkIdType newPtId)
876{
878 this->GetCellPoints(cellId, ids);
879 for (vtkIdType i = 0; i < ids->GetNumberOfIds(); i++)
880 {
881 if (ids->GetId(i) == oldPtId)
882 {
883 ids->SetId(i, newPtId);
884 break;
885 }
886 }
887 this->ReplaceCell(cellId, static_cast<int>(ids->GetNumberOfIds()), ids->GetPointer(0));
888}
889
890//------------------------------------------------------------------------------
891inline unsigned char vtkPolyData::GetCellPoints(
892 vtkIdType cellId, vtkIdType& npts, vtkIdType const*& pts)
893{
894 if (!this->Cells)
895 {
896 this->BuildCells();
897 }
898
899 const TaggedCellId tag = this->Cells->GetTag(cellId);
900 if (tag.IsDeleted())
901 {
902 npts = 0;
903 pts = nullptr;
904 return VTK_EMPTY_CELL;
905 }
906
907 vtkCellArray* cells = this->GetCellArrayInternal(tag);
908 cells->GetCellAtId(tag.GetCellId(), npts, pts);
909 return tag.GetCellType();
910}
911
912#endif
object to represent cell connectivity
Definition: vtkCellArray.h:181
void GetCellAtId(vtkIdType cellId, vtkIdType &cellSize, vtkIdType const *&cellPoints)
Return the point ids for the cell at cellId.
abstract class to specify cell behavior
Definition: vtkCell.h:58
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:50
general representation of visualization data
Definition: vtkDataObject.h:60
abstract class to specify dataset behavior
Definition: vtkDataSet.h:57
virtual vtkCell * GetCell(vtkIdType cellId)=0
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
virtual void GetCellNeighbors(vtkIdType cellId, vtkIdList *ptIds, vtkIdList *cellIds)
Topological inquiry to get all cells using list of points exclusive of cell specified (e....
an empty cell used as a place-holder during processing
Definition: vtkEmptyCell.h:30
provides thread-safe access to cells
list of point or cell ids
Definition: vtkIdList.h:31
vtkIdType GetNumberOfIds() const noexcept
Return the number of id's in the list.
Definition: vtkIdList.h:57
void SetId(const vtkIdType i, const vtkIdType vtkid)
Set the id at location i.
Definition: vtkIdList.h:89
vtkIdType GetId(const vtkIdType i)
Return the id at location i.
Definition: vtkIdList.h:62
vtkIdType * GetPointer(const vtkIdType i)
Get a pointer to a particular data index.
Definition: vtkIdList.h:126
Abstract class in support of both point location and point insertion.
a simple class to control print indentation
Definition: vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
cell represents a 1D line
Definition: vtkLine.h:31
concrete class for storing a set of points
Definition: vtkPointSet.h:67
void GetPointCells(vtkIdType, vtkIdList *idList) override
This method resets parameter idList, as there is no cell in a vtkPointSet.
Definition: vtkPointSet.h:142
vtkIdType GetNumberOfCells() override
This method always returns 0, as there are no cells in a vtkPointSet.
Definition: vtkPointSet.h:126
int GetCellType(vtkIdType) override
This method always returns VTK_EMPTY_CELL, as there is no cell in a vtkPointSet.
Definition: vtkPointSet.h:154
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
vtkCellArray * GetStrips()
Get the cell array defining triangle strips.
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,...
vtkSmartPointer< vtkPolyVertex > PolyVertex
Definition: vtkPolyData.h:685
static vtkPolyData * ExtendedNew()
void GetCell(vtkIdType cellId, vtkGenericCell *cell) override
Standard vtkDataSet interface.
void Squeeze() override
Recover extra allocated memory when creating data whose initial size is unknown.
bool NeedToBuildCells()
Check if BuildCells is needed.
Definition: vtkPolyData.h:372
bool AllocateEstimate(vtkIdType numCells, vtkIdType maxCellSize)
Preallocate memory for the internal cell arrays.
int GetScalarFieldCriticalIndex(vtkIdType pointId, const char *fieldName)
vtkCell * GetCell(vtkIdType cellId) override
Standard vtkDataSet interface.
void SetPolys(vtkCellArray *p)
Set the cell array defining polygons.
vtkCellArray * GetCellArrayInternal(TaggedCellId tag)
Definition: vtkPolyData.h:858
vtkIdType GetCellIdRelativeToCellArray(vtkIdType cellId)
Maps the cell at position cellId inside the vtkPolyData to its location in the corresponding cell arr...
void GetCellsBounds(double bounds[6])
Get the cells bounds.
void RemoveCellReference(vtkIdType cellId)
Remove all references to cell in cell structure.
Definition: vtkPolyData.h:826
void ComputeCellsBounds()
Compute the (X, Y, Z) bounds of the data.
vtkIdType GetNumberOfLines()
Return the number of primitives of a particular type held.
Definition: vtkPolyData.h:234
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.
void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds) override
Copy a cells point ids into list provided.
int IsTriangle(int v1, int v2, int v3)
Given three vertices, determine whether it's a triangle.
Definition: vtkPolyData.h:766
void SetLines(vtkCellArray *l)
Set the cell array defining lines.
void SetVerts(vtkCellArray *v)
Set the cell array defining vertices.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methdos for type information and printing.
vtkSmartPointer< vtkCellLinks > Links
Definition: vtkPolyData.h:704
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.
void GetCellNeighbors(vtkIdType cellId, vtkIdList *ptIds, vtkIdList *cellIds) override
Standard vtkDataSet interface.
~vtkPolyData() override
int GetScalarFieldCriticalIndex(vtkIdType pointId, int fieldId)
void CopyStructure(vtkDataSet *ds) override
Copy the geometric and topological structure of an input poly data object.
vtkNew< vtkIdList > LegacyBuffer
Definition: vtkPolyData.h:706
int GetCellType(vtkIdType cellId) override
Standard vtkDataSet interface.
Definition: vtkPolyData.h:756
void GetCellBounds(vtkIdType cellId, double bounds[6]) override
Standard vtkDataSet interface.
void ReplaceCell(vtkIdType cellId, vtkIdList *ids)
Replace the points defining cell "cellId" with a new set of points.
vtkMTimeType GetMTime() override
Get MTime which also considers its cell array MTime.
vtkSmartPointer< vtkCellArray > Verts
Definition: vtkPolyData.h:696
vtkSmartPointer< vtkPolyLine > PolyLine
Definition: vtkPolyData.h:687
vtkIdType GetNumberOfStrips()
Return the number of primitives of a particular type held.
Definition: vtkPolyData.h:236
int GetScalarFieldCriticalIndex(vtkIdType pointId, vtkDataArray *scalarField)
bool AllocateCopy(vtkPolyData *pd)
Preallocate memory for the internal cell arrays such that they are the same size as those in pd.
vtkIdType InsertNextCell(int type, vtkIdList *pts)
Insert a cell of type VTK_VERTEX, VTK_POLY_VERTEX, VTK_LINE, VTK_POLY_LINE, VTK_TRIANGLE,...
vtkIdType GetNumberOfPolys()
Return the number of primitives of a particular type held.
Definition: vtkPolyData.h:235
vtkSmartPointer< vtkCellArray > Strips
Definition: vtkPolyData.h:699
vtkSmartPointer< vtkQuad > Quad
Definition: vtkPolyData.h:689
void DeleteCell(vtkIdType cellId)
Mark a point/cell as deleted from this vtkPolyData.
Definition: vtkPolyData.h:820
vtkSmartPointer< vtkPolygon > Polygon
Definition: vtkPolyData.h:690
int GetMaxCellSize() override
Return the maximum cell size in this poly data.
vtkSmartPointer< vtkLine > Line
Definition: vtkPolyData.h:686
void ResizeCellList(vtkIdType ptId, int size)
Resize the list of cells using a particular point.
Definition: vtkPolyData.h:852
vtkTimeStamp CellsBoundsTime
Definition: vtkPolyData.h:714
vtkIdType GetNumberOfCells() override
Standard vtkDataSet interface.
Definition: vtkPolyData.h:749
bool AllocateExact(vtkIdType numCells, vtkIdType connectivitySize)
Preallocate memory for the internal cell arrays.
unsigned char GetCell(vtkIdType cellId, const vtkIdType *&pts)
Get a pointer to the cell, ie [npts pid1 .
vtkCellArray * GetVerts()
Get the cell array defining vertices.
vtkSmartPointer< vtkCellArray > Polys
Definition: vtkPolyData.h:698
void Reset()
Begin inserting data all over again.
static vtkPolyData * New()
static vtkPolyDataDummyContainter DummyContainer
Definition: vtkPolyData.h:709
vtkCellArray * GetPolys()
Get the cell array defining polygons.
void AddCellReference(vtkIdType cellId)
Add references to cell in cell structure.
Definition: vtkPolyData.h:839
int GetDataObjectType() override
Return what type of dataset this is.
Definition: vtkPolyData.h:97
vtkSmartPointer< vtkCellArray > Lines
Definition: vtkPolyData.h:697
vtkSmartPointer< vtkEmptyCell > EmptyCell
Definition: vtkPolyData.h:692
vtkIdType GetNumberOfVerts()
Return the number of primitives of a particular type held.
Definition: vtkPolyData.h:233
void DeleteCells()
Release data structure that allows random access of the cells.
virtual vtkMTimeType GetMeshMTime()
Return the mesh (geometry/topology) modification time.
vtkSmartPointer< vtkVertex > Vertex
Definition: vtkPolyData.h:684
int IsPointUsedByCell(vtkIdType ptId, vtkIdType cellId)
Determine whether a point is used by a particular cell.
Definition: vtkPolyData.h:796
void ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId, vtkIdType newPtId)
Replace a point in the cell connectivity list with a different point.
Definition: vtkPolyData.h:875
vtkSmartPointer< CellMap > Cells
Definition: vtkPolyData.h:703
void GetPointCells(vtkIdType ptId, vtkIdList *cellIds) override
Efficient method to obtain cells using a particular point.
vtkSmartPointer< vtkTriangle > Triangle
Definition: vtkPolyData.h:688
void BuildCells()
Create data structure that allows random access of cells.
void DeletePoint(vtkIdType ptId)
Mark a point/cell as deleted from this vtkPolyData.
Definition: vtkPolyData.h:814
void CopyCells(vtkPolyData *pd, vtkIdList *idList, vtkIncrementalPointLocator *locator=nullptr)
Copy cells listed in idList from pd, including points, point data, and cell data.
vtkCellArray * GetLines()
Get the cell array defining lines.
void Allocate(vtkIdType numCells=1000, int vtkNotUsed(extSize)=1000)
Method allocates initial storage for vertex, line, polygon, and triangle strip arrays.
Definition: vtkPolyData.h:315
void BuildLinks(int initialSize=0)
Create upward links from points to cells that use each point.
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:330
void DeleteLinks()
Release the upward links from point to cells that use each point.
vtkSmartPointer< vtkTriangleStrip > TriangleStrip
Definition: vtkPolyData.h:691
void SetStrips(vtkCellArray *s)
Set the cell array defining triangle strips.
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...
cell represents a set of 1D lines
Definition: vtkPolyLine.h:37
cell represents a set of 0D vertices
Definition: vtkPolyVertex.h:33
a cell that represents an n-sided polygon
Definition: vtkPolygon.h:40
a cell that represents a 2D quadrilateral
Definition: vtkQuad.h:36
record modification and/or execution time
Definition: vtkTimeStamp.h:33
a cell that represents a triangle strip
a cell that represents a triangle
Definition: vtkTriangle.h:36
a cell that represents a 3D point
Definition: vtkVertex.h:31
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.
@ info
Definition: vtkX3D.h:382
@ type
Definition: vtkX3D.h:522
@ size
Definition: vtkX3D.h:259
unsigned char GetCellType() const noexcept
vtkIdType GetCellId() const noexcept
@ VTK_EMPTY_CELL
Definition: vtkCellType.h:46
#define VTK_DEPRECATED_IN_9_0_0(reason)
int vtkIdType
Definition: vtkType.h:332
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
#define VTK_POLY_DATA
Definition: vtkType.h:77
#define VTK_SIZEHINT(...)