【发布时间】:2010-10-10 08:32:56
【问题描述】:
我正在寻找一个概念来存储(在 3 维欧几里得空间中)面、边和顶点,这样
- 信息(关于关系)不重复
- 对相邻面/边/顶点的查询速度很快
- 网格不限于同一绕组的连接面
定义
- 面的邻居:与该面共享边的面
- 顶点的邻居:位于共享该顶点的边的另一端的顶点
- 相邻边:与该边共享端点相同顶点的边
我已经考虑过半边数据结构,但只有当所有连接的面都具有相同的绕组时,对它的查询才真正起作用。
例如,考虑这个伪代码来访问这些相关实体:
face.neighbors #the neighboring faces
face.edges #the edges shared by this face (in the right winding order)
face.verts #the vertex of that face (in the right winding order)
edge.v1, edge.v2 #the two vertex making up an edge
vertex.edges #the edges this vertex shares
vertex.neighbors # the neighbors of this vertex along each shared edge
【问题讨论】:
标签: opengl data-structures 3d