VTK中顶点和点之间的差异 [英] Difference between vertex and point in vtk
问题描述
VTK 中的顶点和点之间的主要区别是什么?
What's the main difference between a vertex and a point in VTK?
好吧,我正在为 vtkPolyData
输出:
Well, I was assigning some computed points to an vtkPolyData
output:
vtkPolyData* oput = vtkPolyData::SafeDownCast(out_info->Get(vtkDataObject::DATA_OBJECT()));
,我想知道是否使用方法 SetVerts(vtkCellArray * v)
或方法 SetPoints(vtkPoints *)
。
and I wondered whether to use the method SetVerts(vtkCellArray *v)
or the method SetPoints(vtkPoints *)
.
推荐答案
在VTK数据集中(即继承vtkDataSet的类,vtkDataSet是提供点概念的最简单的数据类型),点只是空间中的位置。数据可以存储在代表点轨迹的空间中或单元(例如三角形或四面体)上的位置处。储存在储存格中的值在储存格位置的每个点都具有相同的值。
In VTK datasets (i.e., classes inheriting vtkDataSet which is the simplest type of data that provides a notion of points), points are simply locations in space. Data may be stored at locations in space or on cells (e.g., triangles or tetrahedra) that represent a locus of points. Values stored on cells take on the same value at every point in the cell's locus.
单元格由其角点定义。在vtkPolyData中,每个单元格都是由vtkPoints实例中点坐标中的整数偏移量列表定义的。
Cells are defined by their corner points. In vtkPolyData, every cell is defined by a list of integer offsets into the point coordinates in a vtkPoints instance.
VTK中的顶点是其点轨迹为单个的单元格点。
A vertex in VTK is a cell whose point locus is a single point.
有可能在VTK数据集中明确列出任何点都未引用的点(例如,您可以在vtkPoints对象中指定点坐标不用作任何四面体,三角形或顶点单元的角点)。这些点只能具有点数据(由数组存储在由vtkDataSet保留的vtkPointData实例中),而不能具有单元格数据(由数组存储在由vtkDataSet保留的vtkCellData实例中)。
It is possible to have points listed explicitly in a VTK dataset which are not reference by any cell (e.g., you can specify point coordinates in a vtkPoints object that are not used as corner points for any tetrahedron, triangle, or vertex cell). These points can only have point data (stored by arrays in a vtkPointData instance held by the vtkDataSet) and not cell data (stored by arrays in a vtkCellData instance held by the vtkDataSet).
因此,通过 SetPoints()
,您可以提供vtkCellArray实例随后引用的点坐标,以定义各种形状的点位置。一类形状是顶点(因此 SetVerts()
),而其他类型包括线和折线( SetLines()
)和三角形/四边形( SetPolys()
)。
So, SetPoints()
lets you provide point coordinates which vtkCellArray instances then reference to define point locii of various shapes. One category of shapes is vertices (hence SetVerts()
) while others include lines and polylines (SetLines()
) and triangles/quads (SetPolys()
).
这篇关于VTK中顶点和点之间的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!