40 #ifndef vtkCellArray_h 41 #define vtkCellArray_h 61 {
return this->Ia->Allocate(sz,ext);}
86 {
return numCells*(1+maxPtsPerCell);}
108 {
return this->Ia->GetSize();}
116 {
return this->Ia->GetMaxId()+1;}
150 void UpdateCellCount(
int npts);
156 {
return (this->InsertLocation - npts - 1);};
162 {
return this->TraversalLocation;}
164 {this->TraversalLocation = loc;}
171 {
return(this->TraversalLocation-npts-1);}
183 int GetMaxCellSize();
188 {
return this->Ia->GetPointer(0);}
220 {this->Ia->Squeeze();}
229 unsigned long GetActualMemorySize();
251 vtkIdType *ptr = this->Ia->WritePointer(i, npts+1);
253 for ( *ptr++ = npts, i = 0; i < npts; i++)
258 this->NumberOfCells++;
259 this->InsertLocation += npts + 1;
261 return this->NumberOfCells - 1;
267 this->InsertLocation = this->Ia->InsertNextValue(npts) + 1;
268 this->NumberOfCells++;
270 return this->NumberOfCells - 1;
276 this->Ia->InsertValue(this->InsertLocation++,
id);
282 this->Ia->SetValue(this->InsertLocation-npts-1, npts);
301 this->NumberOfCells = 0;
302 this->InsertLocation = 0;
303 this->TraversalLocation = 0;
310 if ( this->Ia->GetMaxId() >= 0 &&
311 this->TraversalLocation <= this->Ia->GetMaxId() )
313 npts = this->Ia->GetValue(this->TraversalLocation++);
314 pts = this->Ia->GetPointer(this->TraversalLocation);
315 this->TraversalLocation += npts;
327 npts = this->Ia->GetValue(loc++);
328 pts = this->Ia->GetPointer(loc);
337 vtkIdType *pts=this->Ia->GetPointer(loc+1);
338 for (i=0; i < (npts/2); i++)
341 pts[i] = pts[npts-i-1];
350 vtkIdType *oldPts=this->Ia->GetPointer(loc+1);
351 for (
int i=0; i < npts; i++)
361 this->NumberOfCells = ncells;
362 this->InsertLocation = 0;
363 this->TraversalLocation = 0;
364 return this->Ia->WritePointer(0,size);
vtkIdType GetNumberOfPoints()
vtkIdType GetInsertLocation(int npts)
abstract base class for most VTK objects
void InsertCellPoint(vtkIdType id)
#define vtkGetMacro(name, type)
vtkIdType GetNumberOfIds()
void DeepCopy(vtkPistonReference *self, vtkPistonReference *other)
void ReplaceCell(vtkIdType loc, int npts, const vtkIdType *pts)
dynamic, self-adjusting array of vtkIdType
#define vtkTypeMacro(thisClass, superclass)
abstract class to specify cell behavior
virtual void PrintSelf(ostream &os, vtkIndent indent)
void SetTraversalLocation(vtkIdType loc)
vtkIdType GetTraversalLocation(vtkIdType npts)
a simple class to control print indentation
vtkIdType GetNumberOfConnectivityEntries()
list of point or cell ids
vtkIdType EstimateSize(vtkIdType numCells, int maxPtsPerCell)
void ReverseCell(vtkIdType loc)
void UpdateCellCount(int npts)
vtkIdType TraversalLocation
vtkIdType InsertNextCell(vtkCell *cell)
vtkIdType * WritePointer(const vtkIdType ncells, const vtkIdType size)
object to represent cell connectivity
vtkIdTypeArray * GetData()
int GetNextCell(vtkIdType &npts, vtkIdType *&pts)
vtkIdType GetTraversalLocation()
#define VTKCOMMONDATAMODEL_EXPORT
vtkIdType * GetPointer(const vtkIdType i)
int Allocate(const vtkIdType sz, const int ext=1000)
void GetCell(vtkIdType loc, vtkIdType &npts, vtkIdType *&pts)
#define vtkSetMacro(name, type)