I am trying to implement an algorithm to remove an edge and a vertex from a half edge structure. See the attached image for an illustration:
I know there's libraries like Openmesh and CGAL etc that can help me achieve this but I plan to implement it myself.
My original idea is as follows:
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
Can someone please give some suggestion if I am on the right track?
I also did some research online and found an article online that seems to be helpful.
Here's the link: http://kaba.hilvi.org/homepage/blog/halfedge/halfedge.htm
Under the Removing an edge section it lists the following steps:
1.Remove all of the polygons connected to the edge.
2.Link the half-edges of the edge off from the mesh.
3.Deallocate the edge and its half-edges.
The first and last ones make sense to me. However, I am not sure what the author mean by link the half-edges of the edge off from the mesh? Can someone please explain this to me? Thanks!