65 #include "vtkCommonDataModelModule.h" 81 struct vtkPolyDataDummyContainter;
278 bool AllocateProportional(
vtkPolyData* pd,
double ratio);
288 this->AllocateExact(numCells, numCells);
303 this->AllocateProportional(
304 inPolyData, static_cast<double>(numCells) / inPolyData->
GetNumberOfCells());
351 void BuildLinks(
int initialSize = 0);
372 #ifndef VTK_LEGACY_REMOVE 401 int IsTriangle(
int v1,
int v2,
int v3);
459 void RemoveDeletedCells();
470 vtkIdType InsertNextLinkedPoint(
int numLinks);
471 vtkIdType InsertNextLinkedPoint(
double x[3],
int numLinks);
500 void RemoveCellReference(
vtkIdType cellId);
545 virtual int GetPiece();
546 virtual int GetNumberOfPieces();
552 virtual int GetGhostLevel();
577 void RemoveGhostCells();
607 ERR_NO_SUCH_FIELD = -4,
608 ERR_INCORRECT_FIELD = -3,
609 ERR_NON_MANIFOLD_STAR = -2,
617 int GetScalarFieldCriticalIndex(
vtkIdType pointId,
int fieldId);
618 int GetScalarFieldCriticalIndex(
vtkIdType pointId,
const char* fieldName);
703 ncells = this->Links->GetNcells(ptId);
704 cells = this->Links->GetCells(ptId);
707 #ifndef VTK_LEGACY_REMOVE 711 ncells =
static_cast<unsigned short>(this->Links->GetNcells(ptId));
712 cells = this->Links->GetCells(ptId);
719 return (this->GetNumberOfVerts() + this->GetNumberOfLines() + this->GetNumberOfPolys() +
720 this->GetNumberOfStrips());
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]))
784 this->Links->DeletePoint(ptId);
790 this->Cells->GetTag(cellId).MarkDeleted();
802 this->Links->RemoveCellReference(cellId, pts[i]);
815 this->Links->AddCellReference(cellId, pts[i]);
822 this->Links->ResizeCellList(ptId, size);
849 if (ids->
GetId(i) == oldPtId)
851 ids->
SetId(i, newPtId);
void ComputeBounds() override
Compute the (X, Y, Z) bounds of the data.
vtkSmartPointer< vtkCellArray > Verts
vtkSmartPointer< vtkEmptyCell > EmptyCell
int GetCellType(vtkIdType cellId) override
Standard vtkDataSet interface.
virtual vtkIdType GetNumberOfCells()=0
Determine the number of cells composing the dataset.
virtual void GetPointCells(vtkIdType ptId, vtkIdList *cellIds)=0
Topological inquiry to get cells using point.
unsigned char GetCellType() const noexcept
vtkSmartPointer< vtkPolygon > Polygon
void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds) override
Copy a cells point ids into list provided.
static vtkDataObject * New()
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
vtkIdType GetCellId() const noexcept
Abstract class in support of both point location and point insertion.
vtkCellArray * GetCellArrayInternal(TaggedCellId tag)
vtkIdType GetNumberOfIds()
Return the number of id's in the list.
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
abstract class for specifying dataset behavior
vtkIdType GetNumberOfPolys()
Return the number of primitives of a particular type held.
vtkSmartPointer< vtkCellLinks > Links
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.
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.
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 methdos for type information and printing.
a simple class to control print indentation
virtual int GetMaxCellSize()=0
Convenience method returns largest cell size in dataset.
int IsTriangle(int v1, int v2, int v3)
Given three vertices, determine whether it's a triangle.
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.
virtual void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds)=0
Topological inquiry to get points defining cell.
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.
bool IsDeleted() const noexcept
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 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
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
Target GetTarget() const noexcept
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.
void CopyStructure(vtkDataSet *pd) override
Copy the geometric structure of an input point set object.
general representation of visualization data
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.
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
virtual int GetCellType(vtkIdType cellId)=0
Get type of cell with cellId such that: 0 <= cellId < NumberOfCells.
vtkIdType GetNumberOfStrips()
Return the number of primitives of a particular type held.