benilla-re systems structs docs

CMapAreaLow::FillVertices

function · terrain · primitive

Address
0x6bd8c0 · 228 bytes, up to 0x6bd9a3
Signature
void __fastcall (CMapAreaLow *area, void *buffer)
Meaning
Fills the 545 low-detail vertices from the tile origin by repeated 33.333332 steps and the WDL heights
Confidence
verified, proof one
Finding
terrain/lod#low-detail-mesh
Test
terrain::wdl_mesh_fill

Finding: Low-detail mesh in terrain: lod

A CMapAreaLow fills a 545-vertex buffer of 16-byte vertices (x, y, z, 0xffffffff): 17 rows of 17 outer vertices, then 16 rows of 16 inner ones. An outer vertex's x is the tile's X less 33.333332 for each row and its y the tile's Y less 33.333332 for each column, each by repeated subtraction at 53 bits; inner ones start 16.666666 in. The height is the WDL value. Each of the 16×16 quads is four triangles around its inner vertex C: (C, v+1, v), (C, v+18, v+1), (C, v+17, v+18) and (C, v, v+17), v the quad's first outer vertex.

The derivation is in the doc.

Callers 1

Callees 3

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