我正在尝试实现一种算法来从半边结构中移除边和顶点.有关插图,请参见附图:

我知道有像Openmesh和CGAL等库可以帮助我实现这个目标,但我打算自己实现它.
我最初的想法如下:
1. Find out the half edges associated with that edge
2. Find out all the faces associated with each half edge
3. Find out all the edges and vertices corresponds to each face
4. Not sure how to merge them together ie how to merge edge 1 edge 2, vertex 4 and 2 and edge 5 and 4 in the attached graph.
5. Delete all the faces.
6. Delete all the half edges
Run Code Online (Sandbox Code Playgroud)
如果我走在正确的轨道上,有人可以提出一些建议吗?
我也在网上做过一些研究,发现一篇在线文章似乎很有帮助.
这是链接:http …