Skip to main content

Module build

Module build 

Source
Expand description

Building one navmesh tile end to end (spec 4, 5, 7).

tile_config derives the Recast configuration of a cell class, and build_tile runs every step of spec 5.4 on one tile input: terrain, objects, span filters, compact heightfield, area passes, regions, contours, polygon mesh, flags, the extra section and the Detour tile blob.

The build raises no warnings: the counts it returns (stray part ids, obstacles) are for the caller to report.

Structs§

BuildOptions
Options of a tile build.
TileConfig
The Recast configuration derived from the world and a cell class (spec 4). Sizes in voxels unless noted.

Enums§

DoorPolicy
What the door states of the tiles are (spec 5.1): which door parts start disabled.
TileOutcome
The result of building one tile.

Constants§

MAX_SPANS
The most spans one tile heightfield may hold (hostile input: stacked surfaces could otherwise need gigabytes). Past it the tile fails. A Span is 10 bytes, so this bounds the span data of a tile at 2^26 * 10 B = 640 MiB (before the slack of the column vectors); a field added to Span raises it.

Functions§

build_tile
Builds the Detour tile of one tile input (spec 5).
tile_config
The configuration of tiles of cell_class (spec 4). All arithmetic is in f32 as the spec writes it. A degenerate cell class (no cells) gives non-finite sizes, which build_tile rejects.