benilla-re systems structs docs

GatherWorldFacets

function · terrain · orchestration

Address
0x6aa8b0 · 498 bytes, up to 0x6aaaa1
Signature
uint8_t __fastcall (const float *box, void *list, uint32_t mask, void *owner)
Meaning
Gathers the map objects' facets and the terrain facets of every chunk a box touches
Confidence
verified, proof one
Finding
terrain/collide#terrain-gather
Test
terrain::aabb_query_negates_difftest, terrain::aabb_query_cell_indices_difftest

Finding: Terrain gather in terrain: collide

0x6aa8b0(box, list, mask, owner) advances the two query counters, empties the list, gathers the map objects' facets (0x6aaab0), and, unless the map is one object, the terrain's: the box's corners map to cells by u = (17066.666 − x)·0.24, each a float, taken − 0.5 and rounded, and every chunk whose cells the box touches is gathered with the cell rectangle. The box must lie inside [0, 34133.332) on both axes. It returns 0 when a step fails.

The derivation is in the doc.

Callers 1

Callees 3

Calls and jumps by a bare address, from tables/calls.tsv.