71 #include "vtkCommonDataModelModule.h"
87 struct vtkPolyDataDummyContainter;
161 void ComputeCellsBounds();
168 void GetCellsBounds(
double bounds[6]);
313 bool AllocateProportional(
vtkPolyData* pd,
double ratio);
323 this->AllocateExact(numCells, numCells);
338 this->AllocateProportional(
339 inPolyData, static_cast<double>(numCells) / inPolyData->
GetNumberOfCells());
386 void BuildLinks(
int initialSize = 0);
461 int IsTriangle(
int v1,
int v2,
int v3);
519 void RemoveDeletedCells();
530 vtkIdType InsertNextLinkedPoint(
int numLinks);
531 vtkIdType InsertNextLinkedPoint(
double x[3],
int numLinks);
560 void RemoveCellReference(
vtkIdType cellId);
605 virtual int GetPiece();
606 virtual int GetNumberOfPieces();
612 virtual int GetGhostLevel();
638 void RemoveGhostCells();
668 ERR_NO_SUCH_FIELD = -4,
669 ERR_INCORRECT_FIELD = -3,
670 ERR_NON_MANIFOLD_STAR = -2,
678 int GetScalarFieldCriticalIndex(
vtkIdType pointId,
int fieldId);
679 int GetScalarFieldCriticalIndex(
vtkIdType pointId,
const char* fieldName);
744 double CellsBounds[6];
777 return static_cast<int>(this->
Cells->GetTag(cellId).GetCellType());
809 vtkWarningMacro(<<
"Cell type not supported.");
826 for (i = 0; i < 3; i++)
829 for (j = 0; j < n1; j++)
832 if ((tVerts[0] == tVerts2[0] || tVerts[0] == tVerts2[1] || tVerts[0] == tVerts2[2]) &&
833 (tVerts[1] == tVerts2[0] || tVerts[1] == tVerts2[1] || tVerts[1] == tVerts2[2]) &&
834 (tVerts[2] == tVerts2[0] || tVerts[2] == tVerts2[1] || tVerts[2] == tVerts2[2]))
870 this->
Cells->GetTag(cellId).MarkDeleted();
929 if (ids->
GetId(i) == oldPtId)
931 ids->
SetId(i, newPtId);
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 GetCellSize(vtkIdType cellId) override
Standard vtkDataSet interface.
vtkIdType GetCellSize(vtkIdType) override
This method always returns 1, as all cells are point in a pure vtkPointSet.
vtkSmartPointer< vtkCellArray > Verts
vtkSmartPointer< vtkEmptyCell > EmptyCell
int GetCellType(vtkIdType cellId) override
Standard vtkDataSet interface.
void AddCellReference(vtkIdType cellId, vtkIdType ptId)
Add the reference to the cell (cellId) from the point (ptId).
vtkSmartPointer< vtkPolygon > Polygon
void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds) override
Copy a cells point ids into list provided.
vtkTypeUInt32 vtkMTimeType
void ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId, vtkIdType newPtId)
Replace a point in the cell connectivity list with a different point.
abstract class to specify dataset behavior
a cell that represents a 3D point
void SetId(const vtkIdType i, const vtkIdType vtkid)
Set the id at location i.
vtkSmartPointer< vtkPolyLine > PolyLine
unsigned char GetCellType() const noexcept
an abstract base class for classes that build topological links from points to cells ...
vtkTimeStamp CellsBoundsTime
record modification and/or execution time
vtkIdType GetCellIdRelativeToCellArray(vtkIdType cellId)
Maps the cell at position cellId inside the vtkPolyData to its location in the corresponding cell arr...
Abstract class in support of both point location and point insertion.
void ReplaceCell(vtkIdType cellId, vtkIdList *ids)
Replace the points defining cell "cellId" with a new set of points.
vtkCellArray * GetCellArrayInternal(TaggedCellId tag)
void GetCellPoints(vtkIdType, vtkIdList *idList) override
Topological inquiry to get points defining cell.
void GetPointCells(vtkIdType ptId, vtkIdList *cellIds) override
Efficient method to obtain cells using a particular point.
static vtkPointSet * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
void AddCellReference(vtkIdType cellId)
Add references to cell in cell structure.
a cell that represents a 2D quadrilateral
concrete class for storing a set of points
vtkIdType GetNumberOfPolys()
Return the number of primitives of a particular type held.
vtkSmartPointer< vtkCellLinks > Links
vtkIdType GetNumberOfCells() override
This method always returns 0, as there are no cells in a vtkPointSet.
an empty cell used as a place-holder during processing
concrete dataset represents vertices, lines, polygons, and triangle strips
cell represents a set of 0D vertices
void Squeeze() override
Reclaim any unused memory.
vtkIdType * GetCells(vtkIdType ptId)
Return a list of cell ids using the point.
void RemoveCellReference(vtkIdType cellId)
Remove all references to cell in cell structure.
void DeletePoint(vtkIdType ptId)
Mark a point/cell as deleted from this vtkPolyData.
int GetCellType(vtkIdType) override
This method always returns VTK_EMPTY_CELL, as there is no cell in a vtkPointSet.
vtkSmartPointer< vtkCellArray > Polys
provides thread-safe access to cells
int GetDataObjectType() override
Return what type of dataset this is.
vtkSmartPointer< vtkPolyVertex > PolyVertex
a cell that represents a triangle strip
cell represents a 1D line
abstract class to specify cell behavior
void DeepCopy(vtkDataObject *src) override
Shallow and Deep copy.
vtkSmartPointer< vtkTriangle > Triangle
bool NeedToBuildCells()
Check if BuildCells is needed.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for type information and printing.
a simple class to control print indentation
int IsTriangle(int v1, int v2, int v3)
Given three vertices, determine whether it's a triangle.
static vtkPointSet * New()
Standard instantiation method.
vtkSmartPointer< vtkCellArray > Lines
list of point or cell ids
vtkIdType GetNumberOfVerts()
Return the number of primitives of a particular type held.
void Initialize() override
Reset to an empty state and free any memory.
abstract superclass for arrays of numeric data
vtkSmartPointer< CellMap > Cells
vtkIdType GetNumberOfCells() override
Standard vtkDataSet interface.
a cell that represents an n-sided polygon
void ResizeCellList(vtkIdType ptId, int size)
Resize the list of cells using a particular point.
vtkIdType GetNumberOfIds() const noexcept
Return the number of id's in the list.
vtkSmartPointer< vtkQuad > Quad
vtkIdType GetNumberOfLines()
Return the number of primitives of a particular type held.
virtual void GetCellNeighbors(vtkIdType cellId, vtkIdList *ptIds, vtkIdList *cellIds)
Topological inquiry to get all cells using list of points exclusive of cell specified (e...
#define VTK_SIZEHINT(...)
vtkMTimeType GetMTime() override
Get MTime which also considers its vtkPoints MTime.
int GetMaxCellSize() override
This method always returns 0, as there are no cells in a vtkPointSet.
static vtkPointSet * ExtendedNew()
int IsPointUsedByCell(vtkIdType ptId, vtkIdType cellId)
Determine whether a point is used by a particular cell.
vtkIdType GetId(const vtkIdType i)
Return the id at location i.
vtkSmartPointer< vtkLine > Line
object to represent cell connectivity
bool IsDeleted() const noexcept
Target GetTarget() const noexcept
void Allocate(vtkPolyData *inPolyData, vtkIdType numCells=1000, int vtkNotUsed(extSize)=1000)
Similar to the method above, this method allocates initial storage for vertex, line, polygon, and triangle strip arrays.
vtkSmartPointer< vtkTriangleStrip > TriangleStrip
a cell that represents a triangle
void GetPointCells(vtkIdType, vtkIdList *idList) override
Topological inquiry to get cells using point.
void BuildCells()
Create data structure that allows random access of cells.
void Allocate(vtkIdType numCells=1000, int vtkNotUsed(extSize)=1000)
Method allocates initial storage for vertex, line, polygon, and triangle strip arrays.
unsigned long GetActualMemorySize() override
Return the actual size of the data in kibibytes (1024 bytes).
void ShallowCopy(vtkDataObject *src) override
Shallow and Deep copy.
void DeleteCell(vtkIdType cellId)
Mark a point/cell as deleted from this vtkPolyData.
static vtkPolyDataDummyContainter DummyContainer
void GetCellAtId(vtkIdType cellId, vtkIdType &cellSize, vtkIdType const *&cellPoints)
Return the point ids for the cell at cellId.
vtkCell * GetCell(vtkIdType) override
This method always return a vtkEmptyCell, as there is no cell in a vtkPointSet.
void DeletePoint(vtkIdType ptId)
Delete point (and storage) by destroying links to using cells.
vtkIdType GetCellId() const noexcept
void CopyStructure(vtkDataSet *pd) override
Copy the geometric structure of an input point set object.
general representation of visualization data
vtkIdType GetNcells(vtkIdType ptId)
Get the number of cells using the point specified by ptId.
vtkIdType * GetPointer(const vtkIdType i)
Get a pointer to a particular data index.
vtkNew< vtkIdList > LegacyBuffer
virtual vtkCell * GetCell(vtkIdType cellId)=0
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
vtkIdType GetCellSize(const vtkIdType cellId) const
Return the size of the cell at cellId.
vtkSmartPointer< vtkCellArray > Strips
virtual void GetCellBounds(vtkIdType cellId, double bounds[6])
Get the bounds of the cell with cellId such that: 0 <= cellId < NumberOfCells.
vtkSmartPointer< vtkVertex > Vertex
cell represents a set of 1D lines
void RemoveCellReference(vtkIdType cellId, vtkIdType ptId)
Delete the reference to the cell (cellId) from the point (ptId).
vtkIdType GetNumberOfStrips()
Return the number of primitives of a particular type held.