IT lexicon › Programming › Half-edge

Half-edge

Programming På svenska → Updated: 2026-10-25

A data structure that captures a mesh's topology by splitting every edge into two directed half-edges, one for each adjacent face.

Each half-edge stores its origin vertex, its twin (the same edge running the other way), the next half-edge around its face, and the face itself. Those pointers let you walk a vertex's neighbours, a face's boundary, or both sides of an edge in constant time — something a raw triangle list can't do without rescanning everything.

Descended from Muller and Preparata's DCEL (1978), it is the backbone of modelling tools (Blender's BMesh, CGAL) and of algorithms like edge collapse and subdivision. The cost is memory, and that it only represents manifold surfaces cleanly: an edge shared by three faces has no single twin.

← Back to the lexicon