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=========================================================================*/
71#ifndef vtkPolyData_h
72#define vtkPolyData_h
73
74#include "vtkCommonDataModelModule.h" // For export macro
75#include "vtkDeprecation.h" // for VTK_DEPRECATED_IN_9_0_0
76#include "vtkPointSet.h"
77
78#include "vtkCellArray.h" // Needed for inline methods
79#include "vtkCellLinks.h" // Needed for inline methods
80#include "vtkPolyDataInternals.h" // Needed for inline methods
81
82class vtkVertex;
83class vtkPolyVertex;
84class vtkLine;
85class vtkPolyLine;
86class vtkTriangle;
87class vtkQuad;
88class vtkPolygon;
90class vtkEmptyCell;
91struct vtkPolyDataDummyContainter;
93
94class VTKCOMMONDATAMODEL_EXPORT vtkPolyData : public vtkPointSet
95{
96public:
97 static vtkPolyData* New();
99
100 vtkTypeMacro(vtkPolyData, vtkPointSet);
101 void PrintSelf(ostream& os, vtkIndent indent) override;
102
106 int GetDataObjectType() override { return VTK_POLY_DATA; }
107
111 void CopyStructure(vtkDataSet* ds) override;
112
114
117 vtkIdType GetNumberOfCells() override;
119 vtkCell* GetCell(vtkIdType cellId) override;
120 void GetCell(vtkIdType cellId, vtkGenericCell* cell) override;
121 int GetCellType(vtkIdType cellId) override;
122 void GetCellBounds(vtkIdType cellId, double bounds[6]) override;
123 void GetCellNeighbors(vtkIdType cellId, vtkIdList* ptIds, vtkIdList* cellIds) override;
125
133 void CopyCells(vtkPolyData* pd, vtkIdList* idList, vtkIncrementalPointLocator* locator = nullptr);
134
138 void GetCellPoints(vtkIdType cellId, vtkIdList* ptIds) override;
139
144 void GetPointCells(vtkIdType ptId, vtkIdList* cellIds) override;
145
165
171 void GetCellsBounds(double bounds[6]);
172
179 void Squeeze() override;
180
184 int GetMaxCellSize() override;
185
192
197
203
208
214
219
225
230
237
239
242 vtkIdType GetNumberOfVerts() { return (this->Verts ? this->Verts->GetNumberOfCells() : 0); }
243 vtkIdType GetNumberOfLines() { return (this->Lines ? this->Lines->GetNumberOfCells() : 0); }
244 vtkIdType GetNumberOfPolys() { return (this->Polys ? this->Polys->GetNumberOfCells() : 0); }
245 vtkIdType GetNumberOfStrips() { return (this->Strips ? this->Strips->GetNumberOfCells() : 0); }
247
257 bool AllocateEstimate(vtkIdType numCells, vtkIdType maxCellSize);
258
268 bool AllocateEstimate(vtkIdType numVerts, vtkIdType maxVertSize, vtkIdType numLines,
269 vtkIdType maxLineSize, vtkIdType numPolys, vtkIdType maxPolySize, vtkIdType numStrips,
270 vtkIdType maxStripSize);
271
281 bool AllocateExact(vtkIdType numCells, vtkIdType connectivitySize);
282
293 bool AllocateExact(vtkIdType numVerts, vtkIdType vertConnSize, vtkIdType numLines,
294 vtkIdType lineConnSize, vtkIdType numPolys, vtkIdType polyConnSize, vtkIdType numStrips,
295 vtkIdType stripConnSize);
296
306
316 bool AllocateProportional(vtkPolyData* pd, double ratio);
317
324 void Allocate(vtkIdType numCells = 1000, int vtkNotUsed(extSize) = 1000)
325 {
326 this->AllocateExact(numCells, numCells);
327 }
328
339 void Allocate(vtkPolyData* inPolyData, vtkIdType numCells = 1000, int vtkNotUsed(extSize) = 1000)
340 {
341 this->AllocateProportional(
342 inPolyData, static_cast<double>(numCells) / inPolyData->GetNumberOfCells());
343 }
344
352 vtkIdType InsertNextCell(int type, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
353
362
367 void Reset();
368
377
381 bool NeedToBuildCells() { return this->Cells == nullptr; }
382
389 void BuildLinks(int initialSize = 0);
390
397
402
404
408 void GetPointCells(vtkIdType ptId, vtkIdType& ncells, vtkIdType*& cells)
409 VTK_SIZEHINT(cells, ncells);
410 VTK_DEPRECATED_IN_9_0_0("Use vtkPolyData::GetPointCells::vtkIdType, vtkIdType&, vtkIdType*&)")
411 void GetPointCells(vtkIdType ptId, unsigned short& ncells, vtkIdType*& cells)
412 VTK_SIZEHINT(cells, ncells);
414
420 void GetCellEdgeNeighbors(vtkIdType cellId, vtkIdType p1, vtkIdType p2, vtkIdList* cellIds);
421
431 unsigned char GetCellPoints(vtkIdType cellId, vtkIdType& npts, vtkIdType const*& pts)
432 VTK_SIZEHINT(pts, npts);
433
438 int IsTriangle(int v1, int v2, int v3);
439
447 int IsEdge(vtkIdType p1, vtkIdType p2);
448
453 int IsPointUsedByCell(vtkIdType ptId, vtkIdType cellId);
454
463 void ReplaceCell(vtkIdType cellId, vtkIdList* ids);
464 void ReplaceCell(vtkIdType cellId, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
471 void ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId, vtkIdType newPtId);
472
477 void ReverseCell(vtkIdType cellId);
478
480
484 void DeletePoint(vtkIdType ptId);
485 void DeleteCell(vtkIdType cellId);
487
496 void RemoveDeletedCells();
497
499
507 vtkIdType InsertNextLinkedPoint(int numLinks);
508 vtkIdType InsertNextLinkedPoint(double x[3], int numLinks);
510
517 vtkIdType InsertNextLinkedCell(int type, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
518
528 void ReplaceLinkedCell(vtkIdType cellId, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
529
537 void RemoveCellReference(vtkIdType cellId);
538
546 void AddCellReference(vtkIdType cellId);
547
555 void RemoveReferenceToCell(vtkIdType ptId, vtkIdType cellId);
556
564 void AddReferenceToCell(vtkIdType ptId, vtkIdType cellId);
565
571 void ResizeCellList(vtkIdType ptId, int size);
572
576 void Initialize() override;
577
579
582 virtual int GetPiece();
583 virtual int GetNumberOfPieces();
585
589 virtual int GetGhostLevel();
590
599 unsigned long GetActualMemorySize() override;
600
602
605 void ShallowCopy(vtkDataObject* src) override;
606 void DeepCopy(vtkDataObject* src) override;
608
615 void RemoveGhostCells();
616
618
624
643 enum
644 {
645 ERR_NO_SUCH_FIELD = -4,
646 ERR_INCORRECT_FIELD = -3,
647 ERR_NON_MANIFOLD_STAR = -2,
648 REGULAR_POINT = -1,
649 MINIMUM = 0,
650 SADDLE = 1,
651 MAXIMUM = 2
652 };
653
655 int GetScalarFieldCriticalIndex(vtkIdType pointId, int fieldId);
656 int GetScalarFieldCriticalIndex(vtkIdType pointId, const char* fieldName);
657
666
671
681 unsigned char GetCell(vtkIdType cellId, const vtkIdType*& pts);
682
683protected:
685 ~vtkPolyData() override;
686
689
690 vtkCellArray* GetCellArrayInternal(TaggedCellId tag);
691
692 // constant cell objects returned by GetCell called.
702
703 // points inherited
704 // point data (i.e., scalars, vectors, normals, tcoords) inherited
709
710 // supporting structures for more complex topological operations
711 // built only when necessary
714
716
717 // dummy static member below used as a trick to simplify traversal
718 static vtkPolyDataDummyContainter DummyContainer;
719
720 // Take into account only points that belong to at least one cell.
721 double CellsBounds[6];
722
724
725private:
726 // Hide these from the user and the compiler.
727
731 void GetCellNeighbors(vtkIdType cellId, vtkIdList& ptIds, vtkIdList& cellIds)
732 {
733 this->GetCellNeighbors(cellId, &ptIds, &cellIds);
734 }
735
736 void Cleanup();
737
738private:
739 vtkPolyData(const vtkPolyData&) = delete;
740 void operator=(const vtkPolyData&) = delete;
741};
742
743//------------------------------------------------------------------------------
744inline void vtkPolyData::GetPointCells(vtkIdType ptId, vtkIdType& ncells, vtkIdType*& cells)
745{
746 ncells = this->Links->GetNcells(ptId);
747 cells = this->Links->GetCells(ptId);
748}
749
750inline void vtkPolyData::GetPointCells(vtkIdType ptId, unsigned short& ncells, vtkIdType*& cells)
751{
752 VTK_LEGACY_BODY(vtkPolyData::GetPointCells, "VTK 9.0");
753 ncells = static_cast<unsigned short>(this->Links->GetNcells(ptId));
754 cells = this->Links->GetCells(ptId);
755}
756
757//------------------------------------------------------------------------------
759{
760 return (this->GetNumberOfVerts() + this->GetNumberOfLines() + this->GetNumberOfPolys() +
761 this->GetNumberOfStrips());
762}
763
764//------------------------------------------------------------------------------
766{
767 if (!this->Cells)
768 {
769 this->BuildCells();
770 }
771 return static_cast<int>(this->Cells->GetTag(cellId).GetCellType());
772}
773
774//------------------------------------------------------------------------------
775inline int vtkPolyData::IsTriangle(int v1, int v2, int v3)
776{
777 vtkIdType n1;
778 int i, j, tVerts[3];
779 vtkIdType* cells;
780 const vtkIdType* tVerts2;
781 vtkIdType n2;
782
783 tVerts[0] = v1;
784 tVerts[1] = v2;
785 tVerts[2] = v3;
786
787 for (i = 0; i < 3; i++)
788 {
789 this->GetPointCells(tVerts[i], n1, cells);
790 for (j = 0; j < n1; j++)
791 {
792 this->GetCellPoints(cells[j], n2, tVerts2);
793 if ((tVerts[0] == tVerts2[0] || tVerts[0] == tVerts2[1] || tVerts[0] == tVerts2[2]) &&
794 (tVerts[1] == tVerts2[0] || tVerts[1] == tVerts2[1] || tVerts[1] == tVerts2[2]) &&
795 (tVerts[2] == tVerts2[0] || tVerts[2] == tVerts2[1] || tVerts[2] == tVerts2[2]))
796 {
797 return 1;
798 }
799 }
800 }
801 return 0;
802}
803
804//------------------------------------------------------------------------------
806{
807 vtkIdType npts;
808 const vtkIdType* pts;
809
810 this->GetCellPoints(cellId, npts, pts);
811 for (vtkIdType i = 0; i < npts; i++)
812 {
813 if (pts[i] == ptId)
814 {
815 return 1;
816 }
817 }
818
819 return 0;
820}
821
822//------------------------------------------------------------------------------
824{
825 this->Links->DeletePoint(ptId);
826}
827
828//------------------------------------------------------------------------------
830{
831 this->Cells->GetTag(cellId).MarkDeleted();
832}
833
834//------------------------------------------------------------------------------
836{
837 const vtkIdType* pts;
838 vtkIdType npts;
839
840 this->GetCellPoints(cellId, npts, pts);
841 for (vtkIdType i = 0; i < npts; i++)
842 {
843 this->Links->RemoveCellReference(cellId, pts[i]);
844 }
845}
846
847//------------------------------------------------------------------------------
849{
850 const vtkIdType* pts;
851 vtkIdType npts;
852
853 this->GetCellPoints(cellId, npts, pts);
854 for (vtkIdType i = 0; i < npts; i++)
855 {
856 this->Links->AddCellReference(cellId, pts[i]);
857 }
858}
859
860//------------------------------------------------------------------------------
862{
863 this->Links->ResizeCellList(ptId, size);
864}
865
866//------------------------------------------------------------------------------
868{
869 switch (tag.GetTarget())
870 {
872 return this->Verts;
874 return this->Lines;
876 return this->Polys;
878 return this->Strips;
879 }
880 return nullptr; // unreachable
881}
882
883//------------------------------------------------------------------------------
884inline void vtkPolyData::ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId, vtkIdType newPtId)
885{
887 this->GetCellPoints(cellId, ids);
888 for (vtkIdType i = 0; i < ids->GetNumberOfIds(); i++)
889 {
890 if (ids->GetId(i) == oldPtId)
891 {
892 ids->SetId(i, newPtId);
893 break;
894 }
895 }
896 this->ReplaceCell(cellId, static_cast<int>(ids->GetNumberOfIds()), ids->GetPointer(0));
897}
898
899//------------------------------------------------------------------------------
900inline unsigned char vtkPolyData::GetCellPoints(
901 vtkIdType cellId, vtkIdType& npts, vtkIdType const*& pts)
902{
903 if (!this->Cells)
904 {
905 this->BuildCells();
906 }
907
908 const TaggedCellId tag = this->Cells->GetTag(cellId);
909 if (tag.IsDeleted())
910 {
911 npts = 0;
912 pts = nullptr;
913 return VTK_EMPTY_CELL;
914 }
915
916 vtkCellArray* cells = this->GetCellArrayInternal(tag);
917 cells->GetCellAtId(tag.GetCellId(), npts, pts);
918 return tag.GetCellType();
919}
920
921#endif
object to represent cell connectivity
Definition: vtkCellArray.h:190
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:67
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:59
general representation of visualization data
Definition: vtkDataObject.h:69
abstract class to specify dataset behavior
Definition: vtkDataSet.h:66
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:40
vtkIdType GetNumberOfIds() const noexcept
Return the number of id's in the list.
Definition: vtkIdList.h:66
void SetId(const vtkIdType i, const vtkIdType vtkid)
Set the id at location i.
Definition: vtkIdList.h:98
vtkIdType GetId(const vtkIdType i)
Return the id at location i.
Definition: vtkIdList.h:71
vtkIdType * GetPointer(const vtkIdType i)
Get a pointer to a particular data index.
Definition: vtkIdList.h:135
Abstract class in support of both point location and point insertion.
a simple class to control print indentation
Definition: vtkIndent.h:43
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
cell represents a 1D line
Definition: vtkLine.h:40
concrete class for storing a set of points
Definition: vtkPointSet.h:76
void GetPointCells(vtkIdType, vtkIdList *idList) override
This method resets parameter idList, as there is no cell in a vtkPointSet.
Definition: vtkPointSet.h:151
vtkIdType GetNumberOfCells() override
This method always returns 0, as there are no cells in a vtkPointSet.
Definition: vtkPointSet.h:135
int GetCellType(vtkIdType) override
This method always returns VTK_EMPTY_CELL, as there is no cell in a vtkPointSet.
Definition: vtkPointSet.h:163
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:95
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:694
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:381
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:867
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:835
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:243
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:775
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:713
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:715
int GetCellType(vtkIdType cellId) override
Standard vtkDataSet interface.
Definition: vtkPolyData.h:765
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:705
vtkSmartPointer< vtkPolyLine > PolyLine
Definition: vtkPolyData.h:696
vtkIdType GetNumberOfStrips()
Return the number of primitives of a particular type held.
Definition: vtkPolyData.h:245
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:244
vtkSmartPointer< vtkCellArray > Strips
Definition: vtkPolyData.h:708
vtkSmartPointer< vtkQuad > Quad
Definition: vtkPolyData.h:698
void DeleteCell(vtkIdType cellId)
Mark a point/cell as deleted from this vtkPolyData.
Definition: vtkPolyData.h:829
vtkSmartPointer< vtkPolygon > Polygon
Definition: vtkPolyData.h:699
int GetMaxCellSize() override
Return the maximum cell size in this poly data.
vtkSmartPointer< vtkLine > Line
Definition: vtkPolyData.h:695
void ResizeCellList(vtkIdType ptId, int size)
Resize the list of cells using a particular point.
Definition: vtkPolyData.h:861
vtkTimeStamp CellsBoundsTime
Definition: vtkPolyData.h:723
vtkIdType GetNumberOfCells() override
Standard vtkDataSet interface.
Definition: vtkPolyData.h:758
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:707
void Reset()
Begin inserting data all over again.
static vtkPolyData * New()
static vtkPolyDataDummyContainter DummyContainer
Definition: vtkPolyData.h:718
vtkCellArray * GetPolys()
Get the cell array defining polygons.
void AddCellReference(vtkIdType cellId)
Add references to cell in cell structure.
Definition: vtkPolyData.h:848
int GetDataObjectType() override
Return what type of dataset this is.
Definition: vtkPolyData.h:106
vtkSmartPointer< vtkCellArray > Lines
Definition: vtkPolyData.h:706
vtkSmartPointer< vtkEmptyCell > EmptyCell
Definition: vtkPolyData.h:701
vtkIdType GetNumberOfVerts()
Return the number of primitives of a particular type held.
Definition: vtkPolyData.h:242
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:693
int IsPointUsedByCell(vtkIdType ptId, vtkIdType cellId)
Determine whether a point is used by a particular cell.
Definition: vtkPolyData.h:805
void ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId, vtkIdType newPtId)
Replace a point in the cell connectivity list with a different point.
Definition: vtkPolyData.h:884
vtkSmartPointer< CellMap > Cells
Definition: vtkPolyData.h:712
void GetPointCells(vtkIdType ptId, vtkIdList *cellIds) override
Efficient method to obtain cells using a particular point.
vtkSmartPointer< vtkTriangle > Triangle
Definition: vtkPolyData.h:697
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:823
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:324
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:339
void DeleteLinks()
Release the upward links from point to cells that use each point.
vtkSmartPointer< vtkTriangleStrip > TriangleStrip
Definition: vtkPolyData.h:700
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:46
cell represents a set of 0D vertices
Definition: vtkPolyVertex.h:42
a cell that represents an n-sided polygon
Definition: vtkPolygon.h:49
a cell that represents a 2D quadrilateral
Definition: vtkQuad.h:45
record modification and/or execution time
Definition: vtkTimeStamp.h:42
a cell that represents a triangle strip
a cell that represents a triangle
Definition: vtkTriangle.h:45
a cell that represents a 3D point
Definition: vtkVertex.h:40
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(...)