*声明:才疏学浅,希望各位大神多多指教
图片来源于网络,侵删。
Halfedge数据结构
最近在搞Delaunay三角剖分算法,没啥经验,在github看到一份代码(https://github.com/eloraiby/delaunay),其中用到了Halfedge的数据结构(即是Doubly connected edge list, DCEL数据结构。https://en.wikipedia.org/wiki/Doubly_connected_edge_list),第一次接触,花了点时间研究了下,如下图:
“半边”数据结构,意思是把原来一个面的某一边分成了两个方向(顺时针和逆时针)的两个半边。
Halfedge数据结构C结构体表示为:
struct halfedge_s {
point2d_t* vertex; /* vertex */
halfedge_t* pair; /* pair */
hal