63 #ifndef __vtkPolyData_h
64 #define __vtkPolyData_h
66 #include "vtkCommonDataModelModule.h"
67 #include "vtkPointSet.h"
69 #include "vtkCellTypes.h"
70 #include "vtkCellLinks.h"
79 class vtkTriangleStrip;
82 class VTKCOMMONDATAMODEL_EXPORT
vtkPolyData :
public vtkPointSet
88 void PrintSelf(ostream& os,
vtkIndent indent);
95 void CopyStructure(vtkDataSet *ds);
101 void GetCell(
vtkIdType cellId, vtkGenericCell *cell);
103 void GetCellBounds(
vtkIdType cellId,
double bounds[6]);
114 vtkPointLocator *locator = NULL);
125 void ComputeBounds();
134 int GetMaxCellSize();
137 void SetVerts (vtkCellArray* v);
141 vtkCellArray *GetVerts();
144 void SetLines (vtkCellArray* l);
148 vtkCellArray *GetLines();
151 void SetPolys (vtkCellArray* p);
155 vtkCellArray *GetPolys();
158 void SetStrips (vtkCellArray* s);
163 vtkCellArray *GetStrips();
179 void Allocate(
vtkIdType numCells=1000,
int extSize=1000);
201 int InsertNextCell(
int type,
int npts,
vtkIdType *pts);
209 int InsertNextCell(
int type,
vtkIdList *pts);
223 void BuildLinks(
int initialSize=0);
235 void GetPointCells(
vtkIdType ptId,
unsigned short& ncells,
253 int IsTriangle(
int v1,
int v2,
int v3);
293 void RemoveDeletedCells();
302 int InsertNextLinkedPoint(
int numLinks);
303 int InsertNextLinkedPoint(
double x[3],
int numLinks);
309 int InsertNextLinkedCell(
int type,
int npts,
vtkIdType *pts);
324 void RemoveCellReference(
vtkIdType cellId);
348 void ResizeCellList(
vtkIdType ptId,
int size);
351 virtual void Initialize();
355 virtual int GetPiece();
356 virtual int GetNumberOfPieces();
360 virtual int GetGhostLevel();
367 unsigned long GetActualMemorySize();
377 void RemoveGhostCells(
int level);
405 ERR_NO_SUCH_FIELD = -4,
406 ERR_INCORRECT_FIELD = -3,
407 ERR_NON_MANIFOLD_STAR = -2,
414 int GetScalarFieldCriticalIndex (
vtkIdType pointId,
416 int GetScalarFieldCriticalIndex (
vtkIdType pointId,
int fieldId);
417 int GetScalarFieldCriticalIndex (
vtkIdType pointId,
const char* fieldName);
456 {this->GetCellNeighbors(cellId, &ptIds, &cellIds);}
469 ncells = this->
Links->GetNcells(ptId);
470 cells = this->
Links->GetCells(ptId);
475 unsigned short int n1;
489 if ( (tVerts[0] == tVerts2[0] || tVerts[0] == tVerts2[1] ||
490 tVerts[0] == tVerts2[2]) &&
491 (tVerts[1] == tVerts2[0] || tVerts[1] == tVerts2[1] ||
492 tVerts[1] == tVerts2[2]) &&
493 (tVerts[2] == tVerts2[0] || tVerts[2] == tVerts2[1] ||
494 tVerts[2] == tVerts2[2]) )
510 if ( pts[i] == ptId )
521 this->
Links->DeletePoint(ptId);
526 this->
Cells->DeleteCell(cellId);
536 this->
Links->RemoveCellReference(cellId, pts[i]);
547 this->
Links->AddCellReference(cellId, pts[i]);
553 this->
Links->ResizeCellList(ptId,size);
563 for ( i=0; i < nverts; i++ )
565 if ( verts[i] == oldPtId )
static vtkCellArray * Dummy
void ReplaceCellPoint(vtkIdType cellId, vtkIdType oldPtId, vtkIdType newPtId)
void GetPointCells(vtkIdType ptId, vtkIdList *cellIds)
void DeepCopy(vtkPistonReference *self, vtkPistonReference *other)
void AddCellReference(vtkIdType cellId)
concrete dataset represents vertices, lines, polygons, and triangle strips
void RemoveCellReference(vtkIdType cellId)
void DeletePoint(vtkIdType ptId)
vtkPolyVertex * PolyVertex
a simple class to control print indentation
int IsTriangle(int v1, int v2, int v3)
list of point or cell ids
abstract superclass for arrays of numeric data
a cell that represents an n-sided polygon
void ResizeCellList(vtkIdType ptId, int size)
int IsPointUsedByCell(vtkIdType ptId, vtkIdType cellId)
void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds)
void DeleteCell(vtkIdType cellId)
general representation of visualization data
cell represents a set of 1D lines
vtkTriangleStrip * TriangleStrip