Floors and ceilings of a sector map as CauldronGPU.Sectors.Surfaces surfaces.
Each subsector of the map's BSP becomes one convex polygon: the map's bounds cut by
every partition line above it, then by each of its own segs. The polygons cover every
sector, concave or holed, without gaps. Floors face up, ceilings down; both are
textured in map space, one picture's width and height a repeat, and keyed
{:picture, id}. Sectors whose ceiling (or floor) picture is in sky get no ceiling
(or floor).
CauldronGPU.Sectors.Flats.surfaces(map, pictures, MapSet.new([sky_flat]))
Summary
Functions
Each subsector's convex polygon, counter-clockwise, as {sector, points}.
The floor and ceiling surfaces of every subsector of map, which must carry a BSP.
Types
@type polygon() :: [Cauldron2D.Sectors.Map.point()]
Functions
@spec polygons(Cauldron2D.Sectors.Map.t()) :: [{non_neg_integer(), polygon()}]
Each subsector's convex polygon, counter-clockwise, as {sector, points}.
@spec surfaces( Cauldron2D.Sectors.Map.t(), Cauldron2D.Sectors.Pictures.t(), MapSet.t() ) :: [ CauldronGPU.Sectors.Surfaces.surface() ]
The floor and ceiling surfaces of every subsector of map, which must carry a BSP.