Go to the documentation of this file.
67 #include "vtkCommonDataModelModule.h"
83 struct vtkPolyDataDummyContainter;
325 int IsTriangle(
int v1,
int v2,
int v3);
413 void RemoveCellReference(
vtkIdType cellId);
516 ERR_NO_SUCH_FIELD = -4,
517 ERR_INCORRECT_FIELD = -3,
518 ERR_NON_MANIFOLD_STAR = -2,
599 unsigned short int n1;
613 if ( (tVerts[0] == tVerts2[0] || tVerts[0] == tVerts2[1] ||
614 tVerts[0] == tVerts2[2]) &&
615 (tVerts[1] == tVerts2[0] || tVerts[1] == tVerts2[1] ||
616 tVerts[1] == tVerts2[2]) &&
617 (tVerts[2] == tVerts2[0] || tVerts[2] == tVerts2[1] ||
618 tVerts[2] == tVerts2[2]) )
634 if ( pts[i] == ptId )
687 for ( i=0; i < nverts; i++ )
689 if ( verts[i] == oldPtId )
727 cells->
GetCell(loc, npts, pts);
void RemoveGhostCells()
This method will remove any cell that is marked as ghost (has the vtkDataSetAttributes::DUPLICATECELL...
int GetScalarFieldCriticalIndex(vtkIdType pointId, const char *fieldName)
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,...
void SetStrips(vtkCellArray *s)
Set the cell array defining triangle strips.
static vtkPolyData * New()
object provides direct access to cells in vtkCellArray and type information
int GetCellType(vtkIdType cellId) override
Get type of cell with cellId such that: 0 <= cellId < NumberOfCells.
void GetPointCells(vtkIdType ptId, vtkIdList *cellIds) override
Efficient method to obtain cells using a particular point.
void ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId, vtkIdType newPtId)
Replace a point in the cell connectivity list with a different point.
virtual vtkCell * GetCell(vtkIdType cellId)=0
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
a cell that represents an n-sided polygon
quickly locate points in 3-space
an empty cell used as a place-holder during processing
int GetScalarFieldCriticalIndex(vtkIdType pointId, vtkDataArray *scalarField)
void SetPolys(vtkCellArray *p)
Set the cell array defining polygons.
unsigned short GetNcells(vtkIdType ptId)
Get the number of cells using the point specified by ptId.
vtkPolyVertex * PolyVertex
vtkIdType GetNumberOfPolys()
virtual int GetPiece()
Get the piece and the number of pieces.
void Initialize() override
Restore object to initial state.
void SetLines(vtkCellArray *l)
Set the cell array defining lines.
void RemoveCellReference(vtkIdType cellId)
Remove all references to cell in cell structure.
ValueType * GetPointer(vtkIdType valueIdx)
Get the address of a particular data index.
vtkIdTypeArray * GetData()
Return the underlying data as a data array.
abstract superclass for arrays of numeric data
void RemoveReferenceToCell(vtkIdType ptId, vtkIdType cellId)
Remove a reference to a cell in a particular point's link list.
vtkCellArray * GetStrips()
Get the cell array defining triangle strips.
a cell that represents a 3D point
bool NeedToBuildCells()
Check if BuildCells is needed.
vtkIdType InsertNextCell(int type, vtkIdList *pts)
Insert a cell of type VTK_VERTEX, VTK_POLY_VERTEX, VTK_LINE, VTK_POLY_LINE, VTK_TRIANGLE,...
vtkIdType * GetCells(vtkIdType ptId)
Return a list of cell ids using the point.
void DeletePoint(vtkIdType ptId)
Delete point (and storage) by destroying links to using cells.
void Squeeze() override
Recover extra allocated memory when creating data whose initial size is unknown.
void RemoveDeletedCells()
The cells marked by calls to DeleteCell are stored in the Cell Array VTK_EMPTY_CELL,...
cell represents a 1D line
void ReplaceCell(vtkIdType cellId, int npts, const vtkIdType pts[])
Replace the points defining cell "cellId" with a new set of points.
void ReplaceLinkedCell(vtkIdType cellId, int npts, const vtkIdType pts[])
Replace one cell with another in cell structure.
vtkIdType GetNumberOfVerts()
Return the number of primitives of a particular type held.
void Reset()
Begin inserting data all over again.
void DeletePoint(vtkIdType ptId)
Mark a point/cell as deleted from this vtkPolyData.
vtkCellArray * GetLines()
Get the cell array defining lines.
void CopyStructure(vtkDataSet *ds) override
Copy the geometric and topological structure of an input poly data object.
void GetCellNeighbors(vtkIdType cellId, vtkIdList *ptIds, vtkIdList *cellIds) override
Topological inquiry to get all cells using list of points exclusive of cell specified (e....
static vtkPolyData * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
vtkCell * GetCell(vtkIdType cellId) override
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
int GetScalarFieldCriticalIndex(vtkIdType pointId, int fieldId)
int GetDataObjectType() override
Return what type of dataset this is.
void AddCellReference(vtkIdType cellId)
Add references to cell in cell structure.
#define VTK_SIZEHINT(...)
cell represents a set of 1D lines
static vtkPolyData * GetData(vtkInformationVector *v, int i=0)
unsigned char GetCellType(vtkIdType cellId)
Return the type of cell.
void GetCell(vtkIdType loc, vtkIdType &npts, vtkIdType *&pts)
Internal method used to retrieve a cell given an offset into the internal array.
virtual void GetCellNeighbors(vtkIdType cellId, vtkIdList *ptIds, vtkIdList *cellIds)
Topological inquiry to get all cells using list of points exclusive of cell specified (e....
virtual int GetGhostLevel()
Get the ghost level.
abstract class to specify cell behavior
vtkCellArray * GetVerts()
Get the cell array defining vertices.
void RemoveCellReference(vtkIdType cellId, vtkIdType ptId)
Delete the reference to the cell (cellId) from the point (ptId).
virtual void GetPointCells(vtkIdType ptId, vtkIdList *cellIds)=0
Topological inquiry to get cells using point.
a simple class to control print indentation
object represents upward pointers from points to list of cells using each point
vtkIdType GetCellLocation(vtkIdType cellId)
Return the location of the cell in the associated vtkCellArray.
object to represent cell connectivity
int IsTriangle(int v1, int v2, int v3)
Given three vertices, determine whether it's a triangle.
list of point or cell ids
void SetVerts(vtkCellArray *v)
Set the cell array defining vertices.
vtkIdType GetNumberOfCells() override
Standard vtkDataSet interface.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a cell that represents a triangle
virtual vtkMTimeType GetMeshMTime()
Return the mesh (geometry/topology) modification time.
virtual int GetNumberOfPieces()
void ShallowCopy(vtkDataObject *src) override
Shallow and Deep copy.
abstract class to specify dataset behavior
void DeleteLinks()
Release the upward links from point to cells that use each point.
virtual void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds)=0
Topological inquiry to get points defining cell.
void DeepCopy(vtkDataObject *src) override
void BuildLinks(int initialSize=0)
Create upward links from points to cells that use each point.
void DeleteCell(vtkIdType cellId)
Delete cell by setting to nullptr cell type.
int IsPointUsedByCell(vtkIdType ptId, vtkIdType cellId)
Determine whether a point is used by a particular cell.
void BuildCells()
Create data structure that allows random access of cells.
vtkIdType InsertNextLinkedPoint(double x[3], int numLinks)
void ComputeBounds() override
Compute the (X, Y, Z) bounds of the data.
void ReverseCell(vtkIdType cellId)
Reverse the order of point ids defining the cell.
void ResizeCellList(vtkIdType ptId, int size)
Resize the list of cells using a particular point.
void GetCell(vtkIdType cellId, vtkGenericCell *cell) override
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
vtkIdType GetNumberOfLines()
vtkMTimeType GetMTime() override
Get MTime which also considers its cell array MTime.
abstract class for specifying dataset behavior
void GetCellEdgeNeighbors(vtkIdType cellId, vtkIdType p1, vtkIdType p2, vtkIdList *cellIds)
Get the neighbors at an edge.
concrete dataset represents vertices, lines, polygons, and triangle strips
static vtkPolyDataDummyContainter DummyContainer
void CopyCells(vtkPolyData *pd, vtkIdList *idList, vtkPointLocator *locator=nullptr)
Copy cells listed in idList from pd, including points, point data, and cell data.
void Allocate(vtkPolyData *inPolyData, vtkIdType numCells=1000, int extSize=1000)
Similar to the method above, this method allocates initial storage for vertex, line,...
vtkIdType InsertNextLinkedPoint(int numLinks)
Add a point to the cell data structure (after cell pointers have been built).
provides thread-safe access to cells
vtkCellArray * GetPolys()
Get the cell array defining polygons.
unsigned long GetActualMemorySize() override
Return the actual size of the data in kibibytes (1024 bytes).
void Allocate(vtkIdType numCells=1000, int extSize=1000)
Method allocates initial storage for vertex, line, polygon, and triangle strip arrays.
vtkIdType GetNumberOfStrips()
void AddReferenceToCell(vtkIdType ptId, vtkIdType cellId)
Add a reference to a cell in a particular point's link list.
void GetCellBounds(vtkIdType cellId, double bounds[6]) override
Get the bounds of the cell with cellId such that: 0 <= cellId < NumberOfCells.
void DeleteCells()
Release data structure that allows random access of the cells.
int GetMaxCellSize() override
Return the maximum cell size in this poly data.
general representation of visualization data
vtkIdType InsertNextLinkedCell(int type, int npts, const vtkIdType pts[])
Add a new cell to the cell data structure (after cell pointers have been built).
void DeleteCell(vtkIdType cellId)
void AddCellReference(vtkIdType cellId, vtkIdType ptId)
Add the reference to the cell (cellId) from the point (ptId).
vtkTriangleStrip * TriangleStrip
a cell that represents a triangle strip
void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds) override
Copy a cells point ids into list provided.
a cell that represents a 2D quadrilateral
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.
int IsEdge(vtkIdType p1, vtkIdType p2)
Determine whether two points form an edge.
virtual vtkCell * GetCell(vtkIdType cellId)=0
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
vtkTypeUInt32 vtkMTimeType
cell represents a set of 0D vertices