In this representation, a mesh is a collection of sets of vertices, edges and faces. The geometric data for and the adaptation criteria is obtained through a user-supplied surface object. The front is stored in two heaps.
struct Mesh { Container<Face*> faces; Container<Edge*> edges; Container<Vertex*> vertices; Heap refine_heap; Heap simplif_heap; Surface surf; }
A triangular face is a loop of three oriented half edges.
struct Face { Half_Edge* he_ref; }
An edge stores two half edges, one for each orientation.
struct Edge { Half_Edge he[2]; }
The half-edge contains pointers to its origin vertex, next half-edge in the loop, face corresponding to that loop, and its parent edge.
The vertex stores its subdivision level, and a pointer to one of the incident edges in its star.
struct Vertex { Half_Edge* star_ref; int level; }