vtkIdList vtkPoints and vtkFloatPoints

本文介绍了VTK中的关键数据结构vtkIdList、vtkPoints及vtkFloatPoints。vtkIdList用于在不同对象间传递ID数据,尤其适用于点和单元的数据交互。vtkPoints提供三维对象的抽象接口,而vtkFloatPoints则是vtkPoints的具体实现,用于存储浮点型坐标。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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);

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值