BuildChunkIndices
function · terrain · primitive
- Address
0x6c51b0· 973 bytes, up to0x6c557c- Signature
uint32_t __fastcall (uint32_t start, uint32_t level, uint32_t caps, uint32_t holes, uint32_t a, uint32_t b)- Meaning
- Emits a chunk level's quadtree triangle list, skipping holes and splitting edges that face finer neighbours
- Confidence
- verified, proof one
- Finding
- terrain/lod#chunk-index-building
- Test
terrain::quad_hole_strip_indices
Finding: Chunk index building in terrain: lod
0x6c51b0(depth, level, caps, holes, column, row) builds a chunk's triangle list by a walk down a
quadtree of the 8 × 8 quads, from depth 0 at the centre (4, 4) to the leaves at the chunk's level, and
writes 16-bit indices through the cursor 0xcac3ac. A leaf is a cell of four triangles around its
centre, twelve indices; a hole bit drops the cell. Level 3 leaves are single quads, level 2 leaves cells
of 2 × 2 quads.
The derivation is in the doc.
Callers 1
- CMapChunk::SelectMesh terrain
Callees 0
None by a direct call or jump.
Calls and jumps by a bare address, from tables/calls.tsv.