65 #include "vtkCommonDataModelModule.h"
81 struct vtkPolyDataDummyContainter;
288 this->AllocateExact(numCells, numCells);
303 this->AllocateProportional(
304 inPolyData,
static_cast<double>(numCells) / inPolyData->
GetNumberOfCells());
372 #ifndef VTK_LEGACY_REMOVE
401 int IsTriangle(
int v1,
int v2,
int v3);
500 void RemoveCellReference(
vtkIdType cellId);
607 ERR_NO_SUCH_FIELD = -4,
608 ERR_INCORRECT_FIELD = -3,
609 ERR_NON_MANIFOLD_STAR = -2,
707 #ifndef VTK_LEGACY_REMOVE
711 ncells =
static_cast<unsigned short>(this->
Links->
GetNcells(ptId));
730 return static_cast<int>(this->
Cells->GetTag(cellId).GetCellType());
746 for (i = 0; i < 3; i++)
749 for (j = 0; j < n1; j++)
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]))
790 this->
Cells->GetTag(cellId).MarkDeleted();
849 if (ids->
GetId(i) == oldPtId)
851 ids->
SetId(i, newPtId);
object to represent cell connectivity
void GetCellAtId(vtkIdType cellId, vtkIdType &cellSize, vtkIdType const *&cellPoints)
Return the point ids for the cell at cellId.
void RemoveCellReference(vtkIdType cellId, vtkIdType ptId)
Delete the reference to the cell (cellId) from the point (ptId).
void AddCellReference(vtkIdType cellId, vtkIdType ptId)
Add the reference to the cell (cellId) from the point (ptId).
void ResizeCellList(vtkIdType ptId, int size)
Change the length of a point's link list (i.e., list of cells using a point) by the size specified.
vtkIdType * GetCells(vtkIdType ptId)
Return a list of cell ids using the point.
vtkIdType GetNcells(vtkIdType ptId)
Get the number of cells using the point specified by ptId.
void DeletePoint(vtkIdType ptId)
Delete point (and storage) by destroying links to using cells.
abstract class to specify cell behavior
abstract superclass for arrays of numeric data
general representation of visualization data
abstract class to specify dataset behavior
virtual void GetPointCells(vtkIdType ptId, vtkIdList *cellIds)=0
Topological inquiry to get cells using point.
virtual vtkCell * GetCell(vtkIdType cellId)=0
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
virtual vtkIdType GetNumberOfCells()=0
Determine the number of cells composing the dataset.
virtual int GetCellType(vtkIdType cellId)=0
Get type of cell with cellId such that: 0 <= cellId < NumberOfCells.
virtual void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds)=0
Topological inquiry to get points defining cell.
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
provides thread-safe access to cells
list of point or cell ids
vtkIdType * GetPointer(const vtkIdType i)
Get a pointer to a particular data index.
vtkIdType GetNumberOfIds()
Return the number of id's in the list.
void SetId(const vtkIdType i, const vtkIdType vtkid)
Set the id at location i.
vtkIdType GetId(const vtkIdType i)
Return the id at location i.
Abstract class in support of both point location and point insertion.
a simple class to control print indentation
cell represents a 1D line
abstract class for specifying dataset behavior
concrete dataset represents vertices, lines, polygons, and 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
void GetCell(vtkIdType cellId, vtkGenericCell *cell) override
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
void Squeeze() override
Recover extra allocated memory when creating data whose initial size is unknown.
static vtkPolyData * GetData(vtkInformationVector *v, int i=0)
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)
void SetPolys(vtkCellArray *p)
Set the cell array defining polygons.
vtkCellArray * GetCellArrayInternal(TaggedCellId tag)
vtkCellArray * GetStrips()
Get the cell array defining triangle strips.
void RemoveCellReference(vtkIdType cellId)
Remove all references to cell in cell structure.
vtkIdType GetNumberOfLines()
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
Methods invoked by print to print information about the object including superclasses.
vtkSmartPointer< vtkCellLinks > Links
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
Topological inquiry to get all cells using list of points exclusive of cell specified (e....
int GetScalarFieldCriticalIndex(vtkIdType pointId, int fieldId)
void ReplaceLinkedCell(vtkIdType cellId, int npts, const vtkIdType pts[])
Replace one cell with another in cell structure.
void CopyStructure(vtkDataSet *ds) override
Copy the geometric and topological structure of an input poly data object.
vtkNew< vtkIdList > LegacyBuffer
int GetCellType(vtkIdType cellId) override
Get type of cell with cellId such that: 0 <= cellId < NumberOfCells.
void GetCellBounds(vtkIdType cellId, double bounds[6]) override
Get the bounds of the cell with cellId such that: 0 <= cellId < NumberOfCells.
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
vtkSmartPointer< vtkPolyLine > PolyLine
vtkIdType GetNumberOfStrips()
int GetScalarFieldCriticalIndex(vtkIdType pointId, vtkDataArray *scalarField)
vtkCellArray * GetVerts()
Get the cell array defining vertices.
bool AllocateCopy(vtkPolyData *pd)
Preallocate memory for the internal cell arrays such that they are the same size as those in pd.
static vtkPolyData * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
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()
void ShallowCopy(vtkDataObject *src) override
Shallow and Deep copy.
vtkSmartPointer< vtkCellArray > Strips
vtkSmartPointer< vtkQuad > Quad
vtkCell * GetCell(vtkIdType cellId) override
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
void DeleteCell(vtkIdType cellId)
vtkSmartPointer< vtkPolygon > Polygon
vtkIdType InsertNextLinkedPoint(double x[3], int numLinks)
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...
vtkSmartPointer< vtkLine > Line
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.
vtkCellArray * GetPolys()
Get the cell array defining polygons.
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 .
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
void AddCellReference(vtkIdType cellId)
Add references to cell in cell structure.
int GetDataObjectType() override
Return what type of dataset this is.
vtkSmartPointer< vtkCellArray > Lines
void ComputeBounds() override
Compute the (X, Y, Z) bounds of the data.
void GetCellEdgeNeighbors(vtkIdType cellId, vtkIdType p1, vtkIdType p2, vtkIdList *cellIds)
Get the neighbors at an edge.
vtkSmartPointer< vtkEmptyCell > EmptyCell
virtual int GetNumberOfPieces()
void DeepCopy(vtkDataObject *src) override
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.
virtual vtkMTimeType GetMeshMTime()
Return the mesh (geometry/topology) modification time.
vtkSmartPointer< vtkVertex > Vertex
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.
vtkCellArray * GetLines()
Get the cell array defining lines.
vtkSmartPointer< vtkTriangle > Triangle
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.
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.
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.
void ReverseCell(vtkIdType cellId)
Reverse the order of point ids defining the cell.
vtkSmartPointer< vtkTriangleStrip > TriangleStrip
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
cell represents a set of 0D vertices
a cell that represents an n-sided polygon
a cell that represents a 2D quadrilateral
a cell that represents a triangle strip
a cell that represents a triangle
a cell that represents a 3D point
unsigned char GetCellType() const noexcept
Target GetTarget() const noexcept
vtkIdType GetCellId() const noexcept
bool IsDeleted() const noexcept
vtkTypeUInt32 vtkMTimeType
#define VTK_SIZEHINT(...)