CauldronGPU.Sectors.Flats (CauldronGPU v0.3.3)

Copy Markdown View Source

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

polygon()

@type polygon() :: [Cauldron2D.Sectors.Map.point()]

Functions

polygons(map)

@spec polygons(Cauldron2D.Sectors.Map.t()) :: [{non_neg_integer(), polygon()}]

Each subsector's convex polygon, counter-clockwise, as {sector, points}.

surfaces(map, pictures, sky)

The floor and ceiling surfaces of every subsector of map, which must carry a BSP.