Implementation of the half-edge data structure.