vtkIdList
功能:represent and pass data ids' between objects,espacially for points and cells.
数据:
//用来存储id
vtkIntArray Ia;
函数:
//返回pos=Ia.maxId+1,扩展之sz大小(注意此时的Ia.maxId=pos+sz-1)
int getChunk(const int sz);
//与Id有关的数据都删除,并resize Ia
void DeleteId(int Id);
//更新Ia为与otherIds的交集
void IntersectWith(vtkIdList& otherIds);
//判断Ia中是否包含id
int IsId(int id);
//调用Ia的函数
void Squeeze()
int GetNumberOfIds();
int GetId(const int i);
void SetId(const int i, const int id);
void InsertId(const int i, const int id);
int InsertNextId(const int id);
void Reset()
vtkPoints
功能:abstract interface to 3D object
数据:
float Bounds[6];
// Time at which bounds computed
vtkTimeStamp ComputeTime;
函数:
//在此显示vtkIdList的作用,用它把指定的点提取出来
virtual void GetPoints(vtkIdList& ptId, vtkFloatPoints& fp);
//计算数据的外围,在此用到timeStamp--ComputeTime
virtual void ComputeBounds();
vtkFloatPoints
功能:concrete implementation of vtkPoints
数据:
//借助此数据结构存储数据,每个点为占P中的三个Id
vtkFloatArray P;
函数:
//useful for direct data write , and a complementation of WrotePtr which have not implemented
float *WritePtr(const int id, const int number);
inline void vtkFloatPoints::WrotePtr()
//make a copy of this object
//{return new vtkFloatPoints(sze,ext);}
vtkPoints *MakeObject(int sze, int ext=1000);