I try to understand boundary representation (B-rep) and I cannot find what's the advantages of the half-edge data structure versus the winged-edge one. I've found in this book that winged-edge cannot represent the state where a vertex but no edges exists in space. But there is no sample.
Another book says that there is an ambiguity in the edge direction.
And finally, on a this web page, performance reasons are invoked.
I've found the solution in this paper.
With winged-edge, you've got this data structure:
The code in C# is as follow:
On the face, you only need to store one of the bounding edge, as the structure forms a double linked list, you can retrieve the other edges:
But if you need to iterate over the edges of a face, you will use this code:
We have to use a conditional expression (? :) in the loop to find the next edge. On modern processors, this lead to a performance hit, as described in this post.
The half-edge data structure has not this problem (but takes more memory).