Leaf

LEAFS is the name of a WAD lump which is a component of a level in the Sony PlayStation and Nintendo 64 ports of Doom. It is also used by Doom64 EX, but does not exist in other ports nor in vanilla Doom. It is normally generated automatically by a dedicated node builder.

A leaf is collection of segs and vertexes for a subsector. There are one such collection for each subsector, in the same order as the SSECTORS lump.

Leaf structure
A leaf is of this form: Each reference is of this form:

The order in which the segs and vertices are referenced should correspond to a clockwise order for each subsector, allowing the engine to easily transform subsectors into convex polygons. This also means that the node builder should have created the subsectors with the same constraints as for generating GL nodes, as a concave subsector simply cannot become a convex polygon.