 |
VTK
9.1.0
|
Go to the documentation of this file.
171 #ifndef vtkPolyData_h
172 #define vtkPolyData_h
174 #include "vtkCommonDataModelModule.h"
191 struct vtkPolyDataDummyContainter;
426 this->AllocateExact(numCells, numCells);
441 this->AllocateProportional(
442 inPolyData,
static_cast<double>(numCells) / inPolyData->
GetNumberOfCells());
538 int IsTriangle(
int v1,
int v2,
int v3);
596 void RemoveDeletedCells();
608 vtkIdType InsertNextLinkedPoint(
double x[3],
int numLinks);
637 void RemoveCellReference(
vtkIdType cellId);
676 void Initialize() override;
682 virtual
int GetPiece();
683 virtual
int GetNumberOfPieces();
689 virtual
int GetGhostLevel();
699 unsigned long GetActualMemorySize() override;
715 void RemoveGhostCells();
745 ERR_NO_SUCH_FIELD = -4,
746 ERR_INCORRECT_FIELD = -3,
747 ERR_NON_MANIFOLD_STAR = -2,
821 double CellsBounds[6];
853 ncells =
static_cast<unsigned short>(this->
Links->
GetNcells(ptId));
871 return static_cast<int>(this->
Cells->GetTag(cellId).GetCellType());
887 for (i = 0; i < 3; i++)
890 for (j = 0; j < n1; j++)
893 if ((tVerts[0] == tVerts2[0] || tVerts[0] == tVerts2[1] || tVerts[0] == tVerts2[2]) &&
894 (tVerts[1] == tVerts2[0] || tVerts[1] == tVerts2[1] || tVerts[1] == tVerts2[2]) &&
895 (tVerts[2] == tVerts2[0] || tVerts[2] == tVerts2[1] || tVerts[2] == tVerts2[2]))
931 this->
Cells->GetTag(cellId).MarkDeleted();
990 if (ids->
GetId(i) == oldPtId)
992 ids->
SetId(i, newPtId);
vtkSmartPointer< vtkCellArray > Strips
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()
vtkSmartPointer< vtkPolygon > Polygon
vtkTimeStamp CellsBoundsTime
vtkSmartPointer< vtkCellArray > Verts
int GetCellType(vtkIdType cellId) override
Standard vtkDataSet interface.
vtkCellArray * GetCellArrayInternal(TaggedCellId tag)
void GetPointCells(vtkIdType ptId, vtkIdList *cellIds) override
Efficient method to obtain cells using a particular point.
vtkIdType GetNcells(vtkIdType ptId)
Get the number of cells using the point specified by ptId.
void ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId, vtkIdType newPtId)
Replace a point in the cell connectivity list with a different point.
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...
vtkSmartPointer< vtkVertex > Vertex
a cell that represents an n-sided polygon
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.
vtkIdType GetCellIdRelativeToCellArray(vtkIdType cellId)
Maps the cell at position cellId inside the vtkPolyData to its location in the corresponding cell arr...
vtkSmartPointer< vtkEmptyCell > EmptyCell
void ReplaceCell(vtkIdType cellId, vtkIdList *ids)
Replace the points defining cell "cellId" with a new set of points.
an empty cell used as a place-holder during processing
record modification and/or execution time
int GetScalarFieldCriticalIndex(vtkIdType pointId, vtkDataArray *scalarField)
void SetPolys(vtkCellArray *p)
Set the cell array defining polygons.
vtkSmartPointer< vtkPolyLine > PolyLine
vtkIdType GetNumberOfPolys()
Return the number of primitives of a particular type held.
vtkIdType GetNumberOfCells() override
This method always returns 0, as there are no cells in a vtkPointSet.
void SetLines(vtkCellArray *l)
Set the cell array defining lines.
void RemoveCellReference(vtkIdType cellId)
Remove all references to cell in cell structure.
abstract superclass for arrays of numeric data
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.
vtkIdType GetCellId() const noexcept
void DeletePoint(vtkIdType ptId)
Delete point (and storage) by destroying links to using cells.
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 Squeeze() override
Recover extra allocated memory when creating data whose initial size is unknown.
cell represents a 1D line
vtkSmartPointer< vtkPolyVertex > PolyVertex
void GetCellAtId(vtkIdType cellId, vtkIdType &cellSize, vtkIdType const *&cellPoints)
Return the point ids for the cell at cellId.
vtkIdType GetNumberOfVerts()
Return the number of primitives of a particular type held.
int GetCellType(vtkIdType) override
This method always returns VTK_EMPTY_CELL, as there is no cell in a vtkPointSet.
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
Standard vtkDataSet interface.
vtkSmartPointer< vtkTriangle > Triangle
bool AllocateExact(vtkIdType numCells, vtkIdType connectivitySize)
Preallocate memory for the internal cell arrays.
vtkCell * GetCell(vtkIdType cellId) override
Standard vtkDataSet interface.
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.
void SetId(const vtkIdType i, const vtkIdType vtkid)
Set the id at location i.
Target GetTarget() const noexcept
#define VTK_SIZEHINT(...)
cell represents a set of 1D lines
bool AllocateCopy(vtkPolyData *pd)
Preallocate memory for the internal cell arrays such that they are the same size as those in pd.
bool IsDeleted() const noexcept
vtkSmartPointer< vtkCellArray > Polys
virtual void GetCellNeighbors(vtkIdType cellId, vtkIdList *ptIds, vtkIdList *cellIds)
Topological inquiry to get all cells using list of points exclusive of cell specified (e....
void ComputeCellsBounds()
Compute the (X, Y, Z) bounds of the data.
abstract class to specify cell behavior
vtkCellArray * GetVerts()
Get the cell array defining vertices.
vtkSmartPointer< CellMap > Cells
void RemoveCellReference(vtkIdType cellId, vtkIdType ptId)
Delete the reference to the cell (cellId) from the point (ptId).
unsigned char GetCellType() const noexcept
a simple class to control print indentation
object to represent cell connectivity
int IsTriangle(int v1, int v2, int v3)
Given three vertices, determine whether it's a triangle.
#define VTK_DEPRECATED_IN_9_0_0(reason)
vtkSmartPointer< vtkQuad > Quad
vtkIdType GetId(const vtkIdType i)
Return the id at location i.
Abstract class in support of both point location and point insertion.
vtkSmartPointer< vtkCellArray > Lines
list of point or cell ids
void SetVerts(vtkCellArray *v)
Set the cell array defining vertices.
unsigned char GetCell(vtkIdType cellId, const vtkIdType *&pts)
Get a pointer to the cell, ie [npts pid1 .
static vtkPolyData * ExtendedNew()
vtkIdType GetNumberOfCells() override
Standard vtkDataSet interface.
vtkIdType GetNumberOfIds() const noexcept
Return the number of id's in the list.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methdos for type information and printing.
void GetCellsBounds(double bounds[6])
Get the cells bounds.
vtkSmartPointer< vtkLine > Line
a cell that represents a triangle
virtual vtkMTimeType GetMeshMTime()
Return the mesh (geometry/topology) modification time.
abstract class to specify dataset behavior
void DeleteLinks()
Release the upward links from point to cells that use each point.
void BuildLinks(int initialSize=0)
Create upward links from points to cells that use each point.
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.
bool AllocateEstimate(vtkIdType numCells, vtkIdType maxCellSize)
Preallocate memory for the internal cell arrays.
void ResizeCellList(vtkIdType ptId, int size)
Resize the list of cells using a particular point.
void GetCell(vtkIdType cellId, vtkGenericCell *cell) override
Standard vtkDataSet interface.
vtkIdType GetNumberOfLines()
Return the number of primitives of a particular type held.
vtkMTimeType GetMTime() override
Get MTime which also considers its cell array MTime.
concrete class for storing a set of points
void Allocate(vtkIdType numCells=1000, int vtkNotUsed(extSize)=1000)
Method allocates initial storage for vertex, line, polygon, and triangle strip arrays.
vtkNew< vtkIdList > LegacyBuffer
concrete dataset represents vertices, lines, polygons, and triangle strips
static vtkPolyDataDummyContainter DummyContainer
provides thread-safe access to cells
vtkCellArray * GetPolys()
Get the cell array defining polygons.
vtkIdType * GetPointer(const vtkIdType i)
Get a pointer to a particular data index.
void GetPointCells(vtkIdType, vtkIdList *idList) override
This method resets parameter idList, as there is no cell in a vtkPointSet.
vtkIdType GetNumberOfStrips()
Return the number of primitives of a particular type held.
void GetCellBounds(vtkIdType cellId, double bounds[6]) 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 DeleteCells()
Release data structure that allows random access of the cells.
int GetMaxCellSize() override
Return the maximum cell size in this poly data.
vtkSmartPointer< vtkTriangleStrip > TriangleStrip
general representation of visualization data
vtkSmartPointer< vtkDataArray > GetData(const Ioss::GroupingEntity *entity, const std::string &fieldname, Ioss::Transform *transform=nullptr, Cache *cache=nullptr, const std::string &cachekey=std::string())
Returns a VTK array for a given field (fieldname) on the chosen block (or set) entity.
void DeleteCell(vtkIdType cellId)
Mark a point/cell as deleted from this vtkPolyData.
void AddCellReference(vtkIdType cellId, vtkIdType ptId)
Add the reference to the cell (cellId) from the point (ptId).
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.
void CopyCells(vtkPolyData *pd, vtkIdList *idList, vtkIncrementalPointLocator *locator=nullptr)
Copy cells listed in idList from pd, including points, point data, and cell data.
virtual vtkCell * GetCell(vtkIdType cellId)=0
Get cell with cellId such that: 0 <= cellId < NumberOfCells.
vtkTypeUInt32 vtkMTimeType
cell represents a set of 0D vertices