VTK  9.3.20240722
vtkPolyData.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
165#ifndef vtkPolyData_h
166#define vtkPolyData_h
167
168#include "vtkCommonDataModelModule.h" // For export macro
169#include "vtkPointSet.h"
170#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
171
172#include "vtkCellArray.h" // Needed for inline methods
173#include "vtkCellLinks.h" // Needed for inline methods
174#include "vtkPolyDataInternals.h" // Needed for inline methods
175
176VTK_ABI_NAMESPACE_BEGIN
177struct vtkPolyDataDummyContainter;
179
180class VTKCOMMONDATAMODEL_EXPORT VTK_MARSHALAUTO vtkPolyData : public vtkPointSet
181{
182public:
183 static vtkPolyData* New();
185
186 vtkTypeMacro(vtkPolyData, vtkPointSet);
187 void PrintSelf(ostream& os, vtkIndent indent) override;
188
192 int GetDataObjectType() override { return VTK_POLY_DATA; }
193
197 void CopyStructure(vtkDataSet* ds) override;
198
200
203 vtkIdType GetNumberOfCells() override;
205 vtkCell* GetCell(vtkIdType cellId) override;
206 void GetCell(vtkIdType cellId, vtkGenericCell* cell) override;
207 int GetCellType(vtkIdType cellId) override;
208 vtkIdType GetCellSize(vtkIdType cellId) override;
209 void GetCellBounds(vtkIdType cellId, double bounds[6]) override;
210 void GetCellNeighbors(vtkIdType cellId, vtkIdList* ptIds, vtkIdList* cellIds) override;
212
220 void CopyCells(vtkPolyData* pd, vtkIdList* idList, vtkIncrementalPointLocator* locator = nullptr);
221
225 void GetCellPoints(vtkIdType cellId, vtkIdList* ptIds) override;
226
231 void GetPointCells(vtkIdType ptId, vtkIdList* cellIds) override;
232
252
258 void GetCellsBounds(double bounds[6]);
259
266 void Squeeze() override;
267
271 int GetMaxCellSize() override;
272
278
285
290
296
301
307
312
318
323
330
332
335 vtkIdType GetNumberOfVerts() { return (this->Verts ? this->Verts->GetNumberOfCells() : 0); }
336 vtkIdType GetNumberOfLines() { return (this->Lines ? this->Lines->GetNumberOfCells() : 0); }
337 vtkIdType GetNumberOfPolys() { return (this->Polys ? this->Polys->GetNumberOfCells() : 0); }
338 vtkIdType GetNumberOfStrips() { return (this->Strips ? this->Strips->GetNumberOfCells() : 0); }
340
350 bool AllocateEstimate(vtkIdType numCells, vtkIdType maxCellSize);
351
361 bool AllocateEstimate(vtkIdType numVerts, vtkIdType maxVertSize, vtkIdType numLines,
362 vtkIdType maxLineSize, vtkIdType numPolys, vtkIdType maxPolySize, vtkIdType numStrips,
363 vtkIdType maxStripSize);
364
374 bool AllocateExact(vtkIdType numCells, vtkIdType connectivitySize);
375
386 bool AllocateExact(vtkIdType numVerts, vtkIdType vertConnSize, vtkIdType numLines,
387 vtkIdType lineConnSize, vtkIdType numPolys, vtkIdType polyConnSize, vtkIdType numStrips,
388 vtkIdType stripConnSize);
389
399
409 bool AllocateProportional(vtkPolyData* pd, double ratio);
410
417 void Allocate(vtkIdType numCells = 1000, int vtkNotUsed(extSize) = 1000)
418 {
419 this->AllocateExact(numCells, numCells);
420 }
421
432 void Allocate(vtkPolyData* inPolyData, vtkIdType numCells = 1000, int vtkNotUsed(extSize) = 1000)
433 {
434 this->AllocateProportional(
435 inPolyData, static_cast<double>(numCells) / inPolyData->GetNumberOfCells());
436 }
437
445 vtkIdType InsertNextCell(int type, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
446
455
460 void Reset();
461
470
474 bool NeedToBuildCells() { return this->Cells == nullptr; }
475
482 void BuildLinks(int initialSize = 0);
483
485
491
498
503
505
509 void GetPointCells(vtkIdType ptId, vtkIdType& ncells, vtkIdType*& cells)
510 VTK_SIZEHINT(cells, ncells);
512
519
531 unsigned char GetCellPoints(vtkIdType cellId, vtkIdType& npts, vtkIdType const*& pts)
532 VTK_SIZEHINT(pts, npts);
533
548 void GetCellPoints(vtkIdType cellId, vtkIdType& npts, vtkIdType const*& pts, vtkIdList* ptIds)
549 VTK_SIZEHINT(pts, npts) override;
550
555 int IsTriangle(int v1, int v2, int v3);
556
565
570 int IsPointUsedByCell(vtkIdType ptId, vtkIdType cellId);
571
580 void ReplaceCell(vtkIdType cellId, vtkIdList* ids);
581 void ReplaceCell(vtkIdType cellId, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
585
594 void ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId, vtkIdType newPtId);
595 void ReplaceCellPoint(
596 vtkIdType cellId, vtkIdType oldPtId, vtkIdType newPtId, vtkIdList* cellPointIds);
598
603 void ReverseCell(vtkIdType cellId);
604
606
610 void DeletePoint(vtkIdType ptId);
611 void DeleteCell(vtkIdType cellId);
613
623
625
634 vtkIdType InsertNextLinkedPoint(double x[3], int numLinks);
636
643 vtkIdType InsertNextLinkedCell(int type, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
644
654 void ReplaceLinkedCell(vtkIdType cellId, int npts, const vtkIdType pts[]) VTK_SIZEHINT(pts, npts);
655
663 void RemoveCellReference(vtkIdType cellId);
664
672 void AddCellReference(vtkIdType cellId);
673
682
691
697 void ResizeCellList(vtkIdType ptId, int size);
698
702 void Initialize() override;
703
705
708 virtual int GetPiece();
709 virtual int GetNumberOfPieces();
711
715 virtual int GetGhostLevel();
716
725 unsigned long GetActualMemorySize() override;
726
728
731 void ShallowCopy(vtkDataObject* src) override;
732 void DeepCopy(vtkDataObject* src) override;
734
742
744
750
769 enum
770 {
771 ERR_NO_SUCH_FIELD = -4,
772 ERR_INCORRECT_FIELD = -3,
773 ERR_NON_MANIFOLD_STAR = -2,
774 REGULAR_POINT = -1,
775 MINIMUM = 0,
776 SADDLE = 1,
777 MAXIMUM = 2
778 };
779
781 int GetScalarFieldCriticalIndex(vtkIdType pointId, int fieldId);
782 int GetScalarFieldCriticalIndex(vtkIdType pointId, const char* fieldName);
783
792
797
807 unsigned char GetCell(vtkIdType cellId, const vtkIdType*& pts);
808
809protected:
811 ~vtkPolyData() override;
812
814
817
818 vtkCellArray* GetCellArrayInternal(TaggedCellId tag);
819
820 // points inherited
821 // point data (i.e., scalars, vectors, normals, tcoords) inherited
826
827 // supporting structures for more complex topological operations
828 // built only when necessary
831
833
834 // dummy static member below used as a trick to simplify traversal
835 static vtkPolyDataDummyContainter DummyContainer;
836
837 // Take into account only points that belong to at least one cell.
838 double CellsBounds[6];
839
841
842private:
843 void Cleanup();
844
845 vtkPolyData(const vtkPolyData&) = delete;
846 void operator=(const vtkPolyData&) = delete;
847};
848
849//------------------------------------------------------------------------------
851{
852 return (this->GetNumberOfVerts() + this->GetNumberOfLines() + this->GetNumberOfPolys() +
853 this->GetNumberOfStrips());
854}
855
856//------------------------------------------------------------------------------
858{
859 if (!this->Cells)
860 {
861 this->BuildCells();
862 }
863 return static_cast<int>(this->Cells->GetTag(cellId).GetCellType());
864}
865
866//------------------------------------------------------------------------------
868{
869 if (!this->Cells)
870 {
871 this->BuildCells();
872 }
873 switch (this->GetCellType(cellId))
874 {
875 case VTK_EMPTY_CELL:
876 return 0;
877 case VTK_VERTEX:
878 return 1;
879 case VTK_LINE:
880 return 2;
881 case VTK_TRIANGLE:
882 return 3;
883 case VTK_QUAD:
884 return 4;
885 case VTK_POLY_VERTEX:
886 return this->Verts ? this->Verts->GetCellSize(this->GetCellIdRelativeToCellArray(cellId)) : 0;
887 case VTK_POLY_LINE:
888 return this->Lines ? this->Lines->GetCellSize(this->GetCellIdRelativeToCellArray(cellId)) : 0;
889 case VTK_POLYGON:
890 return this->Polys ? this->Polys->GetCellSize(this->GetCellIdRelativeToCellArray(cellId)) : 0;
892 return this->Strips ? this->Strips->GetCellSize(this->GetCellIdRelativeToCellArray(cellId))
893 : 0;
894 }
895 vtkWarningMacro(<< "Cell type not supported.");
896 return 0;
897}
898
899//------------------------------------------------------------------------------
901{
902 vtkIdType npts;
903 const vtkIdType* pts;
904
905 this->GetCellPoints(cellId, npts, pts);
906 for (vtkIdType i = 0; i < npts; i++)
907 {
908 if (pts[i] == ptId)
909 {
910 return 1;
911 }
912 }
913
914 return 0;
915}
916
917//------------------------------------------------------------------------------
919{
920 static_cast<vtkCellLinks*>(this->Links.Get())->DeletePoint(ptId);
921}
922
923//------------------------------------------------------------------------------
925{
926 this->Cells->GetTag(cellId).MarkDeleted();
927}
928
929//------------------------------------------------------------------------------
931{
932 const vtkIdType* pts;
933 vtkIdType npts;
934
935 this->GetCellPoints(cellId, npts, pts);
936 auto links = static_cast<vtkCellLinks*>(this->Links.Get());
937 for (vtkIdType i = 0; i < npts; i++)
938 {
939 links->RemoveCellReference(cellId, pts[i]);
940 }
941}
942
943//------------------------------------------------------------------------------
945{
946 const vtkIdType* pts;
947 vtkIdType npts;
948
949 this->GetCellPoints(cellId, npts, pts);
950 auto links = static_cast<vtkCellLinks*>(this->Links.Get());
951 for (vtkIdType i = 0; i < npts; i++)
952 {
953 links->AddCellReference(cellId, pts[i]);
954 }
955}
956
957//------------------------------------------------------------------------------
958inline void vtkPolyData::ResizeCellList(vtkIdType ptId, int size)
959{
960 static_cast<vtkCellLinks*>(this->Links.Get())->ResizeCellList(ptId, size);
961}
962
963//------------------------------------------------------------------------------
965{
966 switch (tag.GetTarget())
967 {
969 return this->Verts;
971 return this->Lines;
973 return this->Polys;
975 return this->Strips;
976 }
977 return nullptr; // unreachable
978}
979
980//------------------------------------------------------------------------------
981inline void vtkPolyData::ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId, vtkIdType newPtId)
982{
984 this->ReplaceCellPoint(cellId, oldPtId, newPtId, ids);
985}
986
987//------------------------------------------------------------------------------
989 vtkIdType cellId, vtkIdType oldPtId, vtkIdType newPtId, vtkIdList* cellPointIds)
990{
991 if (!this->Cells)
992 {
993 this->BuildCells();
994 }
995 vtkIdType npts;
996 const vtkIdType* pts;
997 this->GetCellPoints(cellId, npts, pts, cellPointIds);
998 for (vtkIdType i = 0; i < npts; i++)
999 {
1000 if (pts[i] == oldPtId)
1001 {
1002 const TaggedCellId tag = this->Cells->GetTag(cellId);
1003 vtkCellArray* cells = this->GetCellArrayInternal(tag);
1004 cells->ReplaceCellPointAtId(tag.GetCellId(), i, newPtId);
1005 break;
1006 }
1007 }
1008}
1009
1010//------------------------------------------------------------------------------
1011inline unsigned char vtkPolyData::GetCellPoints(
1012 vtkIdType cellId, vtkIdType& npts, vtkIdType const*& pts)
1013{
1014 if (!this->Cells)
1015 {
1016 this->BuildCells();
1017 }
1018
1019 const TaggedCellId tag = this->Cells->GetTag(cellId);
1020 if (tag.IsDeleted())
1021 {
1022 npts = 0;
1023 pts = nullptr;
1024 return VTK_EMPTY_CELL;
1025 }
1026
1027 vtkCellArray* cells = this->GetCellArrayInternal(tag);
1028 cells->GetCellAtId(tag.GetCellId(), npts, pts);
1029 return tag.GetCellType();
1030}
1031
1032//------------------------------------------------------------------------------
1034 vtkIdType cellId, vtkIdType& npts, vtkIdType const*& pts, vtkIdList* ptIds)
1035{
1036 if (!this->Cells)
1037 {
1038 this->BuildCells();
1039 }
1040
1041 const TaggedCellId tag = this->Cells->GetTag(cellId);
1042 if (tag.IsDeleted())
1043 {
1044 npts = 0;
1045 pts = nullptr;
1046 }
1047 else
1048 {
1049 vtkCellArray* cells = this->GetCellArrayInternal(tag);
1050 cells->GetCellAtId(tag.GetCellId(), npts, pts, ptIds);
1051 }
1052}
1053
1054VTK_ABI_NAMESPACE_END
1055#endif
object to represent cell connectivity
vtkIdType GetCellSize(vtkIdType cellId) const override
Return the size of the cell at cellId.
void GetCellAtId(vtkIdType cellId, vtkIdType &cellSize, vtkIdType const *&cellPoints, vtkIdList *ptIds) override
Return the point ids for the cell at cellId.
void ReplaceCellPointAtId(vtkIdType cellId, vtkIdType cellPointIndex, vtkIdType newPointId)
Replaces the pointId at cellPointIndex of a cell with newPointId.
abstract class to specify cell behavior
Definition vtkCell.h:130
abstract superclass for arrays of numeric data
general representation of visualization data
abstract class to specify dataset behavior
Definition vtkDataSet.h:166
virtual vtkCell * GetCell(vtkIdType cellId)=0
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
Detect and break reference loops.
provides thread-safe access to cells
list of point or cell ids
Definition vtkIdList.h:133
Abstract class in support of both point location and point insertion.
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Allocate and hold a VTK object.
Definition vtkNew.h:160
concrete class for storing a set of points
Definition vtkPointSet.h:98
void GetCellPoints(vtkIdType, vtkIdList *idList) override
This method resets parameter idList, as there is no cell in a vtkPointSet.
vtkIdType GetCellSize(vtkIdType) override
This method always returns 1, as all cells are point in a pure vtkPointSet.
vtkIdType GetNumberOfCells() override
This method always returns 0, as there are no cells in a vtkPointSet.
int GetCellType(vtkIdType) override
This method always returns VTK_EMPTY_CELL, as there is no cell in a vtkPointSet.
concrete dataset represents vertices, lines, polygons, and triangle strips
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,...
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.
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)
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.
static vtkPolyData * GetData(vtkInformationVector *v, int i=0)
Retrieve an instance of this class from an information object.
void ComputeCellsBounds()
Compute the (X, Y, Z) bounds of the data.
vtkIdType GetNumberOfLines()
Return the number of primitives of a particular type held.
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.
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 methods for type information and printing.
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 Initialize() override
Restore object to initial state.
void AddReferenceToCell(vtkIdType ptId, vtkIdType cellId)
Add a reference to a cell in a particular point's link list.
void GetCellNeighbors(vtkIdType cellId, vtkIdList *ptIds, vtkIdList *cellIds) override
Standard vtkDataSet interface.
~vtkPolyData() override
int GetScalarFieldCriticalIndex(vtkIdType pointId, int fieldId)
void ReplaceLinkedCell(vtkIdType cellId, int npts, const vtkIdType pts[])
Replace one cell with another in cell structure.
vtkGetSmartPointerMacro(Links, vtkAbstractCellLinks)
Set/Get the links that were created possibly without using BuildLinks.
void CopyStructure(vtkDataSet *ds) override
Copy the geometric and topological structure of an input poly data object.
vtkNew< vtkIdList > LegacyBuffer
vtkSetSmartPointerMacro(Links, vtkAbstractCellLinks)
Set/Get the links that were created possibly without using BuildLinks.
int GetCellType(vtkIdType cellId) override
Standard vtkDataSet interface.
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.
virtual int GetGhostLevel()
Get the ghost level.
vtkMTimeType GetMTime() override
Get MTime which also considers its cell array MTime.
vtkSmartPointer< vtkCellArray > Verts
vtkIdType GetNumberOfStrips()
Return the number of primitives of a particular type held.
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 InsertNextLinkedCell(int type, int npts, const vtkIdType pts[])
Add a new cell to the cell data structure (after cell pointers have been built).
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.
void GetPointCells(vtkIdType ptId, vtkIdType &ncells, vtkIdType *&cells)
Special (efficient) operations on poly data.
vtkSmartPointer< vtkAbstractCellLinks > Links
void ShallowCopy(vtkDataObject *src) override
Shallow and Deep copy.
vtkSmartPointer< vtkCellArray > Strips
void DeleteCell(vtkIdType cellId)
Mark a point/cell as deleted from this vtkPolyData.
vtkIdType InsertNextLinkedPoint(double x[3], int numLinks)
Add a point to the cell data structure (after cell pointers have been built).
int GetMaxCellSize() override
Return the maximum cell size in this poly data.
void RemoveGhostCells()
This method will remove any cell that is marked as ghost (has the vtkDataSetAttributes::DUPLICATECELL...
void ResizeCellList(vtkIdType ptId, int size)
Resize the list of cells using a particular point.
virtual int GetPiece()
Get the piece and the number of pieces.
vtkTimeStamp CellsBoundsTime
int GetMaxSpatialDimension() override
Get the maximum spatial dimensionality of the data which is the maximum dimension of all cells.
vtkIdType GetNumberOfCells() override
Standard vtkDataSet interface.
bool AllocateExact(vtkIdType numCells, vtkIdType connectivitySize)
Preallocate memory for the internal cell arrays.
vtkIdType InsertNextLinkedPoint(int numLinks)
Add a point to the cell data structure (after cell pointers have been built).
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
void Reset()
Begin inserting data all over again.
static vtkPolyData * New()
unsigned long GetActualMemorySize() override
Return the actual size of the data in kibibytes (1024 bytes).
void RemoveReferenceToCell(vtkIdType ptId, vtkIdType cellId)
Remove a reference to a cell in a particular point's link list.
int IsEdge(vtkIdType p1, vtkIdType p2)
Determine whether two points form an edge.
void ReplaceCell(vtkIdType cellId, int npts, const vtkIdType pts[])
Replace the points defining cell "cellId" with a new set of points.
static vtkPolyDataDummyContainter DummyContainer
vtkCellArray * GetPolys()
Get the cell array defining polygons.
void AddCellReference(vtkIdType cellId)
Add references to cell in cell structure.
int GetDataObjectType() override
Return what type of dataset this is.
void ReportReferences(vtkGarbageCollector *) override
vtkSmartPointer< vtkCellArray > Lines
void GetCellEdgeNeighbors(vtkIdType cellId, vtkIdType p1, vtkIdType p2, vtkIdList *cellIds)
Get the neighbors at an edge.
virtual int GetNumberOfPieces()
Get the piece and the number of pieces.
void DeepCopy(vtkDataObject *src) override
Shallow and Deep copy.
void RemoveDeletedCells()
The cells marked by calls to DeleteCell are stored in the Cell Array VTK_EMPTY_CELL,...
vtkIdType GetNumberOfVerts()
Return the number of primitives of a particular type held.
void DeleteCells()
Release data structure that allows random access of the cells.
static vtkPolyData * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
int IsPointUsedByCell(vtkIdType ptId, vtkIdType cellId)
Determine whether a point is used by a particular cell.
void ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId, vtkIdType newPtId)
Replace a point in the cell connectivity list with a different point.
vtkSmartPointer< CellMap > Cells
void GetPointCells(vtkIdType ptId, vtkIdList *cellIds) override
Efficient method to obtain cells using a particular point.
void BuildCells()
Create data structure that allows random access of cells.
void DeletePoint(vtkIdType ptId)
Mark a point/cell as deleted from this vtkPolyData.
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.
void BuildLinks(int initialSize=0)
Create upward links from points to cells that use each point.
vtkIdType GetCellSize(vtkIdType cellId) override
Standard vtkDataSet interface.
void Allocate(vtkPolyData *inPolyData, vtkIdType numCells=1000, int vtkNotUsed(extSize)=1000)
Similar to the method above, this method allocates initial storage for vertex, line,...
void DeleteLinks()
Release the upward links from point to cells that use each point.
vtkMTimeType GetMeshMTime() override
Return the mesh (geometry/topology) modification time.
void ReverseCell(vtkIdType cellId)
Reverse the order of point ids defining the cell.
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...
Hold a reference to a vtkObjectBase instance.
T * Get() const noexcept
Get the contained pointer.
record modification and/or execution time
unsigned char GetCellType() const noexcept
vtkIdType GetCellId() const noexcept
@ VTK_TRIANGLE_STRIP
Definition vtkCellType.h:62
@ VTK_POLY_LINE
Definition vtkCellType.h:60
@ VTK_TRIANGLE
Definition vtkCellType.h:61
@ VTK_POLYGON
Definition vtkCellType.h:63
@ VTK_EMPTY_CELL
Definition vtkCellType.h:56
@ VTK_LINE
Definition vtkCellType.h:59
@ VTK_QUAD
Definition vtkCellType.h:65
@ VTK_VERTEX
Definition vtkCellType.h:57
@ VTK_POLY_VERTEX
Definition vtkCellType.h:58
int vtkIdType
Definition vtkType.h:315
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270
#define VTK_POLY_DATA
Definition vtkType.h:65
#define VTK_SIZEHINT(...)
#define VTK_MARSHALAUTO